public class TextFloatEditor extends AbstractFloatEditor
限定符和类型 | 字段和说明 |
---|---|
protected java.lang.String |
oldValue |
protected EditTextField |
textField |
构造器和说明 |
---|
TextFloatEditor()
Constructor.
|
限定符和类型 | 方法和说明 |
---|---|
protected void |
ajustTextStyle(Grid grid,
Style style,
java.lang.Object value,
int resolution) |
java.awt.Component |
getFloatEditorComponent(Grid grid,
FloatElement floatElement,
int resolution)
Sets an initial
floatElement for the editor. |
java.lang.Object |
getFloatEditorValue()
Gets the value of the FloatEditor.
|
FloatElement |
getFloatElement() |
Grid |
getGrid() |
int |
getMaxLength()
Gets the max length.
|
void |
setMaxLength(int maxLength)
Set the max length.
|
acceptKeyEventToStartFloatEditing, addFloatEditorListener, cancelFloatEditing, fireEditingCanceled, fireEditingStopped, removeFloatEditorListener, stopFloatEditing
protected EditTextField textField
protected java.lang.String oldValue
public Grid getGrid()
public FloatElement getFloatElement()
public int getMaxLength()
public void setMaxLength(int maxLength)
maxLength
- the new max length.public java.lang.Object getFloatEditorValue() throws java.lang.Exception
java.lang.Exception
public java.awt.Component getFloatEditorComponent(Grid grid, FloatElement floatElement, int resolution)
floatElement
for the editor. This will cause
the editor to stopFloatEditing
and lose any partially
edited value if the editor is editing when this method is called. Returns the component that should be added to the client's
Component
hierarchy. Once installed in the client's
hierarchy this component will then be able to draw and receive
user input.grid
- the Grid
that is asking the
editor to edit; can be null
floatElement
- the value of the float to be edited; it is
up to the specific editor to interpret
and draw the value.