org.zkoss.zk.ui.event
Class VisibilityChangeEvent

java.lang.Object
  extended by org.zkoss.zk.ui.event.Event
      extended by org.zkoss.zk.ui.event.VisibilityChangeEvent
All Implemented Interfaces:
java.io.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:
Serialized Form

Constructor Summary
VisibilityChangeEvent(java.lang.String name, boolean hidden, java.lang.String visibleState)
          Constructs an event to hold the current page's visibility state.
 
Method Summary
static VisibilityChangeEvent getVisibilityChangeEvent(AuRequest request)
          Converts an AU request to a visibility change event.
 java.lang.String getVisibilityState()
          Return the current page's visibility state.
 boolean isHidden()
          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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VisibilityChangeEvent

public VisibilityChangeEvent(java.lang.String name,
                             boolean hidden,
                             java.lang.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 Detail

getVisibilityChangeEvent

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


getVisibilityState

public java.lang.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.



Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo