Slider"
Jumperchen (talk | contribs) |
Jumperchen (talk | contribs) |
||
Line 3: | Line 3: | ||
= Slider = | = Slider = | ||
− | *Demonstration: [http://www.zkoss.org/zkdemo/ | + | *Demonstration: [http://www.zkoss.org/zkdemo/input/slider Slider] |
*Java API: <javadoc>org.zkoss.zul.Slider</javadoc> | *Java API: <javadoc>org.zkoss.zul.Slider</javadoc> | ||
*JavaScript API: <javadoc directory="jsdoc">zul.inp.Slider</javadoc> | *JavaScript API: <javadoc directory="jsdoc">zul.inp.Slider</javadoc> | ||
+ | *Style Guide: [[ZK_Style_Guide/XUL_Component_Specification/Slider | Slider]] | ||
= Employment/Purpose = | = Employment/Purpose = | ||
Line 26: | Line 27: | ||
</source> | </source> | ||
− | =Supported | + | =Supported Events= |
{| border="1" | width="100%" | {| border="1" | width="100%" | ||
Line 33: | Line 34: | ||
|- | |- | ||
| <center>onScroll</center> | | <center>onScroll</center> | ||
− | | '''Event: '''<javadoc>org.zkoss.zk.ui.event.ScrollEvent</javadoc> | + | | '''Event:''' <javadoc>org.zkoss.zk.ui.event.ScrollEvent</javadoc> |
− | |||
Denotes the content of a scrollable component has been scrolled by the user. | Denotes the content of a scrollable component has been scrolled by the user. | ||
− | |||
− | |||
|- | |- | ||
| <center>onScrolling</center> | | <center>onScrolling</center> | ||
− | | '''Event: '''<javadoc>org.zkoss.zk.ui.event.ScrollEvent</javadoc> | + | | '''Event:''' <javadoc>org.zkoss.zk.ui.event.ScrollEvent</javadoc> |
− | |||
Denotes that user is scrolling a scrollable component. Notice that the component's content (at the server) won't be changed until onScroll is received. Thus, you have to invoke the <tt>getPos</tt> method in the ScrollEvent class to retrieve the temporary position. | Denotes that user is scrolling a scrollable component. Notice that the component's content (at the server) won't be changed until onScroll is received. Thus, you have to invoke the <tt>getPos</tt> method in the ScrollEvent class to retrieve the temporary position. | ||
− | |||
|} | |} | ||
+ | *Inherited Supported Events: [[ZK_Component_Reference/Base_Components/XulElement#Supported_Events | XulElement]] | ||
− | =Supported | + | =Supported Molds= |
Available molds of a component are defined in lang.xml embedded in zul.jar. | Available molds of a component are defined in lang.xml embedded in zul.jar. | ||
{| border="1" | width="100%" | {| border="1" | width="100%" | ||
Line 64: | Line 61: | ||
=Supported Children= | =Supported Children= | ||
− | * | + | *None |
− | =Use | + | =Use Cases= |
{| border='1px' | width="100%" | {| border='1px' | width="100%" | ||
Line 77: | Line 74: | ||
=Version History= | =Version History= | ||
− | + | {{LastUpdated}} | |
{| border='1px' | width="100%" | {| border='1px' | width="100%" | ||
! Version !! Date !! Content | ! Version !! Date !! Content |
Revision as of 10:40, 19 November 2010
Slider
Employment/Purpose
A slider component represents a slider with slid and knob. It can be used to let user specify a value by scrolling. A slider accepts a range of value starting from 0 to 100. You could change the maximum allowed value by the maxpos property.
Example
<slider id="slider" orient="vertical"/>
<slider curpos="1" maxpos="20" />
Page Increment
By default, the slider will move to the position of the try on which an user clicks. If you prefer to move in a fixed amount (like the scrollbar does), you could specify the amount of value to move by use of Slider.setPageIncrement(int).
<slider pageIncrement="10"/>
Supported Events
Event: ScrollEvent
Denotes the content of a scrollable component has been scrolled by the user. | |
Event: ScrollEvent
Denotes that user is scrolling a scrollable component. Notice that the component's content (at the server) won't be changed until onScroll is received. Thus, you have to invoke the getPos method in the ScrollEvent class to retrieve the temporary position. |
- Inherited Supported Events: XulElement
Supported Molds
Available molds of a component are defined in lang.xml embedded in zul.jar.
Supported Children
*None
Use Cases
Version | Description | Example Location |
---|---|---|
Version History
Version | Date | Content |
---|---|---|
5.0.4 | August 2010 | Slider.setPageIncrement(int) is supported. |