javax.swing
Interface CellEditor

All Known Subinterfaces:
TableCellEditor, TreeCellEditor
All Known Implementing Classes:
AbstractCellEditor, DefaultCellEditor, DefaultTreeCellEditor

public interface CellEditor

Provides edit capabilities for components that display cells like JTable, JList and JTree.


Method Summary
 void addCellEditorListener(CellEditorListener listener)
          Registers a listener to receive ChangeEvent notifications from the CellEditor.
 void cancelCellEditing()
          Signals to the CellEditor that it should cancel editing.
 Object getCellEditorValue()
          Returns the current value for the CellEditor.
 boolean isCellEditable(EventObject event)
          Returns true if the specified event makes the editor editable, and false otherwise.
 void removeCellEditorListener(CellEditorListener listener)
          Deregisters a listener so that it no longer receives ChangeEvent notifications from the CellEditor.
 boolean shouldSelectCell(EventObject event)
          shouldSelectCell
 boolean stopCellEditing()
          Signals to the CellEditor that it should stop editing, accepting the current cell value, and returns true if the editor actually stops editing, and false otherwise.
 

Method Detail

getCellEditorValue

Object getCellEditorValue()
Returns the current value for the CellEditor.

Returns:
The value.

isCellEditable

boolean isCellEditable(EventObject event)
Returns true if the specified event makes the editor editable, and false otherwise.

Parameters:
event - the event.
Returns:
A boolean.

shouldSelectCell

boolean shouldSelectCell(EventObject event)
shouldSelectCell

Parameters:
event - TODO
Returns:
boolean

stopCellEditing

boolean stopCellEditing()
Signals to the CellEditor that it should stop editing, accepting the current cell value, and returns true if the editor actually stops editing, and false otherwise.

Returns:
A boolean.

cancelCellEditing

void cancelCellEditing()
Signals to the CellEditor that it should cancel editing.


addCellEditorListener

void addCellEditorListener(CellEditorListener listener)
Registers a listener to receive ChangeEvent notifications from the CellEditor.

Parameters:
listener - the listener.

removeCellEditorListener

void removeCellEditorListener(CellEditorListener listener)
Deregisters a listener so that it no longer receives ChangeEvent notifications from the CellEditor.

Parameters:
listener - the listener.