Class VisibilityChangeEvent


public class VisibilityChangeEvent extends ClientEvent<VisibilityListener>
Event fired when page visibility changes.
Author:
Marvin P. Warble Jr.
See Also:
  • Constructor Details

    • VisibilityChangeEvent

      public VisibilityChangeEvent(boolean visible, String state)
      Constructs a VisibilityChangeEvent.
      Parameters:
      visible - True if the page is now visible.
      state - The visibility state ("visible", "hidden", "prerender").
  • Method Details

    • isVisible

      public boolean isVisible()
      Returns whether the page is visible.
      Returns:
      True if the page is visible.
    • isHidden

      public boolean isHidden()
      Returns whether the page is hidden.
      Returns:
      True if the page is hidden.
    • getState

      public String getState()
      Returns the visibility state.
      Returns:
      "visible", "hidden", or "prerender".
    • dispatchTo

      public void dispatchTo(VisibilityListener listener)
      Description copied from class: Event
      Dispatches this event to the specified listener.

      Subclasses implement this method to call the appropriate handler method on the listener interface.

      Specified by:
      dispatchTo in class Event<VisibilityListener>
      Parameters:
      listener - the listener to dispatch this event to
    • toString

      public String toString()
      Overrides:
      toString in class Object