|
|||||||||
| 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.extjs.gxt.ui.client.widget.Component
com.extjs.gxt.ui.client.widget.BoxComponent
com.extjs.gxt.ui.client.widget.form.Field<D>
com.extjs.gxt.ui.client.widget.form.TextField<java.lang.Number>
com.extjs.gxt.ui.client.widget.form.NumberField
public class NumberField
Numeric text field that provides automatic keystroke filtering and numeric validation.
When the field wraps any thing other than Double, either
setPropertyEditorType(Class) or
Field.setPropertyEditor(PropertyEditor) should be called with the
appropriate number type.
NumberField<Integer> field = new NumberField<Integer>;
field.setPropertyEdtiorType(Integer.class);
| Nested Class Summary | |
|---|---|
class |
NumberField.NumberFieldMessages
NumberField messages. |
| Nested classes/interfaces inherited from class com.extjs.gxt.ui.client.widget.form.TextField |
|---|
TextField.TextFieldMessages |
| Nested classes/interfaces inherited from class com.extjs.gxt.ui.client.widget.form.Field |
|---|
Field.FieldImages, Field.FieldMessages |
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
| Field Summary |
|---|
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
NumberField()
Creates a new number field. |
|
| Method Summary | |
|---|---|
boolean |
getAllowDecimals()
Returns true of decimal values are allowed. |
boolean |
getAllowNegative()
Returns true if negative values are allowed. |
java.lang.String |
getBaseChars()
Returns the base characters. |
com.google.gwt.i18n.client.NumberFormat |
getFormat()
Returns the field's number format. |
java.lang.Number |
getMaxValue()
Returns the fields max value. |
NumberField.NumberFieldMessages |
getMessages()
Returns the field's messages. |
java.lang.Number |
getMinValue()
Returns the field's minimum value. |
NumberPropertyEditor |
getPropertyEditor()
Returns the field's property editor. |
java.lang.Class<?> |
getPropertyEditorType()
Returns the number property editor number type. |
void |
setAllowDecimals(boolean allowDecimals)
Sets whether decimal value are allowed (defaults to true). |
void |
setAllowNegative(boolean allowNegative)
Sets whether negative value are allowed. |
void |
setBaseChars(java.lang.String baseChars)
Sets the base set of characters to evaluate as valid numbers (defaults to '0123456789'). |
void |
setFormat(com.google.gwt.i18n.client.NumberFormat format)
Sets the cell's number formatter. |
void |
setMaxValue(java.lang.Number maxValue)
Sets the field's max allowable value. |
void |
setMinValue(java.lang.Number minValue)
Sets the field's minimum allowed value. |
void |
setPropertyEditorType(java.lang.Class<?> type)
Specifies the number type used when converting a String to a Number instance (defaults to Double). |
| Methods inherited from class com.extjs.gxt.ui.client.widget.form.TextField |
|---|
getAllowBlank, getCursorPos, getMaxLength, getMinLength, getRegex, getSelectedText, getSelectionLength, getSelectOnFocus, getValidator, isPassword, select, selectAll, setAllowBlank, setCursorPos, setEmptyText, setMaxLength, setMinLength, setPassword, setRegex, setSelectionRange, setSelectOnFocus, setValidator, setValue |
| Methods inherited from class com.extjs.gxt.ui.client.widget.BoxComponent |
|---|
getBounds, getHeight, getHeight, getPosition, getShadow, getShadowOffset, getShadowPosition, getSize, getWidth, getWidth, isAutoHeight, isAutoWidth, isDeferHeight, isShim, setAutoHeight, setAutoWidth, setBounds, setBounds, setDeferHeight, setHeight, setHeight, setPagePosition, setPagePosition, setPixelSize, setPosition, setShadow, setShadowOffset, setShadowPosition, setShim, setSize, setSize, setWidth, setWidth, sync, syncSize |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
fireEvent, getParent, isAttached |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, setStylePrimaryName, setVisible, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NumberField()
| Method Detail |
|---|
public boolean getAllowDecimals()
public boolean getAllowNegative()
public java.lang.String getBaseChars()
public com.google.gwt.i18n.client.NumberFormat getFormat()
public java.lang.Number getMaxValue()
public NumberField.NumberFieldMessages getMessages()
Field
getMessages in class TextField<java.lang.Number>public java.lang.Number getMinValue()
public NumberPropertyEditor getPropertyEditor()
Field
getPropertyEditor in class Field<java.lang.Number>public java.lang.Class<?> getPropertyEditorType()
NumberPropertyEditor.setType(Class)public void setAllowDecimals(boolean allowDecimals)
allowDecimals - true to allow negative valuespublic void setAllowNegative(boolean allowNegative)
allowNegative - true to allow negative valuespublic void setBaseChars(java.lang.String baseChars)
baseChars - the base characterpublic void setFormat(com.google.gwt.i18n.client.NumberFormat format)
format - the formatpublic void setMaxValue(java.lang.Number maxValue)
maxValue - the max valuepublic void setMinValue(java.lang.Number minValue)
minValue - the min valuepublic void setPropertyEditorType(java.lang.Class<?> type)
type - the number type (Short, Integer, Long, Float, Double).
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||