com.sencha.gxt.cell.core.client.form
Class NumberInputCell<N extends Number>

java.lang.Object
  extended by com.google.gwt.cell.client.AbstractCell<C>
      extended by com.google.gwt.cell.client.AbstractEditableCell<C,V>
          extended by com.google.gwt.cell.client.AbstractInputCell<T,V>
              extended by com.sencha.gxt.cell.core.client.AbstractEventInputCell<T,FieldCell.FieldViewData>
                  extended by com.sencha.gxt.cell.core.client.form.FieldCell<T>
                      extended by com.sencha.gxt.cell.core.client.form.ValueBaseInputCell<T>
                          extended by com.sencha.gxt.cell.core.client.form.TriggerFieldCell<T>
                              extended by com.sencha.gxt.cell.core.client.form.TwinTriggerFieldCell<N>
                                  extended by com.sencha.gxt.cell.core.client.form.NumberInputCell<N>
All Implemented Interfaces:
Cell<N>, ResizableCell, ParseErrorEvent.HasParseErrorHandlers
Direct Known Subclasses:
SpinnerFieldCell

public class NumberInputCell<N extends Number>
extends TwinTriggerFieldCell<N>


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sencha.gxt.cell.core.client.form.TwinTriggerFieldCell
TwinTriggerFieldCell.TwinTriggerFieldAppearance
 
Nested classes/interfaces inherited from class com.sencha.gxt.cell.core.client.form.TriggerFieldCell
TriggerFieldCell.TriggerFieldAppearance
 
Nested classes/interfaces inherited from class com.sencha.gxt.cell.core.client.form.ValueBaseInputCell
ValueBaseInputCell.ValueBaseFieldAppearance
 
Nested classes/interfaces inherited from class com.sencha.gxt.cell.core.client.form.FieldCell
FieldCell.FieldAppearance, FieldCell.FieldAppearanceOptions, FieldCell.FieldViewData
 
Nested classes/interfaces inherited from interface com.google.gwt.cell.client.Cell
Cell.Context
 
Constructor Summary
NumberInputCell(NumberPropertyEditor<N> propertyEditor)
           
NumberInputCell(NumberPropertyEditor<N> propertyEditor, TwinTriggerFieldCell.TwinTriggerFieldAppearance appearance)
           
 
Method Summary
 String getBaseChars()
          Returns the base characters.
 String getDecimalSeparator()
          Returns the decimal separator.
 NumberPropertyEditor<N> getPropertyEditor()
          Returns the cell'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 setPropertyEditor(PropertyEditor<N> propertyEditor)
          Sets the field's property editor which is used to translate typed values to string, and string values back to typed values.
 
Methods inherited from class com.sencha.gxt.cell.core.client.form.TwinTriggerFieldCell
getAppearance
 
Methods inherited from class com.sencha.gxt.cell.core.client.form.TriggerFieldCell
finishEditing, isEditable, isHideTrigger, isMonitorTab, onBrowserEvent, render, setEditable, setHideTrigger, setMonitorTab, setSize
 
Methods inherited from class com.sencha.gxt.cell.core.client.form.ValueBaseInputCell
addParseErrorHandler, disable, enable, getCursorPos, getEmptyText, getInputElement, getName, getText, isAllowBlank, isSelectOnFocus, onEmpty, resetFocus, select, selectAll, setAllowBlank, setCursorPos, setEmptyText, setName, setSelectOnFocus, setText
 
Methods inherited from class com.sencha.gxt.cell.core.client.form.FieldCell
getHeight, getWidth, handlesSelection, isDisabled, isReadOnly, onValid, redrawOnResize, setHeight, setReadOnly, setSize, setWidth
 
Methods inherited from class com.sencha.gxt.cell.core.client.AbstractEventInputCell
addHandler, fireEvent, isDisableEvents, setDisableEvents
 
Methods inherited from class com.google.gwt.cell.client.AbstractInputCell
isEditing
 
Methods inherited from class com.google.gwt.cell.client.AbstractEditableCell
clearViewData, getViewData, setViewData
 
Methods inherited from class com.google.gwt.cell.client.AbstractCell
dependsOnSelection, getConsumedEvents, setValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumberInputCell

public NumberInputCell(NumberPropertyEditor<N> propertyEditor)

NumberInputCell

public NumberInputCell(NumberPropertyEditor<N> propertyEditor,
                       TwinTriggerFieldCell.TwinTriggerFieldAppearance appearance)
Method Detail

getBaseChars

public String getBaseChars()
Returns the base characters.

Returns:
the base characters

getDecimalSeparator

public String getDecimalSeparator()
Returns the decimal separator.

Returns:
the decimal separator

getPropertyEditor

public NumberPropertyEditor<N> getPropertyEditor()
Description copied from class: ValueBaseInputCell
Returns the cell's property editor.

Overrides:
getPropertyEditor in class ValueBaseInputCell<N extends Number>
Returns:
the property editor

isAllowDecimals

public boolean isAllowDecimals()
Returns true of decimal values are allowed.

Returns:
the allow decimal state

isAllowNegative

public boolean isAllowNegative()
Returns true if negative values are allowed.

Returns:
the allow negative value state

setAllowDecimals

public void setAllowDecimals(boolean allowDecimals)
Sets whether decimal value are allowed (defaults to true).

Parameters:
allowDecimals - true to allow negative values

setAllowNegative

public void setAllowNegative(boolean allowNegative)
Sets whether negative value are allowed to be entered into the field (defaults to true).

Parameters:
allowNegative - true to allow negative values

setBaseChars

public void setBaseChars(String baseChars)
Sets the base set of characters to evaluate as valid numbers (defaults to '0123456789').

Parameters:
baseChars - the base characters

setDecimalSeparator

public void setDecimalSeparator(String decimalSeparator)
Sets the decimal separator (defaults to LocaleInfo.getCurrentLocale().getNumberConstants().decimalSeparator()).

Parameters:
decimalSeparator - the decimal separator

setPropertyEditor

public void setPropertyEditor(PropertyEditor<N> propertyEditor)
Description copied from class: ValueBaseInputCell
Sets the field's property editor which is used to translate typed values to string, and string values back to typed values.

Overrides:
setPropertyEditor in class ValueBaseInputCell<N extends Number>
Parameters:
propertyEditor - the property editor


Copyright © 2012. All Rights Reserved.