Class TimeZoneHelper

java.lang.Object
velox.api.layer1.common.helper.TimeZoneHelper

public final class TimeZoneHelper extends Object
Provides read-only access to the time zone currently selected in Bookmap and notifications when it changes.

The TimeZone instances returned by this helper or passed to listeners can be modified without changing the time zone stored by Bookmap.

  • Method Details

    • getTimeZone

      public static TimeZone getTimeZone()
      Returns the time zone currently selected in Bookmap. If Bookmap has not initialized its time zone yet, the default time zone is returned.
      Returns:
      a copy of the current time zone
    • addListener

      public static void addListener(TimeZoneHelper.TimeZoneListener listener)
      Registers a listener for future time zone changes. The listener is not called immediately; use getTimeZone() to obtain the current value. The listener remains registered until it is passed to removeListener(TimeZoneListener).
      Parameters:
      listener - the listener to register
    • removeListener

      public static void removeListener(TimeZoneHelper.TimeZoneListener listener)
      Removes a previously registered listener. This method has no effect if the listener is not registered.
      Parameters:
      listener - the listener to remove