public class SliderImpl<V extends java.lang.Number> extends AbstractField<JmixSlider<V>,V,V> implements Slider<V>
HasValue.ValueChangeEvent<V>
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
HasContextHelp.ContextHelpIconClickEvent
HasOrientation.Orientation
Modifier and Type | Field and Description |
---|---|
protected DataAwareComponentsTools |
dataAwareComponentsTools |
protected io.jmix.core.metamodel.datatype.Datatype<V> |
datatype |
editable, parentEditableChangeListener, validators, VALIDATORS_LIST_INITIAL_CAPACITY
internalValue, uiTestIdsSupport, valueBinding
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Constructor and Description |
---|
SliderImpl() |
Modifier and Type | Method and Description |
---|---|
protected void |
attachValueChangeListener(JmixSlider<V> component) |
protected void |
componentValueChanged(java.lang.Double prevComponentValue,
java.lang.Double newComponentValue,
boolean isUserOriginated) |
protected V |
convertFromDouble(java.lang.Double componentValue) |
protected java.lang.Double |
convertToDouble(V value) |
protected JmixSlider<V> |
createComponent() |
io.jmix.core.metamodel.datatype.Datatype<V> |
getDatatype() |
V |
getMax() |
V |
getMin() |
HasOrientation.Orientation |
getOrientation() |
int |
getResolution() |
boolean |
isUpdateValueOnCLick() |
protected io.jmix.core.metamodel.datatype.Datatype<V> |
loadDatatype() |
void |
setDataAwareComponentsTools(DataAwareComponentsTools dataAwareComponentsTools) |
void |
setDatatype(io.jmix.core.metamodel.datatype.Datatype<V> datatype)
Sets the given
datatype to the component. |
void |
setMax(V max)
Sets the maximum value of the slider.
|
void |
setMin(V min)
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.
|
addValidator, getDatatypeConversionErrorMsg, getDefaultRequiredMessage, getErrorMessage, getRequiredMessage, getValidators, isEditable, isRequired, isValid, removeValidator, setEditable, setEditableToComponent, setParent, setRequired, setRequiredMessage, setupComponentErrorProvider, triggerValidators, validate
addValueChangeListener, commit, componentValueChanged, convertToModel, convertToPresentation, discard, fieldValueEquals, getValue, getValueSource, isBuffered, isModified, setBuffered, setUiTestId, setUiTestIdsSupport, setValue, setValueSource, setValueToPresentation, valueBindingActivated, valueBindingConnected
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getValueSource, setValueSource
addValueChangeListener, clear, getEmptyValue, getValue, isEmpty, setValue
isEditable, isEditableWithParent, setEditable
getFrame, setFrame
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
isValid, isValidateOnCommit, validate
getIcon, setIcon, setIconFromSet
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
isCaptionAsHtml, setCaptionAsHtml
getCaption, setCaption
getDescription, setDescription
isDescriptionAsHtml, setDescriptionAsHtml
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
addValidator, addValidators, getValidators, removeValidator
getRequiredMessage, isRequired, setRequired, setRequiredMessage
protected io.jmix.core.metamodel.datatype.Datatype<V extends java.lang.Number> datatype
protected DataAwareComponentsTools dataAwareComponentsTools
protected JmixSlider<V> createComponent()
@Autowired public void setDataAwareComponentsTools(DataAwareComponentsTools dataAwareComponentsTools)
public void setMin(V min)
Slider
public V getMin()
public void setMax(V max)
Slider
public V getMax()
public void setResolution(int resolution)
Slider
setResolution
in interface Slider<V extends java.lang.Number>
resolution
- the number of digits after the decimal pointpublic int getResolution()
getResolution
in interface Slider<V extends java.lang.Number>
public void setUpdateValueOnClick(boolean updateValueOnClick)
Slider
By default this behavior is disabled.
setUpdateValueOnClick
in interface Slider<V extends java.lang.Number>
updateValueOnClick
- true
to update the value of the slider on clickpublic boolean isUpdateValueOnCLick()
isUpdateValueOnCLick
in interface Slider<V extends java.lang.Number>
true
if the slider updates its value on clickpublic HasOrientation.Orientation getOrientation()
getOrientation
in interface HasOrientation
public void setOrientation(HasOrientation.Orientation orientation)
setOrientation
in interface HasOrientation
@Nullable public io.jmix.core.metamodel.datatype.Datatype<V> getDatatype()
getDatatype
in interface HasDatatype<V extends java.lang.Number>
public void setDatatype(io.jmix.core.metamodel.datatype.Datatype<V> datatype)
HasDatatype
datatype
to the component. Its value will be formatted according to this
datatype.setDatatype
in interface HasDatatype<V extends java.lang.Number>
datatype
- Datatype
instanceprotected io.jmix.core.metamodel.datatype.Datatype<V> loadDatatype()
protected void attachValueChangeListener(JmixSlider<V> component)
attachValueChangeListener
in class AbstractField<JmixSlider<V extends java.lang.Number>,V extends java.lang.Number,V extends java.lang.Number>
protected void componentValueChanged(java.lang.Double prevComponentValue, java.lang.Double newComponentValue, boolean isUserOriginated)
protected V convertFromDouble(java.lang.Double componentValue) throws ConversionException
ConversionException
protected java.lang.Double convertToDouble(V value)