Class SetLocale

java.lang.Object
org.jgrapes.core.internal.EventBase<Void>
org.jgrapes.core.Event<Void>
org.jgrapes.webconsole.base.events.SetLocale
All Implemented Interfaces:
Future<Void>, org.jgrapes.core.Associator, org.jgrapes.core.Eligible

public class SetLocale extends org.jgrapes.core.Event<Void>
Signals that the locale for the web console has changed.

Should be handled by web console components that support localization by updating the representation.

Event Sequence

  • 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

    Constructors
    Constructor
    Description
    SetLocale(RenderSupport renderSupport, Locale locale, boolean reload)
    Creates a new event.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Sets the reload flag.
    Returns the locale to set.
    boolean
    Returns true if the web console needs to be reloaded after changing the locale.
    Returns the render support.

    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

      public SetLocale(RenderSupport renderSupport, Locale locale, boolean reload)
      Creates a new event.
      Parameters:
      renderSupport - the render support
      locale - the locale to set
      reload - the reload
  • Method Details

    • renderSupport

      Returns the render support.
      Returns:
      the render support
    • locale

      public Locale locale()
      Returns the locale to set.
      Returns:
      the locale
    • reload

      public boolean reload()
      Returns true if the web console needs to be reloaded after changing the locale.
      Returns:
      true, if reload is required
    • forceReload

      public void 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.