Class AbstractSlider<T>

    • Field Detail

      • options

        protected com.googlecode.wicket.jquery.core.Options options
      • label

        protected Label label
        the div on which the slider behavior will be applied to
      • labelId

        protected String labelId
    • Constructor Detail

      • AbstractSlider

        public AbstractSlider​(String id)
        Constructor
        Parameters:
        id - the markup id
      • AbstractSlider

        public AbstractSlider​(String id,
                              IModel<T> model)
        Constructor
        Parameters:
        id - the markup id
        model - the IModel
      • AbstractSlider

        public AbstractSlider​(String id,
                              IModel<T> model,
                              Label label)
        Constructor
        Parameters:
        id - the markup id
        model - the IModel
        label - Label on which the current slide value will be displayed
    • Method Detail

      • setRangeValidator

        public abstract AbstractSlider<T> setRangeValidator​(RangeValidator<Integer> validator)
        Adds a RangeValidator so slider value(s) are valid only if comprised between minimum and maximum.

        Warning: it does not define the minimum and maximum values the slider can slide on, but only valid ones.
        To define the minimum and maximum values the slider can slide on, use setMin(Integer) and setMax(Integer)

        Dev note: this method is marked as abstract to make sure the developer that will add the validator to the right input(s) in onInitialize()
        Parameters:
        validator - the RangeValidator
        Returns:
        this
      • setLabelId

        public final AbstractSlider<T> setLabelId​(String markupId)
        Sets the label's markupId on which the current slide value will be displayed.
        Warning: It cannot be set/changed once the Component has been initialized.
        Parameters:
        markupId - the label's markupId
        Returns:
        this
      • onConfigure

        public void onConfigure​(com.googlecode.wicket.jquery.core.JQueryBehavior behavior)
        Specified by:
        onConfigure in interface com.googlecode.wicket.jquery.core.IJQueryWidget
      • onBeforeRender

        public void onBeforeRender​(com.googlecode.wicket.jquery.core.JQueryBehavior behavior)
        Specified by:
        onBeforeRender in interface com.googlecode.wicket.jquery.core.IJQueryWidget
      • newWidgetBehavior

        public com.googlecode.wicket.jquery.core.JQueryBehavior newWidgetBehavior​(String selector)
        Specified by:
        newWidgetBehavior in interface com.googlecode.wicket.jquery.core.IJQueryWidget
      • newInputFragment

        protected Fragment newInputFragment​(String id)
        Gets a new Fragment containing the input
        Overridden methods should provide a Fragment containing input(s) when no input(s) has been specified in implementation constructors.
        Parameters:
        id - the markup id
        Returns:
        the empty-fragment by default
      • setMin

        public AbstractSlider<T> setMin​(Integer min)
        Sets the min value
        Parameters:
        min - the min value
        Returns:
        this, for chaining
      • setMax

        public AbstractSlider<T> setMax​(Integer max)
        Sets the max value
        Parameters:
        max - the max value
        Returns:
        this, for chaining
      • setStep

        public AbstractSlider<T> setStep​(Integer step)
        Sets the step value
        Parameters:
        step - the step value
        Returns:
        this, for chaining