public class TextCellEditor extends AbstractCellEditor
| 限定符和类型 | 字段和说明 |
|---|---|
protected java.lang.String |
oldValue |
protected EditTextField |
textField |
| 构造器和说明 |
|---|
TextCellEditor()
Constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
ajustTextStyle(Grid grid,
Style style,
java.lang.Object value,
int resolution) |
java.awt.Component |
getCellEditorComponent(Grid grid,
TemplateCellElement cellElement,
int resolution)
Sets an initial
cellElement for the editor. |
java.lang.Object |
getCellEditorValue()
Gets the value of the CellEditor.
|
Grid |
getGrid() |
int |
getMaxLength()
Gets the max length.
|
java.lang.String |
getOldValue() |
void |
setMaxLength(int maxLength)
Set the max length.
|
addCellEditorListener, cancelCellEditing, fireEditingCanceled, fireEditingStopped, getLocationOnCellElement, removeCellEditorListener, setLocationOnCellElement, stopCellEditingprotected EditTextField textField
protected java.lang.String oldValue
public Grid getGrid()
public int getMaxLength()
public void setMaxLength(int maxLength)
maxLength - the new max length.public java.lang.Object getCellEditorValue()
throws java.lang.Exception
java.lang.Exceptionpublic java.awt.Component getCellEditorComponent(Grid grid, TemplateCellElement cellElement, int resolution)
cellElement for the editor. This will cause
the editor to stopCellEditing 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 nullcellElement - the value of the cell to be edited; it is
up to the specific editor to interpret
and draw the value.resolution - the current screen resolutionpublic java.lang.String getOldValue()