Class SliderImpl<V extends Number>

All Implemented Interfaces:
AttachNotifier, Component, Component.BelongToFrame, Component.Editable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper, HasValueSource<V>, Field<V>, HasContextHelp, HasDatatype<V>, HasDebugId, HasHtmlCaption, HasHtmlDescription, HasHtmlSanitizer, HasOrientation, HasValidator<V>, HasValue<V>, Requirable, Slider<V>, Validatable

public class SliderImpl<V extends Number> extends AbstractField<JmixSlider<V>,V,V> implements Slider<V>
  • Field Details

  • Constructor Details

    • SliderImpl

      public SliderImpl()
  • Method Details

    • createComponent

      protected JmixSlider<V> createComponent()
    • setDataAwareComponentsTools

      @Autowired public void setDataAwareComponentsTools(DataAwareComponentsTools dataAwareComponentsTools)
    • setMin

      public void setMin(V min)
      Description copied from interface: Slider
      Sets the minimum value of the slider.
      Specified by:
      setMin in interface Slider<V extends Number>
      Parameters:
      min - the minimum value of the slider
    • getMin

      public V getMin()
      Specified by:
      getMin in interface Slider<V extends Number>
      Returns:
      the minimum value of the slider
    • setMax

      public void setMax(V max)
      Description copied from interface: Slider
      Sets the maximum value of the slider.
      Specified by:
      setMax in interface Slider<V extends Number>
      Parameters:
      max - the maximum value of the slider
    • getMax

      public V getMax()
      Specified by:
      getMax in interface Slider<V extends Number>
      Returns:
      the maximum value of the slider
    • setResolution

      public void setResolution(int resolution)
      Description copied from interface: Slider
      Sets the number of digits after the decimal point.
      Specified by:
      setResolution in interface Slider<V extends Number>
      Parameters:
      resolution - the number of digits after the decimal point
    • getResolution

      public int getResolution()
      Specified by:
      getResolution in interface Slider<V extends Number>
      Returns:
      resolution the number of digits after the decimal point
    • setUpdateValueOnClick

      public void setUpdateValueOnClick(boolean updateValueOnClick)
      Description copied from interface: Slider
      Sets the slider to update its value when the user clicks on it.

      By default this behavior is disabled.

      Specified by:
      setUpdateValueOnClick in interface Slider<V extends Number>
      Parameters:
      updateValueOnClick - true to update the value of the slider on click
    • isUpdateValueOnCLick

      public boolean isUpdateValueOnCLick()
      Specified by:
      isUpdateValueOnCLick in interface Slider<V extends Number>
      Returns:
      true if the slider updates its value on click
    • getOrientation

      public HasOrientation.Orientation getOrientation()
      Specified by:
      getOrientation in interface HasOrientation
    • setOrientation

      public void setOrientation(HasOrientation.Orientation orientation)
      Specified by:
      setOrientation in interface HasOrientation
    • getDatatype

      @Nullable public Datatype<V> getDatatype()
      Specified by:
      getDatatype in interface HasDatatype<V extends Number>
      Returns:
      a datatype that is used by this component
    • setDatatype

      public void setDatatype(Datatype<V> datatype)
      Description copied from interface: HasDatatype
      Sets the given datatype to the component. Its value will be formatted according to this datatype.
      Specified by:
      setDatatype in interface HasDatatype<V extends Number>
      Parameters:
      datatype - Datatype instance
    • loadDatatype

      protected Datatype<V> loadDatatype()
    • attachValueChangeListener

      protected void attachValueChangeListener(JmixSlider<V> component)
      Overrides:
      attachValueChangeListener in class AbstractField<JmixSlider<V extends Number>,V extends Number,V extends Number>
    • componentValueChanged

      protected void componentValueChanged(Double prevComponentValue, Double newComponentValue, boolean isUserOriginated)
    • convertFromDouble

      protected V convertFromDouble(Double componentValue) throws ConversionException
      Throws:
      ConversionException
    • convertToDouble

      protected Double convertToDouble(V value)