|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.sencha.gxt.widget.core.client.Component
com.sencha.gxt.widget.core.client.cell.CellComponent<T>
com.sencha.gxt.widget.core.client.form.Field<T>
com.sencha.gxt.widget.core.client.form.ValueBaseField<T>
com.sencha.gxt.widget.core.client.form.TriggerField<T>
com.sencha.gxt.widget.core.client.form.TwinTriggerField<N>
com.sencha.gxt.widget.core.client.form.NumberField<N>
N - the number typepublic class NumberField<N extends Number>
A numeric text field that provides automatic keystroke filtering to disallow non-numeric characters, and numeric validation to limit the value to a range of valid numbers.
A NumberPropertyEditor must be passed at construction which is used to convert strings to typed number and from typed numbers to strings.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.sencha.gxt.widget.core.client.form.Field |
|---|
Field.FieldStyles |
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
| Nested classes/interfaces inherited from interface com.google.gwt.i18n.client.HasDirection |
|---|
HasDirection.Direction |
| Field Summary |
|---|
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
NumberField(NumberInputCell<N> cell,
NumberPropertyEditor<N> editor)
Creates a new number field. |
|
NumberField(NumberPropertyEditor<N> editor)
Creates a new number field. |
|
| Method Summary | |
|---|---|
String |
getBaseChars()
Returns the base characters. |
NumberInputCell<N> |
getCell()
Get the Cell wrapped by this widget. |
String |
getDecimalSeparator()
Returns the decimal separator. |
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 to be entered into the field (defaults to true). |
void |
setBaseChars(String baseChars)
Sets the base set of characters to evaluate as valid numbers (defaults to '0123456789'). |
void |
setDecimalSeparator(String decimalSeparator)
Sets the decimal separator (defaults to LocaleInfo.getCurrentLocale().getNumberConstants().decimalSeparator()). |
void |
setFormat(NumberFormat format)
Sets the cell's number formatter. |
| Methods inherited from class com.sencha.gxt.widget.core.client.form.TwinTriggerField |
|---|
addTwinTriggerClickHandler |
| Methods inherited from class com.sencha.gxt.widget.core.client.form.TriggerField |
|---|
addTriggerClickHandler, isEditable, isMonitorTab, setEditable, setHideTrigger, setMonitorTab |
| Methods inherited from class com.sencha.gxt.widget.core.client.form.ValueBaseField |
|---|
addChangeHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addParseErrorHandler, getCurrentValue, getCursorPos, getDirection, getDirectionEstimator, getEmptyText, getSelectedText, getSelectionLength, getText, getValueOrThrow, isAllowBlank, isCurrentValid, isCurrentValid, isSelectOnFocus, select, selectAll, setAllowBlank, setCursorPos, setDirection, setDirectionEstimator, setDirectionEstimator, setEmptyText, setId, setPropertyEditor, setReadOnly, setSelectionRange, setSelectOnFocus, setText, setValue, validateCurrent |
| Methods inherited from class com.sencha.gxt.widget.core.client.form.Field |
|---|
addInvalidHandler, addValidator, addValidHandler, addValueChangeHandler, clear, clearInvalid, finishEditing, flush, forceInvalid, getErrorSupport, getName, getValidateOnBlur, getValidationDelay, getValidators, isAutoValidate, isEditing, isReadOnly, isValid, isValid, markInvalid, onBrowserEvent, onPropertyChange, removeValidator, reset, setAutoValidate, setDelegate, setErrorSupport, setName, setOriginalValue, setValidateOnBlur, setValidationDelay, setValue, showErrors, validate, validate |
| Methods inherited from class com.sencha.gxt.widget.core.client.cell.CellComponent |
|---|
getElement, getKeyProvider, getValue, redraw, setValue |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, getLayoutData, getParent, isAttached, removeFromParent, setLayoutData, sinkEvents |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, removeStyleName, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, sinkBitlessEvent, toString, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
|---|
fireEvent |
| Methods inherited from interface com.google.gwt.user.client.ui.IsWidget |
|---|
asWidget |
| Methods inherited from interface com.google.gwt.user.client.TakesValue |
|---|
getValue |
| Methods inherited from interface com.google.gwt.user.client.ui.HasValue |
|---|
getValue, setValue |
| Constructor Detail |
|---|
public NumberField(NumberInputCell<N> cell,
NumberPropertyEditor<N> editor)
cell - the number input celleditor - the property editor@UiConstructor public NumberField(NumberPropertyEditor<N> editor)
editor - the property editor| Method Detail |
|---|
public String getBaseChars()
public NumberInputCell<N> getCell()
CellComponentCell wrapped by this widget.
getCell in class TriggerField<N extends Number>Cell being wrappedpublic String getDecimalSeparator()
public NumberPropertyEditor<N> getPropertyEditor()
ValueBaseField
getPropertyEditor in class ValueBaseField<N extends Number>public boolean isAllowDecimals()
public boolean isAllowNegative()
public void setAllowDecimals(boolean allowDecimals)
allowDecimals - true to allow decimal valuespublic void setAllowNegative(boolean allowNegative)
MinNumberValidator for that.
allowNegative - true to allow negative valuespublic void setBaseChars(String baseChars)
baseChars - the base characterspublic void setDecimalSeparator(String decimalSeparator)
decimalSeparator - the decimal separatorpublic void setFormat(NumberFormat format)
format - the format
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||