Class JmixIntegerSlider

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.AbstractField<com.vaadin.flow.component.slider.IntegerSlider,Integer>
com.vaadin.flow.component.AbstractSinglePropertyField<com.vaadin.flow.component.slider.IntegerSlider,Integer>
com.vaadin.flow.component.slider.IntegerSlider
io.jmix.flowui.component.slider.JmixIntegerSlider
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.BlurNotifier<com.vaadin.flow.component.slider.IntegerSlider>, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.Focusable<com.vaadin.flow.component.slider.IntegerSlider>, com.vaadin.flow.component.FocusNotifier<com.vaadin.flow.component.slider.IntegerSlider>, com.vaadin.flow.component.HasAriaDescription, com.vaadin.flow.component.HasAriaLabel, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasHelper, com.vaadin.flow.component.HasLabel, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasValidation, com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.slider.IntegerSlider,Integer>,Integer>, com.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.slider.IntegerSlider,Integer>,Integer>, com.vaadin.flow.component.KeyNotifier, com.vaadin.flow.component.shared.HasTooltip, com.vaadin.flow.component.shared.HasValidationProperties, com.vaadin.flow.component.shared.InputField<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.slider.IntegerSlider,Integer>,Integer>, com.vaadin.flow.data.value.HasValueChangeMode, HasRequired, SupportsStatusChangeHandler<JmixIntegerSlider>, SupportsValidation<Integer>, SupportsValueSource<Integer>, Serializable, org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware

public class JmixIntegerSlider extends com.vaadin.flow.component.slider.IntegerSlider implements SupportsValueSource<Integer>, SupportsValidation<Integer>, SupportsStatusChangeHandler<JmixIntegerSlider>, HasRequired, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.vaadin.flow.component.AbstractField

    com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<C extends com.vaadin.flow.component.Component,V>

    Nested classes/interfaces inherited from interface com.vaadin.flow.component.BlurNotifier

    com.vaadin.flow.component.BlurNotifier.BlurEvent<C extends com.vaadin.flow.component.Component>

    Nested classes/interfaces inherited from interface com.vaadin.flow.component.FocusNotifier

    com.vaadin.flow.component.FocusNotifier.FocusEvent<C extends com.vaadin.flow.component.Component>

    Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasValue

    com.vaadin.flow.component.HasValue.ValueChangeEvent<V>, com.vaadin.flow.component.HasValue.ValueChangeListener<E extends com.vaadin.flow.component.HasValue.ValueChangeEvent<?>>

    Nested classes/interfaces inherited from interface io.jmix.flowui.component.SupportsStatusChangeHandler

    SupportsStatusChangeHandler.StatusContext<C extends com.vaadin.flow.component.Component>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.springframework.context.ApplicationContext
     
     

    Fields inherited from interface io.jmix.flowui.component.HasRequired

    PROPERTY_REQUIRED

    Fields inherited from interface com.vaadin.flow.data.value.HasValueChangeMode

    DEFAULT_CHANGE_TIMEOUT

    Fields inherited from interface io.jmix.flowui.component.SupportsValidation

    PROPERTY_ERROR_MESSAGE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.vaadin.flow.shared.Registration
    addValidator(Validator<? super Integer> validator)
    Adds a validator to the list of validators for the component.
    void
     
    com.vaadin.flow.dom.SignalBinding<Integer>
    bindMax(com.vaadin.flow.signals.Signal<Integer> arg0)
     
    com.vaadin.flow.dom.SignalBinding<Integer>
    bindMin(com.vaadin.flow.signals.Signal<Integer> arg0)
     
    com.vaadin.flow.dom.SignalBinding<Integer>
    bindStep(com.vaadin.flow.signals.Signal<Integer> arg0)
     
    void
     
    void
    Executes all registered validators against the current value of the component.
     
     
     
    @Nullable String
     
     
     
    @Nullable String
    Returns the custom validation message to be displayed if the component is marked as required and the validation fails due to a missing value.
     
    com.vaadin.flow.data.value.ValueChangeMode
     
    int
     
    @Nullable ValueSource<Integer>
    Returns the current ValueSource associated with this component.
    protected boolean
     
    protected void
     
    boolean
     
    boolean
     
    boolean
     
    boolean
    Determines if the component is marked as required.
    protected boolean
     
    boolean
     
    protected boolean
     
    void
    setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
     
    void
     
    void
     
    void
     
    void
    setErrorMessage(@Nullable String errorMessage)
     
    void
    setInvalid(boolean invalid)
    Sets invalid state to the field considering result of field validation.
    void
     
    void
     
    void
    setMinMaxVisible(boolean arg0)
     
    void
    setRequired(boolean required)
    Sets the required property for the component.
    void
    setRequiredIndicatorVisible(boolean requiredIndicatorVisible)
     
    void
    setRequiredMessage(@Nullable String requiredMessage)
    Sets a message that will be displayed or logged when a required field or input is not provided.
    void
    Sets a callback to be used to handle component status changes, e.g.
    void
     
    void
    setValue(@Nullable Integer value)
    void
    setValueAlwaysVisible(boolean arg0)
     
    void
    setValueChangeMode(com.vaadin.flow.data.value.ValueChangeMode arg0)
     
    void
     
    void
    setValueSource(@Nullable ValueSource<Integer> valueSource)
    Sets a ValueSource for this component, allowing it to bind its value to a specified data source.
    protected void
     

    Methods inherited from class com.vaadin.flow.component.AbstractSinglePropertyField

    getSynchronizationRegistration, setPresentationValue, setSynchronizedEvent

    Methods inherited from class com.vaadin.flow.component.AbstractField

    addValueChangeListener, bindValue, getEmptyValue, getValue, setModelValue, valueEquals

    Methods inherited from class com.vaadin.flow.component.Component

    addListener, bindVisible, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTestId, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setTestId, setVisible, whenAttached

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.BlurNotifier

    addBlurListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.Focusable

    addFocusShortcut, blur, focus, focus, getTabIndex, setTabIndex

    Methods inherited from interface com.vaadin.flow.component.FocusNotifier

    addFocusListener

    Methods inherited from interface com.vaadin.flow.component.HasAriaDescription

    setAriaDescribedBy

    Methods inherited from interface com.vaadin.flow.component.HasAriaLabel

    setAriaLabelledBy

    Methods inherited from interface com.vaadin.flow.component.HasElement

    getElement

    Methods inherited from interface com.vaadin.flow.component.HasEnabled

    bindEnabled, isEnabled, setEnabled

    Methods inherited from interface com.vaadin.flow.component.HasHelper

    bindHelperText, getHelperComponent, getHelperText, setHelperComponent, setHelperText

    Methods inherited from interface com.vaadin.flow.component.HasLabel

    getLabel, setLabel

    Methods inherited from interface com.vaadin.flow.component.HasSize

    bindHeight, bindWidth, getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, bindClassName, bindClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName

    Methods inherited from interface com.vaadin.flow.component.shared.HasTooltip

    getTooltip, setTooltipMarkdown, setTooltipText

    Methods inherited from interface com.vaadin.flow.component.HasValidation

    setManualValidation

    Methods inherited from interface com.vaadin.flow.component.HasValue

    addValueChangeListener, bindValue, getEmptyValue, getOptionalValue, getValue

    Methods inherited from interface com.vaadin.flow.component.HasValueAndElement

    bindReadOnly, bindRequiredIndicatorVisible, isReadOnly, isRequiredIndicatorVisible, setReadOnly

    Methods inherited from interface com.vaadin.flow.component.KeyNotifier

    addKeyDownListener, addKeyDownListener, addKeyPressListener, addKeyPressListener, addKeyUpListener, addKeyUpListener
  • Field Details

    • applicationContext

      protected org.springframework.context.ApplicationContext applicationContext
    • fieldDelegate

      protected IntegerSliderDelegate fieldDelegate
  • Constructor Details

    • JmixIntegerSlider

      public JmixIntegerSlider()
  • Method Details

    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • initComponent

      protected void initComponent()
    • createFieldDelegate

      protected IntegerSliderDelegate createFieldDelegate()
    • getRequiredMessage

      public @Nullable String getRequiredMessage()
      Description copied from interface: HasRequired
      Returns the custom validation message to be displayed if the component is marked as required and the validation fails due to a missing value.
      Specified by:
      getRequiredMessage in interface HasRequired
      Returns:
      the required message set for the component, or null if no message is defined
    • setRequiredMessage

      public void setRequiredMessage(@Nullable String requiredMessage)
      Description copied from interface: HasRequired
      Sets a message that will be displayed or logged when a required field or input is not provided.
      Specified by:
      setRequiredMessage in interface HasRequired
      Parameters:
      requiredMessage - the message to be set for required fields. If null, the default message or no message will be used.
    • addValidator

      public com.vaadin.flow.shared.Registration addValidator(Validator<? super Integer> validator)
      Description copied from interface: SupportsValidation
      Adds a validator to the list of validators for the component. The provided validator will be used to validate the value of the component during validation execution.
      Specified by:
      addValidator in interface SupportsValidation<Integer>
      Parameters:
      validator - the validator to be added; should not be null
      Returns:
      a Registration object that allows removing the added validator
    • executeValidators

      public void executeValidators() throws ValidationException
      Description copied from interface: SupportsValidation
      Executes all registered validators against the current value of the component. If any of the validators fail, a ValidationException is thrown to indicate the failure. The exact behavior and order of validation depend on the validators added.
      Specified by:
      executeValidators in interface SupportsValidation<Integer>
      Throws:
      ValidationException - if validation fails for one or more validators
    • validate

      protected void validate()
    • getValueSource

      public @Nullable ValueSource<Integer> getValueSource()
      Description copied from interface: SupportsValueSource
      Returns the current ValueSource associated with this component.
      Specified by:
      getValueSource in interface SupportsValueSource<Integer>
      Returns:
      the associated ValueSource, or null if no value source is set
    • setValueSource

      public void setValueSource(@Nullable ValueSource<Integer> valueSource)
      Description copied from interface: SupportsValueSource
      Sets a ValueSource for this component, allowing it to bind its value to a specified data source.
      Specified by:
      setValueSource in interface SupportsValueSource<Integer>
      Parameters:
      valueSource - the ValueSource to be associated with this component, or null to remove the current association
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.slider.IntegerSlider,Integer>,Integer>
      Overrides:
      isEmpty in class com.vaadin.flow.component.AbstractField<com.vaadin.flow.component.slider.IntegerSlider,Integer>
    • setValue

      public void setValue(@Nullable Integer value)

      The component cannot represent an absent value, so null clears the component, i.e. sets the value to the minimum value.

      Specified by:
      setValue in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.slider.IntegerSlider,Integer>,Integer>
      See Also:
    • clear

      public void clear()

      Sets the value to the minimum value and makes the component empty. A bound component clears its value source as well.

      Specified by:
      clear in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.slider.IntegerSlider,Integer>,Integer>
      See Also:
    • setRequired

      public void setRequired(boolean required)
      Description copied from interface: HasRequired
      Sets the required property for the component. When a component is marked as required, it indicates that a value must be provided for the component in order to pass validation.
      Specified by:
      setRequired in interface HasRequired
      Parameters:
      required - a boolean value indicating whether the component is marked as required. true to mark the component as required, false otherwise.
    • setRequiredIndicatorVisible

      public void setRequiredIndicatorVisible(boolean requiredIndicatorVisible)
      Specified by:
      setRequiredIndicatorVisible in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.slider.IntegerSlider,Integer>,Integer>
      Specified by:
      setRequiredIndicatorVisible in interface com.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.slider.IntegerSlider,Integer>,Integer>
    • isRequired

      public boolean isRequired()
      Description copied from interface: HasRequired
      Determines if the component is marked as required.
      Specified by:
      isRequired in interface HasRequired
      Returns:
      true if the component is required, false otherwise
    • isInvalid

      public boolean isInvalid()
      Specified by:
      isInvalid in interface com.vaadin.flow.component.HasValidation
      Specified by:
      isInvalid in interface com.vaadin.flow.component.shared.HasValidationProperties
    • setInvalid

      public void setInvalid(boolean invalid)
      Description copied from interface: SupportsValidation
      Sets invalid state to the field considering result of field validation.
      • Invalid - false and validation passed - false = field is invalid
      • Invalid - false and validation passed - true = field is valid
      • Invalid - true and validation passed - false = field is invalid
      • Invalid - true and validation passed - true = field is invalid
      Specified by:
      setInvalid in interface com.vaadin.flow.component.HasValidation
      Specified by:
      setInvalid in interface com.vaadin.flow.component.shared.HasValidationProperties
      Specified by:
      setInvalid in interface SupportsValidation<Integer>
      Parameters:
      invalid - whether field should be invalid
    • getErrorMessage

      public @Nullable String getErrorMessage()
      Specified by:
      getErrorMessage in interface com.vaadin.flow.component.HasValidation
      Specified by:
      getErrorMessage in interface com.vaadin.flow.component.shared.HasValidationProperties
      Specified by:
      getErrorMessage in interface SupportsValidation<Integer>
    • setErrorMessage

      public void setErrorMessage(@Nullable String errorMessage)
      Specified by:
      setErrorMessage in interface com.vaadin.flow.component.HasValidation
      Specified by:
      setErrorMessage in interface com.vaadin.flow.component.shared.HasValidationProperties
      Specified by:
      setErrorMessage in interface SupportsValidation<Integer>
    • setStatusChangeHandler

      public void setStatusChangeHandler(@Nullable Consumer<SupportsStatusChangeHandler.StatusContext<JmixIntegerSlider>> handler)
      Description copied from interface: SupportsStatusChangeHandler
      Sets a callback to be used to handle component status changes, e.g. validation messages set by HasValidation.setErrorMessage(String).
      Specified by:
      setStatusChangeHandler in interface SupportsStatusChangeHandler<JmixIntegerSlider>
      Parameters:
      handler - a handler to set
    • setMax

      public void setMax(Integer max)
    • setMin

      public void setMin(Integer min)
    • setAriaLabel

      public void setAriaLabel(String arg0)
      Specified by:
      setAriaLabel in interface com.vaadin.flow.component.HasAriaLabel
    • getAriaLabel

      public Optional<String> getAriaLabel()
      Specified by:
      getAriaLabel in interface com.vaadin.flow.component.HasAriaLabel
    • setAriaLabelledBy

      public void setAriaLabelledBy(String arg0)
      Specified by:
      setAriaLabelledBy in interface com.vaadin.flow.component.HasAriaLabel
    • getAriaLabelledBy

      public Optional<String> getAriaLabelledBy()
      Specified by:
      getAriaLabelledBy in interface com.vaadin.flow.component.HasAriaLabel
    • setAriaDescribedBy

      public void setAriaDescribedBy(String arg0)
      Specified by:
      setAriaDescribedBy in interface com.vaadin.flow.component.HasAriaDescription
    • getAriaDescribedBy

      public Optional<String> getAriaDescribedBy()
      Specified by:
      getAriaDescribedBy in interface com.vaadin.flow.component.HasAriaDescription
    • isValueWithinMinMax

      protected boolean isValueWithinMinMax(Integer arg0)
    • isValueAlignedWithStep

      protected boolean isValueAlignedWithStep(Integer arg0)
    • getMin

      public Integer getMin()
    • getMax

      public Integer getMax()
    • getStep

      public Integer getStep()
    • setStep

      public void setStep(Integer arg0)
    • bindMin

      public com.vaadin.flow.dom.SignalBinding<Integer> bindMin(com.vaadin.flow.signals.Signal<Integer> arg0)
    • bindMax

      public com.vaadin.flow.dom.SignalBinding<Integer> bindMax(com.vaadin.flow.signals.Signal<Integer> arg0)
    • bindStep

      public com.vaadin.flow.dom.SignalBinding<Integer> bindStep(com.vaadin.flow.signals.Signal<Integer> arg0)
    • setValueAlwaysVisible

      public void setValueAlwaysVisible(boolean arg0)
    • isValueAlwaysVisible

      public boolean isValueAlwaysVisible()
    • setMinMaxVisible

      public void setMinMaxVisible(boolean arg0)
    • isMinMaxVisible

      public boolean isMinMaxVisible()
    • getValueChangeMode

      public com.vaadin.flow.data.value.ValueChangeMode getValueChangeMode()
      Specified by:
      getValueChangeMode in interface com.vaadin.flow.data.value.HasValueChangeMode
    • setValueChangeMode

      public void setValueChangeMode(com.vaadin.flow.data.value.ValueChangeMode arg0)
      Specified by:
      setValueChangeMode in interface com.vaadin.flow.data.value.HasValueChangeMode
    • setValueChangeTimeout

      public void setValueChangeTimeout(int arg0)
      Specified by:
      setValueChangeTimeout in interface com.vaadin.flow.data.value.HasValueChangeMode
    • getValueChangeTimeout

      public int getValueChangeTimeout()
      Specified by:
      getValueChangeTimeout in interface com.vaadin.flow.data.value.HasValueChangeMode
    • hasValidValue

      protected boolean hasValidValue()
      Overrides:
      hasValidValue in class com.vaadin.flow.component.AbstractSinglePropertyField<TComponent extends com.vaadin.flow.component.slider.SliderBase<TComponent,TValue,TNumber,TPresentation>,TValue>