Interface TimeZoneDisplayService

All Known Implementing Classes:
TimeZoneDisplayServiceImpl

public interface TimeZoneDisplayService
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    adds a listener that will notify all TimeZoneComponents within the container of updated display time zone events
    void
    Add a listener for time zone display changes
    Gets the Time Zone that this component is using to display a date and time.
    Deprecated.
    use getDisplayTimeZone() for required null handling
    void
    remove listener for the container.
    void
    Sets the time zone that this component will use to display date and time.
    void
    Traverses all components within the Container (recursively) to update the displayed time zone if components implement TimeZoneComponent interface.
    void
    updateTimeZone(Container container, TimeZone timezone)
    Traverses all components within the Container (recursively) to update the displayed time zone if components implement TimeZoneComponent interface
  • Method Details

    • setTimeZone

      void setTimeZone(TimeZone tz)
      Sets the time zone that this component will use to display date and time. Will send update events to all registered listeners.
      Parameters:
      tz - The time zone to use for display purposes
    • getTimeZone

      @Deprecated TimeZone getTimeZone()
      Deprecated.
      use getDisplayTimeZone() for required null handling
      Gets the Time Zone that this component is using to display a date and time. TimeZone can be null, in particular in UI's that use "As Stored" as a time zone display type
      Returns:
      java.util.TimeZone - display time zone
    • getDisplayTimeZone

      default Optional<TimeZone> getDisplayTimeZone()
      Gets the Time Zone that this component is using to display a date and time. The service can provide a null timezone in which case the returned Optional will be empty. In particular in UI's that use "As Stored" as a time zone display type will return empty.
      Returns:
      java.util.TimeZone - display time zone
    • updateTimeZone

      void updateTimeZone(Container container)
      Traverses all components within the Container (recursively) to update the displayed time zone if components implement TimeZoneComponent interface. Uses the current display time zone for the service
      Parameters:
      container - - container to interrogate for TimeZoneComponents
    • addContainer

      void addContainer(Container container)
      adds a listener that will notify all TimeZoneComponents within the container of updated display time zone events
      Parameters:
      container - - container to add a listener for
    • removeContainer

      void removeContainer(Container container)
      remove listener for the container. Does not traverse subcomponents to remove listeners.
      Parameters:
      container - - removes the container from the list of listeners
    • updateTimeZone

      void updateTimeZone(Container container, TimeZone timezone)
      Traverses all components within the Container (recursively) to update the displayed time zone if components implement TimeZoneComponent interface
      Parameters:
      container - - container to interrogate for TimeZoneComponents
      timezone - - new display time zone
    • addTimeZoneListener

      void addTimeZoneListener(TimeZoneComponent listener)
      Add a listener for time zone display changes
      Parameters:
      listener - - component that listens to display changes