Class SetLocale
- All Implemented Interfaces:
Future<Void>
,Associator
,Eligible
Signals that the locale for the web console has changed.
Should be handled by web console components that support localization by updating the representation.
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State
-
Field Summary
Fields inherited from class org.jgrapes.core.internal.EventBase
completed, completionEvents, invokedFor
-
Constructor Summary
ConstructorDescriptionSetLocale
(RenderSupport renderSupport, Locale locale, boolean reload) Creates a new event. -
Method Summary
Methods inherited from class org.jgrapes.core.Event
addCompletionEvent, associated, cancel, channels, channels, completionEvents, currentResults, defaultCriterion, forChannels, get, get, handled, handlingError, isCancelled, isDone, isEligibleFor, isStopped, processedBy, results, results, resumeHandling, setAssociated, setChannels, setRequiresResult, setResult, stop, suspendHandling, suspendHandling, tieTo, toString
Methods inherited from class org.jgrapes.core.internal.EventBase
disableTracking, enqueued, firstResultAssigned, isTracked, onCompletion
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jgrapes.core.Associator
associated, associated, associated, associatedGet
Methods inherited from interface java.util.concurrent.Future
exceptionNow, resultNow, state
-
Constructor Details
-
SetLocale
Creates a new event.- Parameters:
renderSupport
- the render supportlocale
- the locale to setreload
- the reload
-
-
Method Details
-
renderSupport
Returns the render support.- Returns:
- the render support
-
locale
Returns the locale to set.- Returns:
- the locale
-
reload
Returnstrue
if the web console needs to be reloaded after changing the locale.- Returns:
- true, if reload is required
-
forceReload
Sets the reload flag.Used by web console components that cannot dynamically update their content to the new locale.
For optimized behavior, web console components should check
reload()
before generating events that update the content dynamically. Web console component that invoke this method should define a handler with a higher priority.
-