public interface CellEditor
限定符和类型 | 方法和说明 |
---|---|
void |
addCellEditorListener(CellEditorListener cellEditorListener)
Adds a listener to the list that's notified when the editor
stops, or cancels editing.
|
void |
cancelCellEditing()
Tells the editor to cancel editing and not accept any partially
edited value.
|
java.awt.Component |
getCellEditorComponent(Grid grid,
TemplateCellElement cellElement,
int resolution)
Sets an initial
cellElement for the editor. |
java.lang.Object |
getCellEditorValue()
Returns the value contained in the editor.
|
java.awt.Point |
getLocationOnCellElement()
Gets the location of this component in the form of a point
specifying the component's top-left corner in the CellElement's
coordinate space.
|
void |
removeCellEditorListener(CellEditorListener cellEditorListener)
Removes a listener from the list that's notified
|
void |
setLocationOnCellElement(java.awt.Point loc)
Sets the location of this component in the form of a point
specifying the component's top-left corner in the CellElement's
coordinate space.
|
boolean |
stopCellEditing()
Tells the editor to stop editing and accept any partially edited
value as the value of the editor.
|
java.lang.Object getCellEditorValue() throws java.lang.Exception
java.lang.Exception
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 null
cellElement
- 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 resolutionjava.awt.Point getLocationOnCellElement()
Point
representing
the top-left corner of the component's bounds in the
coordinate space of the CellElementvoid setLocationOnCellElement(java.awt.Point loc)
loc
- an instance of Point
representing
the top-left corner of the component's bounds in the
coordinate space of the CellElementboolean stopCellEditing()
void cancelCellEditing()
void addCellEditorListener(CellEditorListener cellEditorListener)
cellEditorListener
- the CellEditorListenervoid removeCellEditorListener(CellEditorListener cellEditorListener)
cellEditorListener
- the CellEditorListener