Multislider"

From Documentation
(Created page with "{{ZKComponentReferencePageHeader}} = Multislider = *Demonstration: *Java API: [http://www.zkoss.org/javadoc/latest/zk/org/zkoss/zkmax/zul/Multislider.html Multislider] *JavaS...")
 
(20 intermediate revisions by 2 users not shown)
Line 2: Line 2:
  
 
= Multislider =
 
= Multislider =
 
 
*Demonstration:  
 
*Demonstration:  
 
*Java API: [http://www.zkoss.org/javadoc/latest/zk/org/zkoss/zkmax/zul/Multislider.html Multislider]  
 
*Java API: [http://www.zkoss.org/javadoc/latest/zk/org/zkoss/zkmax/zul/Multislider.html Multislider]  
 
*JavaScript API: [http://www.zkoss.org/javadoc/latest/jsdoc/zkmax/slider/Multislider.html Multislider]  
 
*JavaScript API: [http://www.zkoss.org/javadoc/latest/jsdoc/zkmax/slider/Multislider.html Multislider]  
*{{ZK EE}}
+
{{ZK EE}}
 +
since 9.0.0
  
 
= Employment/Purpose =
 
= Employment/Purpose =
 
+
A multislider component represents a slider with multiple ranges. It includes sliderbuttons, which can be used to let user select a start value and an end value. A multislider accepts a range of values starting from 0 to a maximum value you defined. The default maximum value is 100. You can change the maximum value by setting the max property. Notice that the value of max property is always larger than the value of min property.
This component synchronizes the scrolling position on a page or within ZK containers (Div, Window, etc.) with hyperlinks and buttons. It allows you both to navigate to desired ZK components in a page and highlight the current navigation link based on the current scroll position.
 
  
 
= Example =
 
= Example =
 +
[[Image:ZKComRef_Multislider.png]]
  
 
<source lang="xml" >
 
<source lang="xml" >
<zk xmlns:ca="client/attribute">
+
<zk>
   <anchornav name="a1" width="250px">
+
   <multislider>
        <listbox>
+
    <sliderbuttons startValue="10" endValue="70"/>
            <listitem><listcell><a ca:data-anchornav-target="$win1"> First Window </a></listcell></listitem>
+
    <sliderbuttons startValue="20" endValue="50"/>
            <listitem><listcell><a ca:data-anchornav-target="$win2"> Second Window </a></listcell></listitem>
+
    <sliderbuttons startValue="30" endValue="40"/>
            <listitem><listcell><a ca:data-anchornav-target="$win3"> Third Window </a></listcell></listitem>
+
  </multislider>
        </listbox>
+
   <multislider min="5" max="120" orient="vertical">
    </anchornav>
+
     <sliderbuttons startValue="5" endValue="100"/>
   <window id="win1" title="1. First Window">
+
    <sliderbuttons startValue="20" endValue="50"/>
     Hello world.
+
   </multislider>
  </window>
 
  <window id="win2" title="2. Second Window">
 
    Welcome to ZK world.
 
   </window>
 
 
</zk>
 
</zk>
 
</source>
 
</source>
  
By default, the Anchornav component will watch the scroll position of a page.
+
= Properties =
Other scrollable containers can be associated with a named Anchornav by setting the client-attribute: ca:data-anchornav-scroll.
 
  
For example:
+
== Disabled ==
<source lang="xml" >
+
If the multislider is disabled, users can not drag the slider buttons.
<div ca:data-anchornav-scroll="a1">
+
 
    <!-- other components -->
+
== Orient ==
</div>
+
Sets the orientation to either "horizontal" or "vertical" to display the multislider.
</source>
+
 
 +
== Marks ==
 +
Sets the marks information for displaying value marks.
 +
 
 +
It supports Map<Integer, String>. The key is represented as the value of multislider, and the value is represented as the displayed mark label.
 +
It means that each value mark could be displayed in different text.
  
A or Button components can be used as links and targets are specified by the ZK client-attribute ca:data-anchornav-target=[selector].
+
== MarkScale ==
For example, in Line 3 and Line 4, $win1 / $win2 select widgets by zk component id, win1 / win2.
+
Sets the marks information for displaying value marks.(Default: "20")
  
The JQuery-based selector syntax (#domId / .class / elementName) is extended by ZK specific selectors as seen above using $componentId or @componentName.
+
By default the value marks are displayed every 20 starting from the minimum value. (if min is 0, then it displays "0 20 40 60 ...")
  
= Properties =
+
== Max ==
 +
Defines the max value of the multislider. It can be changed by the max property.
 +
(Default: 100)
  
== Name ==
+
== Min ==
Set the name of Anchornav, it is only required when we want to spy scrolling in ZK containers instead of the whole page scrollbar.
+
Defines the minimal value of the multislider. It can be changed by the min property.
 +
(Default: 0)
  
== PositionFixed ==
+
== Step ==
Set whether to enable position fixed when anchornav is out of current view. When it is set to true, Anchornav will stay (float) on the same position of the page. (Default: true)
+
By default, the multislider will scroll to the position continuously when a user drags it. If you prefer to scroll a discrete fixed amount at each step, you can set the Step property.
  
= Supported Events =
+
== TooltipVisible ==
 +
The tooltip displays the value of slider buttons in the multislider.
 +
If tooltipvisible is true, the tooltips of the slider buttons will always be displayed.
 +
(Default: false)
  
*Inherited Supported Events: [[ZK_Component_Reference/Base_Components/LabelImageElement#Supported_Events | LabelImageElement]]
+
=Supported Events=
 +
*Inherited Supported Events: [[ZK_Component_Reference/Base_Components/XulElement#Supported_Events | XulElement]]
  
= Supported Children =
+
=Supported Children=
  
  *[[ZK_Component_Reference/Essential_Components/Nav | Nav]], [[ZK_Component_Reference/Essential_Components/Nav/Navitem  | Navitem]],[[ZK_Component_Reference/Essential_Components/Nav/Navseparator  | Navseparator]]
+
  *[[ZK_Component_Reference/Input/Sliderbuttons | Sliderbuttons]]
  
 
= Use Cases =
 
= Use Cases =
Line 81: Line 88:
 
| 9.0.0
 
| 9.0.0
 
| November, 2019
 
| November, 2019
| [http://www.zkoss.org/javadoc/latest/zk/org/zkoss/zkmax/zul/Anchornav.html Anchornav] was introduced.
+
| [http://www.zkoss.org/javadoc/latest/zk/org/zkoss/zkmax/zul/Multislider.html Multislider] was introduced.
 
|}
 
|}
  
 
{{ZKComponentReferencePageFooter}}
 
{{ZKComponentReferencePageFooter}}

Revision as of 03:10, 29 November 2019

Multislider

  • Available for ZK:
  • http://www.zkoss.org/product/zkhttp://www.zkoss.org/whyzk/zkeeVersion ee.png
since 9.0.0

Employment/Purpose

A multislider component represents a slider with multiple ranges. It includes sliderbuttons, which can be used to let user select a start value and an end value. A multislider accepts a range of values starting from 0 to a maximum value you defined. The default maximum value is 100. You can change the maximum value by setting the max property. Notice that the value of max property is always larger than the value of min property.

Example

ZKComRef Multislider.png

<zk>
  <multislider>
    <sliderbuttons startValue="10" endValue="70"/>
    <sliderbuttons startValue="20" endValue="50"/>
    <sliderbuttons startValue="30" endValue="40"/>
  </multislider>
  <multislider min="5" max="120" orient="vertical">
    <sliderbuttons startValue="5" endValue="100"/>
    <sliderbuttons startValue="20" endValue="50"/>
  </multislider>
</zk>

Properties

Disabled

If the multislider is disabled, users can not drag the slider buttons.

Orient

Sets the orientation to either "horizontal" or "vertical" to display the multislider.

Marks

Sets the marks information for displaying value marks.

It supports Map<Integer, String>. The key is represented as the value of multislider, and the value is represented as the displayed mark label. It means that each value mark could be displayed in different text.

MarkScale

Sets the marks information for displaying value marks.(Default: "20")

By default the value marks are displayed every 20 starting from the minimum value. (if min is 0, then it displays "0 20 40 60 ...")

Max

Defines the max value of the multislider. It can be changed by the max property. (Default: 100)

Min

Defines the minimal value of the multislider. It can be changed by the min property. (Default: 0)

Step

By default, the multislider will scroll to the position continuously when a user drags it. If you prefer to scroll a discrete fixed amount at each step, you can set the Step property.

TooltipVisible

The tooltip displays the value of slider buttons in the multislider. If tooltipvisible is true, the tooltips of the slider buttons will always be displayed. (Default: false)

Supported Events

Supported Children

* Sliderbuttons

Use Cases

Version Description Example Location
     

Version History

Last Update : 2019/11/29


Version Date Content
9.0.0 November, 2019 Multislider was introduced.



Last Update : 2019/11/29

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.