public class NumberTextBox extends TextBox
TextBoxBase.TextAlignConstantValueBoxBase.TextAlignmentUIObject.DebugIdImpl, UIObject.DebugIdImplEnabledHasDirection.DirectionALIGN_CENTER, ALIGN_JUSTIFY, ALIGN_LEFT, ALIGN_RIGHTDEBUG_ID_PREFIX| Constructor and Description |
|---|
NumberTextBox(boolean allowFloatingPoint,
int maxLength,
int visibleLength) |
| Modifier and Type | Method and Description |
|---|---|
Number |
getNumber()
Get the numberic value of this box.
|
static NumberTextBox |
newFloatBox()
Creates a text box that accepts floating point numbers and has no max or visible character
length.
|
static NumberTextBox |
newFloatBox(int length)
Creates a text box that accepts floating point numbers and uses the supplied length as its
max and visible character length.
|
static NumberTextBox |
newFloatBox(int maxLength,
int visibleLength)
Creates a text box that accepts floating point numbers and has the specified max and visible
character length.
|
static NumberTextBox |
newIntBox()
Creates a text box that only accepts integers and has no max or visible character length.
|
static NumberTextBox |
newIntBox(int length)
Creates a text box that only accepts integers and uses the supplied length as its max and
visible character length.
|
static NumberTextBox |
newIntBox(int maxLength,
int visibleLength)
Creates a text box that only accepts integers and has the specified max and visible
character length.
|
void |
setNumber(Number value)
Sets the numeric contents of this text box.
|
NumberTextBox |
withValue(Number value)
Convenience method for setting a number and returning the text box in one step.
|
getMaxLength, getVisibleLength, setMaxLength, setVisibleLength, wrapaddChangeListener, getValue, setTextAlignmentaddChangeHandler, addValueChangeHandler, asEditor, cancelKey, getCursorPos, getDirection, getDirectionEstimator, getName, getSelectedText, getSelectionLength, getText, getValueOrThrow, isReadOnly, onBrowserEvent, removeChangeListener, selectAll, setAlignment, setCursorPos, setDirection, setDirectionEstimator, setDirectionEstimator, setKey, setName, setReadOnly, setSelectionRange, setText, setValue, setValueaddBlurHandler, addClickHandler, addClickListener, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragHandler, addDragLeaveHandler, addDragOverHandler, addDragStartHandler, addDropHandler, addFocusHandler, addFocusListener, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addKeyboardListener, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseListener, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addMouseWheelListener, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, getTabIndex, isEnabled, removeClickListener, removeFocusListener, removeKeyboardListener, removeMouseListener, removeMouseWheelListener, setAccessKey, setEnabled, setFocus, setTabIndexaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, fireEvent, getLayoutData, getParent, isAttached, removeFromParent, setLayoutData, sinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEventsequals, getClass, hashCode, notify, notifyAll, wait, wait, waitremoveChangeListeneraddKeyUpHandlerfireEventpublic NumberTextBox(boolean allowFloatingPoint,
int maxLength,
int visibleLength)
allowFloatingPoint - If true, a single decimal point is part of the allowed character
set. Otherwise, only [0-9]* is accepted.public static NumberTextBox newIntBox()
public static NumberTextBox newIntBox(int length)
public static NumberTextBox newIntBox(int maxLength, int visibleLength)
public static NumberTextBox newFloatBox()
public static NumberTextBox newFloatBox(int length)
public static NumberTextBox newFloatBox(int maxLength, int visibleLength)
public void setNumber(Number value)
public Number getNumber()
public NumberTextBox withValue(Number value)
Copyright © 2013. All Rights Reserved.