org.jppf.ui.treetable
Class JTreeTable.TreeTableCellEditor
java.lang.Object
org.jppf.ui.treetable.AbstractCellEditor
org.jppf.ui.treetable.JTreeTable.TreeTableCellEditor
- All Implemented Interfaces:
- CellEditor, TableCellEditor
- Enclosing class:
- JTreeTable
public class JTreeTable.TreeTableCellEditor
- extends AbstractCellEditor
- implements TableCellEditor
TreeTableCellEditor implementation. Component returned is the JTree.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JTreeTable.TreeTableCellEditor
public JTreeTable.TreeTableCellEditor()
getTableCellEditorComponent
public Component getTableCellEditorComponent(JTable table,
Object value,
boolean isSelected,
int r,
int c)
-
- Specified by:
getTableCellEditorComponent in interface TableCellEditor
isCellEditable
public boolean isCellEditable(EventObject e)
- 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/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).
Asks the editor if it can start editing using anEvent. This method always returns true.
- Specified by:
isCellEditable in interface CellEditor- Overrides:
isCellEditable in class AbstractCellEditor
- Parameters:
e - the event the editor should use to consider whether to begin editing or not.
- Returns:
true.- See Also:
CellEditor.isCellEditable(java.util.EventObject)
Copyright © 2005-2010 JPPF Team.