org.zkoss.zul
Class Slider

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.Slider
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.sys.ComponentCtrl

public class Slider
extends XulElement

A slider.

Author:
tomyeh
See Also:
Serialized Form

Nested Class Summary
protected  class Slider.ExtraCtrl
          A utility class to implement AbstractComponent.getExtraCtrl().
 
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
Slider()
           
Slider(int curpos)
           
 
Method Summary
 int getCurpos()
          Returns the current position of the slider.
 int getMaxpos()
          Returns the maximum position of the slider.
 java.lang.String getOuterAttrs()
           
 int getPageIncrement()
          Returns the amount that the value of getCurpos() changes by when the tray of the scroll bar is clicked.
 boolean isChildable()
          Not childable.
protected  java.lang.Object newExtraCtrl()
           
 void setCurpos(int curpos)
          Sets the current position of the slider.
 void setMaxpos(int maxpos)
          Sets the maximum position of the slider.
 void setPageIncrement(int pginc)
          Sets the amount that the value of getCurpos() changes by when the tray of the scroll bar is clicked.
 
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, 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, setVisible, smartUpdate, smartUpdate, smartUpdate, toString, unsetVariable
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Slider

public Slider()

Slider

public Slider(int curpos)
Parameters:
curpos - the current position (default: 0)
Method Detail

getCurpos

public final int getCurpos()
Returns the current position of the slider.

Default: 0.


setCurpos

public final void setCurpos(int curpos)
                     throws org.zkoss.zk.ui.WrongValueException
Sets the current position of the slider. If negative, 0 is assumed. If larger than getMaxpos(), getMaxpos() is assumed.

Throws:
org.zkoss.zk.ui.WrongValueException

getMaxpos

public final int getMaxpos()
Returns the maximum position of the slider.

Default: 100.


setMaxpos

public final void setMaxpos(int maxpos)
                     throws org.zkoss.zk.ui.WrongValueException
Sets the maximum position of the slider.

Throws:
org.zkoss.zk.ui.WrongValueException - if non-positive maxpos is passed

getPageIncrement

public final int getPageIncrement()
Returns the amount that the value of getCurpos() changes by when the tray of the scroll bar is clicked.

Default: 10.


setPageIncrement

public final void setPageIncrement(int pginc)
                            throws org.zkoss.zk.ui.WrongValueException
Sets the amount that the value of getCurpos() changes by when the tray of the scroll bar is clicked.

Throws:
org.zkoss.zk.ui.WrongValueException

getOuterAttrs

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

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

newExtraCtrl

protected java.lang.Object newExtraCtrl()
Overrides:
newExtraCtrl in class org.zkoss.zk.ui.HtmlBasedComponent


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