N - the numeric field typepublic class SpinnerField<N extends Number> extends TwinTriggerField<N>
NumberPropertyEditor for number property editors you can use with
spinner field.| Modifier and Type | Class and Description |
|---|---|
protected class |
SpinnerField.DefaultSpinnerMessages |
static interface |
SpinnerField.SpinnerMessages
The locale-sensitive messages used by this class.
|
Field.FieldStyles| Modifier and Type | Field and Description |
|---|---|
protected SpinnerField.SpinnerMessages |
messages |
implforceInvalidText, hasFocus, name, originalValue, parseError, preventMark, validationTaskvalueUpdateradjustSize, allowTextSelection, cacheSizes, disableContextMenu, disabled, disabledStyle, ensureVisibilityOnSizing, height, hidden, lastSize, layer, left, mask, maskMessage, monitorWindowResize, pageX, pageY, resizeHandler, shim, tabIndex, toolTip, toolTipConfig, top, width, windowResizeDelay, windowResizeTask| Constructor and Description |
|---|
SpinnerField(NumberPropertyEditor<N> editor)
Creates a spinner field with the specified property editor.
|
SpinnerField(SpinnerFieldCell<N> cell)
Creates a spinner field with the specified cell.
|
| Modifier and Type | Method and Description |
|---|---|
HandlerRegistration |
addBeforeSelectionHandler(<any> handler) |
HandlerRegistration |
addSelectionHandler(<any> handler) |
SpinnerFieldCell<N> |
getCell()
Get the
Cell wrapped by this widget. |
Number |
getIncrement(Context context)
Sets the increment value.
|
Number |
getMaxValue()
Returns the fields max value.
|
SpinnerField.SpinnerMessages |
getMessages()
Returns the locale-sensitive messages used by this class.
|
Number |
getMinValue()
Returns the field's minimum value.
|
NumberPropertyEditor<N> |
getPropertyEditor()
Returns the field's property editor.
|
boolean |
isAllowDecimals()
Returns true of decimal values are allowed.
|
boolean |
isAllowNegative()
Returns true if negative values are allowed.
|
void |
setAllowDecimals(boolean allowDecimals)
Sets whether decimal value are allowed (defaults to true).
|
void |
setAllowNegative(boolean allowNegative)
Sets whether negative value are allowed.
|
void |
setIncrement(N increment)
Sets the increment that should be used (defaults to 1d).
|
void |
setMaxValue(N maxValue)
Sets the field's max allowable value.
|
void |
setMessages(SpinnerField.SpinnerMessages messages)
Sets the spinner field messages.
|
void |
setMinValue(Number minValue)
Sets the field's minimum allowed value.
|
protected boolean |
validateValue(N value) |
addTwinTriggerClickHandleraddTriggerClickHandler, isEditable, isFinishEditOnEnter, isMonitorTab, onBlur, onDetach, setEditable, setFinishEditOnEnter, setHideTrigger, setMonitorTabaddChangeHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addParseErrorHandler, clear, doAutoValidate, getCurrentValue, getCursorPos, getDirection, getDirectionEstimator, getEmptyText, getFocusEl, getImpl, getInputEl, getSelectedText, getSelectionLength, getText, getValueOrThrow, isAllowBlank, isClearValueOnParseError, isCurrentValid, isCurrentValid, isReadOnly, isSelectOnFocus, onCellParseError, onRedraw, select, selectAll, setAllowBlank, setClearValueOnParseError, setCursorPos, setDirection, setDirectionEstimator, setDirectionEstimator, setEmptyText, setId, setPropertyEditor, setReadOnly, setSelectionRange, setSelectOnFocus, setTabIndex, setText, setValue, validateCurrentaddInvalidHandler, addValidator, addValidHandler, addValueChangeHandler, clearInvalid, finishEditing, flush, forceInvalid, getErrors, getErrorSupport, getName, getOriginalValue, getValidateOnBlur, getValidationDelay, getValidators, isAutoValidate, isEditing, isValid, isValid, markInvalid, markInvalid, onBrowserEvent, onDisable, onEnable, onFocus, onKeyDown, onKeyPress, onKeyUp, onLogicalBlur, onLogicalFocus, onNavigationKey, onPropertyChange, removeValidator, reset, setAutoValidate, setDelegate, setErrors, setErrorSupport, setName, setOriginalValue, setValidateOnBlur, setValidationDelay, setValue, showErrors, validate, validatecreateContext, getElement, getKey, getKeyProvider, getValue, onAfterFirstAttach, onResize, redraw, redraw, setKeyProvider, setValueaddBeforeHideHandler, addBeforeShowContextMenuHandler, addBeforeShowHandler, addBlurHandler, addDisableHandler, addEnableHandler, addFocusHandler, addHideHandler, addMoveHandler, addResizeHandler, addShowContextMenuHandler, addShowHandler, addStyleDependentName, addStyleOnOver, adjustPosition, adjustSize, applyState, assertAfterRender, assertPreRender, blur, clearSizeCache, disable, disableContextMenu, disableEvents, enable, enableEvents, fireCancellableEvent, fireEvent, focus, getData, getFocusSupport, getHideMode, getId, getItemId, getOffsetHeight, getOffsetWidth, getPositionEl, getShadow, getShadowPosition, getStateId, getTabIndex, getToolTip, hide, hideShadow, hideToolTip, isAllowTextSelection, isAutoHeight, isAutoWidth, isDeferHeight, isEnabled, isMonitorWindowResize, isRendered, isStateful, isVisible, isVisible, mask, mask, notifyHide, notifyShow, onAttach, onHide, onHideContextMenu, onLoad, onPosition, onRightClick, onShow, onShowContextMenu, onUnload, onWindowResize, removeStyleDependentName, removeStyleOnOver, removeToolTip, setAllowTextSelection, setBorders, setBounds, setBounds, setContextMenu, setData, setDeferHeight, setEnabled, setHeight, setHeight, setHideMode, setItemId, setMonitorWindowResize, setPagePosition, setPixelSize, setPosition, setShadow, setShadowPosition, setSize, setStateful, setStateId, setStyleDependentName, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, show, sync, syncSize, unmaskclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddBlurHandlerprotected SpinnerField.SpinnerMessages messages
public SpinnerField(NumberPropertyEditor<N> editor)
editor - the property editor that increments, decrements and formats
the value.public SpinnerField(SpinnerFieldCell<N> cell)
cell - a numeric cell with up / down arrows that increment / decrement
the valuepublic HandlerRegistration addBeforeSelectionHandler(<any> handler)
public HandlerRegistration addSelectionHandler(<any> handler)
public SpinnerFieldCell<N> getCell()
CellComponentCell wrapped by this widget.getCell in class TriggerField<N extends Number>Cell being wrappedpublic Number getIncrement(Context context)
public Number getMaxValue()
public SpinnerField.SpinnerMessages getMessages()
public Number getMinValue()
public NumberPropertyEditor<N> getPropertyEditor()
ValueBaseFieldgetPropertyEditor in class ValueBaseField<N extends Number>public boolean isAllowDecimals()
public boolean isAllowNegative()
public void setAllowDecimals(boolean allowDecimals)
allowDecimals - true to allow negative valuespublic void setAllowNegative(boolean allowNegative)
allowNegative - true to allow negative valuespublic void setIncrement(N increment)
increment - the increment to set.public void setMaxValue(N maxValue)
maxValue - the max valuepublic void setMessages(SpinnerField.SpinnerMessages messages)
messages - the messagespublic void setMinValue(Number minValue)
minValue - the minimum valueprotected boolean validateValue(N value)
validateValue in class Field<N extends Number>Copyright © 2018. All rights reserved.