EOColumnEditor
- Inherits from:
- Object
- Implements:
- javax.swing.table.TableCellEditor
- javax.swing.CellEditor (javax.swing.table.TableCellEditor)
- Package:
- com.apple.client.eointerface
Class Description
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.
Interfaces Implemented
javax.swing.table.TableCellEditor
addCellEditorListener
(javax.swing.CellEditor)cancelCellEditing
(javax.swing.CellEditor)- getCellEditorValue
getTableCellEditorComponent
- isCellEditable
removeCellEditorListener
(javax.swing.CellEditor)- shouldSelectCell
- stopCellEditing
Method Types
- Instantiation
- createEditorComponent
- editingTableColumnAssociation
- editorComponent
- setCellEditorValue
- setEditorComponent
- Event handling
- beginEditing
- endEditing
Instance Methods
beginEditing
protected 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.createEditorComponent
protected abstract java.awt.Component
createEditorComponent
()
editingTableColumnAssociation
protected com.apple.client.eointerface.EOTableColumnAssociation editingTableColumnAssociation()
getTableCellEditorComponent
.editorComponent
public java.awt.Component
editorComponent
()
endEditing
protected 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.getCellEditorValue
public Object
getCellEditorValue
()
null
,
so subclasses must override this method. isCellEditable
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.setCellEditorValue
protected abstract void
setCellEditorValue
(Object initialValue)
getTableCellEditorComponent
to
assign initialValue as the receiver's editorComponent. Subclasses
must override this method.setEditorComponent
public void
setEditorComponent
(java.awt.Component editorComponent)
shouldSelectCell
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
.stopCellEditing
public boolean
stopCellEditing
()
true
.Note: Validation failures aren't handled with this method. The boolean return value is ignored. |