Package io.jmix.ui.component.impl
Class SliderImpl<V extends Number>
java.lang.Object
- 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>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEvent
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasOrientation
HasOrientation.Orientation
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasValue
HasValue.ValueChangeEvent<V>
-
Field Summary
Fields inherited from class io.jmix.ui.component.impl.AbstractField
editable, parentEditableChangeListener, validators, VALIDATORS_LIST_INITIAL_CAPACITY
Fields inherited from class io.jmix.ui.component.impl.AbstractValueComponent
internalValue, uiTestIdsSupport, valueBinding
Fields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
attachValueChangeListener
(JmixSlider<V> component) protected void
componentValueChanged
(Double prevComponentValue, Double newComponentValue, boolean isUserOriginated) protected V
convertFromDouble
(Double componentValue) protected Double
convertToDouble
(V value) protected JmixSlider<V>
getMax()
getMin()
int
boolean
void
setDataAwareComponentsTools
(DataAwareComponentsTools dataAwareComponentsTools) void
setDatatype
(Datatype<V> datatype) Sets the givendatatype
to the component.void
Sets the maximum value of the slider.void
Sets the minimum value of the slider.void
setOrientation
(HasOrientation.Orientation orientation) void
setResolution
(int resolution) Sets the number of digits after the decimal point.void
setUpdateValueOnClick
(boolean updateValueOnClick) Sets the slider to update its value when the user clicks on it.Methods inherited from class io.jmix.ui.component.impl.AbstractField
addValidator, getDatatypeConversionErrorMsg, getDefaultRequiredMessage, getErrorMessage, getRequiredMessage, getValidators, isEditable, isRequired, isValid, removeValidator, setEditable, setEditableToComponent, setParent, setRequired, setRequiredMessage, setupComponentErrorProvider, triggerValidators, validate
Methods inherited from class io.jmix.ui.component.impl.AbstractValueComponent
addValueChangeListener, commit, componentValueChanged, convertToModel, convertToPresentation, discard, fieldValueEquals, getValue, getValueSource, isBuffered, isModified, setBuffered, setUiTestId, setUiTestIdsSupport, setValue, setValueSource, setValueToPresentation, valueBindingActivated, valueBindingConnected
Methods inherited from class io.jmix.ui.component.impl.AbstractComponent
addAttachListener, addDetachListener, addStyleName, assignDebugId, attached, detached, getAlignment, getCaption, getComponent, getComposition, getContextHelpIconClickHandler, getContextHelpText, getDebugId, getDescription, getEventHub, getFrame, getHeight, getHeightSizeUnit, getHtmlSanitizer, getIcon, getIconName, getIconResource, getId, getParent, getStyleName, getUiComponentProperties, getUiProperties, getWidth, getWidthSizeUnit, getXmlDescriptor, hasSubscriptions, hasValidationError, isAttached, isCaptionAsHtml, isContextHelpTextHtmlEnabled, isDescriptionAsHtml, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, onContextHelpIconClick, publish, removeStyleName, sanitize, setAlignment, setApplicationContext, setCaption, setCaptionAsHtml, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setDebugId, setDescription, setDescriptionAsHtml, setEnabled, setFrame, setHeight, setHtmlSanitizerEnabled, setIcon, setIconFromSet, setId, setResponsive, setStyleName, setValidationError, setVisible, setWidth, setXmlDescriptor, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.ui.component.Component
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
Methods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrame
Methods inherited from interface io.jmix.ui.component.Component.Editable
isEditable, isEditableWithParent, setEditable
Methods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaption
Methods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescription
Methods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSet
Methods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
Methods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
Methods inherited from interface io.jmix.ui.component.HasValidator
addValidator, addValidators, getValidators, removeValidator
Methods inherited from interface io.jmix.ui.component.HasValue
addValueChangeListener, clear, getEmptyValue, getValue, isEmpty, setValue
Methods inherited from interface io.jmix.ui.component.data.HasValueSource
getValueSource, setValueSource
Methods inherited from interface io.jmix.ui.component.Requirable
getRequiredMessage, isRequired, setRequired, setRequiredMessage
Methods inherited from interface io.jmix.ui.component.Validatable
isValid, isValidateOnCommit, validate
-
Field Details
-
datatype
-
dataAwareComponentsTools
-
-
Constructor Details
-
SliderImpl
public SliderImpl()
-
-
Method Details
-
createComponent
-
setDataAwareComponentsTools
@Autowired public void setDataAwareComponentsTools(DataAwareComponentsTools dataAwareComponentsTools) -
setMin
Description copied from interface:Slider
Sets the minimum value of the slider. -
getMin
-
setMax
Description copied from interface:Slider
Sets the maximum value of the slider. -
getMax
-
setResolution
public void setResolution(int resolution) Description copied from interface:Slider
Sets the number of digits after the decimal point.- Specified by:
setResolution
in interfaceSlider<V extends Number>
- Parameters:
resolution
- the number of digits after the decimal point
-
getResolution
public int getResolution()- Specified by:
getResolution
in interfaceSlider<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 interfaceSlider<V extends Number>
- Parameters:
updateValueOnClick
-true
to update the value of the slider on click
-
isUpdateValueOnCLick
public boolean isUpdateValueOnCLick()- Specified by:
isUpdateValueOnCLick
in interfaceSlider<V extends Number>
- Returns:
true
if the slider updates its value on click
-
getOrientation
- Specified by:
getOrientation
in interfaceHasOrientation
-
setOrientation
- Specified by:
setOrientation
in interfaceHasOrientation
-
getDatatype
- Specified by:
getDatatype
in interfaceHasDatatype<V extends Number>
- Returns:
- a datatype that is used by this component
-
setDatatype
Description copied from interface:HasDatatype
Sets the givendatatype
to the component. Its value will be formatted according to this datatype.- Specified by:
setDatatype
in interfaceHasDatatype<V extends Number>
- Parameters:
datatype
-Datatype
instance
-
loadDatatype
-
attachValueChangeListener
- Overrides:
attachValueChangeListener
in classAbstractField<JmixSlider<V extends Number>,
V extends Number, V extends Number>
-
componentValueChanged
-
convertFromDouble
- Throws:
ConversionException
-
convertToDouble
-