public class WSlider extends WInputComponentWithValue<Decimal>
ComponentWithValue.ValueChangeListenerImpl, ComponentWithValue.ValueProperty<T>
refreshing
form, INTERNAL_STATE_RECORD_PROPERTY
Constructor and Description |
---|
WSlider()
Creates a new instance of decimal field.
|
Modifier and Type | Method and Description |
---|---|
protected com.vaadin.ui.AbstractField<?> |
createWidget()
Called once, to create the actual Vaadin component.
|
Decimal |
getMax() |
Decimal |
getMin() |
Decimal |
getResolution() |
com.vaadin.ui.Slider |
getWidget()
Gets the Vaadin representation of this component.
|
protected boolean |
isFullyInitialized() |
protected void |
restoreInternalState(Map<String,Object> state)
Restores the UI state of this component which was previously written
by
FormComponent.writeInternalState(Map) . |
void |
setMax(Decimal max)
Set maximal value of the slider.
|
void |
setMin(Decimal min)
Set minimal value of the slider.
|
void |
setOrientation(EnumerationImpl orientation)
Set the orientation of the slider.
|
void |
setResolution(Decimal resolution)
Set a new resolution for the slider.
|
protected void |
writeInternalState(Map<String,Object> state)
Writes the UI state of this component to the provided map.
|
addValidator, fireValueChanged, focus, getOnChange, getValidationErrors, inferValidator, isConvertible, isImmediate, isRequired, isValid, preventGC, removeAllValidators, setImmediate, setOnChange, setRequired
getBinding, getProperty, onPropertyValueSet, refresh, refreshBinding, setProperty
addDataErrorMessage, addStyleName, attach, call, clearDataErrorMessages, createEvent, equals, getCaption, getComponentAlignment, getContextClickHandler, getCustomErrorMessage, getDataErrorMessages, getDescription, getExpandRatio, getHasChildrenAdapter, getHeight, getIcon, getModelingId, getNamespace, getStyleName, getTabIndex, getWidth, hashCode, isEnabled, isReadOnly, isVisible, localize, markAsDirty, removeStyleName, restoreState, saveState, setCaption, setComponentAlignment, setContextClickHandler, setContextMenuItems, setCustomErrorMessage, setDescription, setEnabled, setExpandRatio, setHeight, setIcon, setReadOnly, setStyleName, setTabIndex, setVisible, setWidth, toString
protected com.vaadin.ui.AbstractField<?> createWidget()
FormComponent
createWidget
in class WInputComponentWithValue<Decimal>
public com.vaadin.ui.Slider getWidget()
FormComponent
getWidget
in class WInputComponentWithValue<Decimal>
public Decimal getMin()
public void setMin(Decimal min)
min
- public Decimal getMax()
public void setMax(Decimal max)
max
- public Decimal getResolution()
public void setResolution(Decimal resolution)
resolution
- public void setOrientation(EnumerationImpl orientation)
orientation
- - either horizontal or vertical orientation.protected boolean isFullyInitialized()
isFullyInitialized
in class ComponentWithValue<Decimal>
true
if the component was truly initialized e.g. widgets attach() method is fully finished. The
`getWidget().isAttached()` does the job for most components, but not all of them. Notably, decimal field initializes
locale *after* `isAttached` was set to true and attachment event was set - therefore neither of those reliably tells
when the component is fully initialized.protected void writeInternalState(Map<String,Object> state)
FormComponent
Many UI attributes such as size, caption, etc. are not held in the records but are stored exclusively in the Vaadin components. In the records the getter/setter methods of such attributes directly delegate to the underlying component. For the purposes of the Save Document/Todo use case the state of such attributes has to be preserved.
Subclasses should override this method. The overriding method should call
super.writeInternalState(state)
to store the state form the super
class as well. The attributes should be written to the provided state
parameter. The type of the values written to the state
can only by
Java representation of LSPS types. That is java.util.Date
,
java.lang.String
, Decimal
, RecordHolder
,
ListHolder
, ... The name of the attributes stored in the map
should be unique and should not collide with the names used by any
of the superclass. It is the responsibility of the overridden method to ensure
that.
Subclasses overriding this method should also override
FormComponent.restoreInternalState(Map)
and restore the state written
by this method.
writeInternalState
in class WInputComponentWithValue<Decimal>
state
- a map to which this method should write the component's UI state.FormComponent.restoreInternalState(Map)
,
FormComponent.saveState()
protected void restoreInternalState(Map<String,Object> state)
FormComponent
FormComponent.writeInternalState(Map)
.
Subclasses should override and call super.restoreInternalState(state);
restoreInternalState
in class WInputComponentWithValue<Decimal>
state
- a map of attributes and their valuesFormComponent.writeInternalState(Map)
Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.