- Inherits from:
- Object
- Implements:
- javax.swing.table.TableCellEditor
- javax.swing.CellEditor (javax.swing.table.TableCellEditor)
- Package:
- com.apple.client.eointerface
EOColumnEditor is an abstract class that implements generalized cell editing management for javax.swing.JTables. Swing specifies that JTable cell editing is performed by an object implementing the javax.swing.table.TableCellEditor interface. EOColumnEditor implements this interface in a generalized way, and concrete subclasses such as EOTextColumnEditor perform component-specific instantiation and event communication.
| Note: This class doesn't exist in the com.apple.yellow.eointerface package. |
The most important function of an EOColumnEditor instance is mediating between its Component and the EOTableColumnAssociation that's bound to the edited column. This mediation enables the validation of edited values that associations are required to perform.
Create a subclass of EOColumnEditor if you want to use a Component for JTable editing for which no EOColumnEditor is implemented.
javax.swing.table.TableCellEditor
addCellEditorListener(javax.swing.CellEditor)cancelCellEditing(javax.swing.CellEditor)- getCellEditorValue
getTableCellEditorComponent- isCellEditable
removeCellEditorListener(javax.swing.CellEditor)- shouldSelectCell
- stopCellEditing
- Instantiation
- createEditorComponent
- editingTableColumnAssociation
- editorComponent
- setCellEditorValue
- setEditorComponent
- Event handling
- beginEditing
- endEditing
beginEditingprotected void beginEditing()
getTableCellEditorComponent to
inform the receiver that editing has been requested and should begin
(shouldSelectCell is invoked only by mouse
clicks). EOColumnEditor's implementation sends associationDidBeginEditing to
the EODisplayGroup of the EOTableColumnAssociation that's bound
to the receiver's TableColumn; so subclasses should invoke super's
implementation before activating their Component.createEditorComponentprotected abstract java.awt.Component createEditorComponent()
protected com.apple.client.eointerface.EOTableColumnAssociation editingTableColumnAssociation()
getTableCellEditorComponent.public java.awt.Component editorComponent()
endEditingprotected void endEditing()
cancelCellEditing and stopCellEditing to
inform the receiver that it should end editing. EOColumnEditor's
implementation sends associationDidEndEditing to
the EODisplayGroup of the EOTableColumnAssociation that's bound
to the receiver's TableColumn. Subclasses should invoke super's
implementation after deactivating their Component.public Object getCellEditorValue()
null,
so subclasses must override this method. public boolean isCellEditable(java.util.EventObject event)
true if event is
an event that should trigger editing, false otherwise. EOColumnEditor's implementation
simply returns false.
Subclasses must override this method.setCellEditorValueprotected abstract void setCellEditorValue(Object initialValue)
getTableCellEditorComponent to
assign initialValue as the receiver's editorComponent. Subclasses
must override this method.public void setEditorComponent(java.awt.Component editorComponent)
public boolean shouldSelectCell(java.util.EventObject event)
true if
event represents a legitimate selection trigger, or false otherwise. EOColumnEditor's implementation
invokes beginEditing and
returns true.public boolean stopCellEditing()
true.| Note: Validation failures aren't handled with this method. The boolean return value is ignored. |