Package velox.api.layer1.common.helper
Class TimeZoneHelper
java.lang.Object
velox.api.layer1.common.helper.TimeZoneHelper
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceListener for changes to the time zone selected in Bookmap. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddListener(TimeZoneHelper.TimeZoneListener listener) Registers a listener for future time zone changes.static TimeZoneReturns the time zone currently selected in Bookmap.static voidRemoves a previously registered listener.
-
Method Details
-
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
Registers a listener for future time zone changes. The listener is not called immediately; usegetTimeZone()to obtain the current value. The listener remains registered until it is passed toremoveListener(TimeZoneListener).- Parameters:
listener- the listener to register
-
removeListener
Removes a previously registered listener. This method has no effect if the listener is not registered.- Parameters:
listener- the listener to remove
-