Class Rangeslider

All Implemented Interfaces:
Serializable, Cloneable, Component, Disable, Scope, ComponentCtrl
Direct Known Subclasses:
Multislider

public class Rangeslider extends XulElement implements Disable
A rangeslider. Like ZK Slider, but it supports a range value in slider.
Since:
9.0.0
Author:
jameschu
See Also:
  • Field Details

  • Constructor Details

    • Rangeslider

      public Rangeslider()
  • Method Details

    • initSliderButtons

      protected void initSliderButtons()
    • getMin

      public int getMin()
      Returns the minimum value of the rangeslider.

      Default: 0.

    • setMin

      public void setMin(int min)
      Sets the minimum value of the rangeslider.
      Throws:
      WrongValueException - if negative value is passed
    • getMax

      public int getMax()
      Returns the maximum value of the rangeslider.

      Default: 100.

    • setMax

      public void setMax(int max)
      Sets the maximum value of the rangeslider.
      Throws:
      WrongValueException - if negative value is passed
    • getStep

      public int getStep()
      Returns the step of rangeslider. When the user drags the slider buttons, the buttons would increase/decrease value by the step count.

      Default: 1

    • setStep

      public void setStep(int step)
      Sets the step of rangeslider
      Parameters:
      step - the step of slider.
      Throws:
      WrongValueException - if non-positive minimum is passed
    • getStartValue

      public int getStartValue()
      Returns the start value of this rangeslider.

      Default: 0.

    • setStartValue

      public void setStartValue(int value)
      Sets the start value of this sliderbuttons.
      Parameters:
      value -
    • getEndValue

      public int getEndValue()
      Returns the end value of this rangeslider.

      Default: 0.

    • setEndValue

      public void setEndValue(int value)
      Sets the end value of this sliderbuttons.
      Parameters:
      value -
    • getMarkScale

      public int getMarkScale()
      Returns mark scale of the rangeslider. Refer to setMarkScale(int) for more details.
    • setMarkScale

      public void setMarkScale(int markScale)
      Sets the mark scale for displaying value marks.

      Default: 20. The value marks would be displayed every number value (ex. 20) start from the minimum value. (if min is 0, then display "0 20 40 ...")

      Notice that it's not allowed to use markScale and marks at the same time.

      Parameters:
      markScale - the value marks displaying scale
    • getMarks

      public Map<Integer,String> getMarks()
      Returns marks information map of the rangeslider. Refer to setMarks(java.util.Map<java.lang.Integer, java.lang.String>) for more details.
    • setMarks

      public void setMarks(Map<Integer,String> marks)
      Sets the marks information map for displaying value marks. In this map, the key represents the number value of slider, and the value represents the displayed scale text.

      Default: null.

      Parameters:
      marks - the value marks displaying information
    • isDisabled

      public boolean isDisabled()
      Returns whether it is disabled.

      Default: false.

      Specified by:
      isDisabled in interface Disable
    • setDisabled

      public void setDisabled(boolean disabled)
      Sets whether it is disabled.
      Specified by:
      setDisabled in interface Disable
      Parameters:
      disabled -
    • getOrient

      public String getOrient()
      Returns the orient.

      Default: "horizontal".

    • setOrient

      public void setOrient(String orient) throws WrongValueException

      Default : "horizontal"

      Parameters:
      orient - either "horizontal" or "vertical".
      Throws:
      WrongValueException
    • setTooltipVisible

      public void setTooltipVisible(boolean tooltipVisible)
      Sets whether it is tooltipVisible. If true, the tooltips of the slider buttons would be always visible.
      Parameters:
      tooltipVisible -
    • isTooltipVisible

      public boolean isTooltipVisible()
      Returns whether it is tooltipVisible. If true, the tooltips of the slider buttons would be always visible.

      Default: false.

    • beforeChildAdded

      public void beforeChildAdded(Component child, Component refChild)
      Description copied from class: AbstractComponent
      Default: does nothing.
      Specified by:
      beforeChildAdded in interface ComponentCtrl
      Overrides:
      beforeChildAdded in class AbstractComponent
      Parameters:
      child - the child to be added (never null).
      refChild - another child component that the new child will be inserted before it. If null, the new child will be the last child.
      See Also:
    • renderProperties

      protected void renderProperties(ContentRenderer renderer) throws IOException
      Description copied from class: HtmlBasedComponent
      Renders the content of this component, excluding the enclosing tags and children.

      See also ZK Client-side Reference: Property Rendering

      Overrides:
      renderProperties in class XulElement
      Throws:
      IOException
    • service

      public void service(AuRequest request, boolean everError)
      Processes an AU request.
      Specified by:
      service in interface ComponentCtrl
      Overrides:
      service in class HtmlBasedComponent
      everError - whether any error ever occurred before processing this request.
      See Also:
    • handleOtherButtonsValues

      protected void handleOtherButtonsValues(Sliderbuttons child)
    • getZclass

      public String getZclass()
      The default zclass is "z-rangeslider"
      Overrides:
      getZclass in class HtmlBasedComponent
      See Also: