Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

treetable::TTreeTableCellEditor Class Reference

Inheritance diagram for treetable::TTreeTableCellEditor:

treetable::TAbstractCellEditor List of all members.

Public Methods

 TTreeTableCellEditor (TTreeTable tTREE_TABLE)
Component getTableCellEditorComponent (JTable tTABLE, Object tVALUE, boolean gIS_SELECTED, int iROW, int iCOLUMN)
boolean isCellEditable (EventObject tEVENT_OBJECT)

Protected Attributes

TTreeTable tTreeTable
 Tree-table.


Detailed Description

A TableCellEditor implementation. The component returned is the JTree.

Definition at line 79 of file TTreeTableCellEditor.java.


Constructor & Destructor Documentation

treetable::TTreeTableCellEditor::TTreeTableCellEditor TTreeTable    tTREE_TABLE [inline]
 

Builds a new instance.

Parameters:
tTREE_TABLE  The tree-table.

Definition at line 94 of file TTreeTableCellEditor.java.

References treetable::TTreeTableCellEditor::tTreeTable.


Member Function Documentation

Component treetable::TTreeTableCellEditor::getTableCellEditorComponent JTable    tTABLE,
Object    tVALUE,
boolean    gIS_SELECTED,
int    iROW,
int    iCOLUMN
[inline]
 

Sets an initial value for the editor. This will cause the editor to stopEditing 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.

Parameters:
tTABLE  The JTable that is asking the editor to edit; can be null.
tVALUE  The value of the cell to be edited; it is up to the specific editor to interpret and draw the value. For example, if value is the string "true", it could be rendered as a string or it could be rendered as a check box that is checked. Can be null.
gIS_SELECTED  True if the cell is to be rendered with highlighting.
iROW  The row of the cell being edited.
iCOLUMN  The column of the cell being edited.

Definition at line 124 of file TTreeTableCellEditor.java.

References treetable::TTreeTableCellEditor::tTreeTable.

boolean treetable::TTreeTableCellEditor::isCellEditable EventObject    tEVENT_OBJECT [inline]
 

Overridden to return false, and if the event is a mouse event it is forwarded to the tree. The behavior for this is debatable, and should really be offered as a property. By returning false, all keyboard actions are implemented in terms of the table. By returning true, the tree would get a chance to do something with the keyboard events. For the most part this is ok. But for certain keys, such as left/right, the tree will expand or collapse where as the table focus should really move to a different column. Page up/down should also be implemented in terms of the table. By returning false this also has the added benefit that clicking outside of the bounds of the tree node, but still in the tree column will select the row, whereas if this returned true that wouldn't be the case. By returning false we are also enforcing the policy that the tree will never be editable (at least by a key sequence).

Parameters:
tEVENT_OBJECT  The event that the editor should use to consider whether to begin editing or not.

Reimplemented from treetable::TAbstractCellEditor.

Definition at line 151 of file TTreeTableCellEditor.java.

References treetable::TTreeTableCellEditor::tTreeTable.


The documentation for this class was generated from the following file:
Generated on Mon Oct 13 02:35:27 2003 for MPCL by doxygen1.2.18