Package com.oorian.html.js.visibility
Class VisibilityChangeEvent
java.lang.Object
com.oorian.messaging.events.Event<VisibilityListener>
com.oorian.messaging.events.client.ClientEvent<VisibilityListener>
com.oorian.html.js.visibility.VisibilityChangeEvent
Event fired when page visibility changes.
- Author:
- Marvin P. Warble Jr.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionVisibilityChangeEvent(boolean visible, String state) Constructs a VisibilityChangeEvent. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispatchTo(VisibilityListener listener) Dispatches this event to the specified listener.getState()Returns the visibility state.booleanisHidden()Returns whether the page is hidden.booleanReturns whether the page is visible.toString()Methods inherited from class com.oorian.messaging.events.client.ClientEvent
getSource, getTarget, setSource, setTarget
-
Constructor Details
-
VisibilityChangeEvent
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
Returns the visibility state.- Returns:
- "visible", "hidden", or "prerender".
-
dispatchTo
Description copied from class:EventDispatches this event to the specified listener.Subclasses implement this method to call the appropriate handler method on the listener interface.
- Specified by:
dispatchToin classEvent<VisibilityListener>- Parameters:
listener- the listener to dispatch this event to
-
toString
-