Package org.zkoss.zk.ui.event
Class VisibilityChangeEvent
java.lang.Object
org.zkoss.zk.ui.event.Event
org.zkoss.zk.ui.event.VisibilityChangeEvent
- All Implemented Interfaces:
Serializable
The VisibilityChangeEvent is used to notify current page/tab's visibility
state. Only worked if the browser support HTML 5 Page Visibility API.
This event is sent if and only if it is registered to a root component.
- Since:
- 6.5.1
- Author:
- Vincent
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionVisibilityChangeEvent(String name, boolean hidden, String visibleState) Constructs an event to hold the current page's visibility state. -
Method Summary
Modifier and TypeMethodDescriptionstatic final VisibilityChangeEventgetVisibilityChangeEvent(AuRequest request) Converts an AU request to a visibility change event.Return the current page's visibility state.booleanisHidden()Return the current page is hidden or not.Methods inherited from class org.zkoss.zk.ui.event.Event
getData, getEvent, getName, getPage, getTarget, isPropagatable, stopPropagation, toString
-
Constructor Details
-
VisibilityChangeEvent
Constructs an event to hold the current page's visibility state.Note:
Event.getTarget()will return null. It means it is a broadcast event.
-
-
Method Details
-
getVisibilityChangeEvent
Converts an AU request to a visibility change event. -
getVisibilityState
Return the current page's visibility state.Refer to HTML 5 Page Visibility API for more information.
-
isHidden
public boolean isHidden()Return the current page is hidden or not.Refer to HTML 5 Page Visibility API for more information.
-