org.zkoss.zul
Class Timer

java.lang.Object
  extended by org.zkoss.zk.ui.AbstractComponent
      extended by org.zkoss.zk.ui.HtmlBasedComponent
          extended by org.zkoss.zul.impl.XulElement
              extended by org.zkoss.zul.Timer
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.sys.ComponentCtrl

public class Timer
extends XulElement

Fires one or more Event after a specified delay.

Timer is a special component that is invisible.

Notice that the timer won't fire any event until it is attached to a page.

Author:
tomyeh
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zk.ui.HtmlBasedComponent.ExtraCtrl
 
Field Summary
 
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
RS_NO_DISPLAY, RS_NO_HEIGHT, RS_NO_WIDTH
 
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
 
Constructor Summary
Timer()
           
Timer(int delay)
           
 
Method Summary
 int getDelay()
          Returns the delay, the number of milliseconds between successive action events.
 java.lang.String getOuterAttrs()
           
 boolean isChildable()
          Not childable.
 boolean isRepeats()
          Returns whether the timer shall send Event repeatly.
 boolean isRunning()
          Returns whether this timer is running.
 void setDelay(int delay)
          Sets the delay, the number of milliseconds between successive action events.
 void setRepeats(boolean repeats)
          Sets whether the timer shall send Event repeatly.
 void setRunning(boolean running)
          Start or stops the timer.
 boolean setVisible(boolean visible)
          Not allowd.
 void start()
          Starts the timer.
 void stop()
          Stops the timer.
 
Methods inherited from class org.zkoss.zul.impl.XulElement
getAction, getAllOnClickAttrs, getContext, getInnerAttrs, getPopup, getTooltip, setAction, setContext, setPopup, setTooltip
 
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
addEventListener, appendAsapAttr, focus, getDraggable, getDroppable, getHeight, getLeft, getRealStyle, getRealStyleFlags, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZIndex, isAsapRequired, newExtraCtrl, removeEventListener, setClass, setDraggable, setDroppable, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZIndex
 
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addEventHandler, addSharedAnnotationMap, addSharedEventHandlerMap, appendChild, applyProperties, clone, containsVariable, detach, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttributes, getAttributes, getChildren, getDefinition, getDesktop, getEventHandler, getExtraCtrl, getFellow, getFellowIfAny, getId, getListenerIterator, getMold, getMoldURI, getNamespace, getPage, getParent, getPropagatee, getRoot, getSpaceOwner, getUuid, getVariable, insertBefore, invalidate, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onDrawNewChild, onWrongValue, redraw, removeAttribute, removeAttribute, removeChild, response, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setComponentDefinition, setId, setMold, setPage, setParent, setVariable, smartUpdate, smartUpdate, smartUpdate, toString, unsetVariable
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Timer

public Timer()

Timer

public Timer(int delay)
Method Detail

getDelay

public int getDelay()
Returns the delay, the number of milliseconds between successive action events.

Default: 0 (immediately).


setDelay

public void setDelay(int delay)
              throws org.zkoss.zk.ui.WrongValueException
Sets the delay, the number of milliseconds between successive action events.

Throws:
org.zkoss.zk.ui.WrongValueException

isRepeats

public boolean isRepeats()
Returns whether the timer shall send Event repeatly.

Default: false.


setRepeats

public void setRepeats(boolean repeats)
Sets whether the timer shall send Event repeatly.


isRunning

public boolean isRunning()
Returns whether this timer is running.

Default: true.

See Also:
stop(), start()

setRunning

public void setRunning(boolean running)
Start or stops the timer.


stop

public void stop()
Stops the timer.


start

public void start()
Starts the timer.


getOuterAttrs

public java.lang.String getOuterAttrs()
Overrides:
getOuterAttrs in class XulElement

setVisible

public boolean setVisible(boolean visible)
Not allowd.

Specified by:
setVisible in interface org.zkoss.zk.ui.Component
Overrides:
setVisible in class org.zkoss.zk.ui.AbstractComponent

isChildable

public boolean isChildable()
Not childable.

Specified by:
isChildable in interface org.zkoss.zk.ui.Component
Overrides:
isChildable in class org.zkoss.zk.ui.AbstractComponent


Copyright © 2005-2007 Potix Corporation. All Rights Reserved.