Class VisibilityChangeEvent

java.lang.Object
org.zkoss.zk.ui.event.Event
org.zkoss.zk.ui.event.VisibilityChangeEvent
All Implemented Interfaces:
Serializable

public class VisibilityChangeEvent extends Event
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 Details

    • VisibilityChangeEvent

      public VisibilityChangeEvent(String name, boolean hidden, String visibleState)
      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

      public static final VisibilityChangeEvent getVisibilityChangeEvent(AuRequest request)
      Converts an AU request to a visibility change event.
    • getVisibilityState

      public String 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.