ca.odell.glazedlists.swing
Class AbstractTreeTableNodeDataEditor

java.lang.Object
  extended by ca.odell.glazedlists.swing.AbstractTreeTableNodeDataEditor
All Implemented Interfaces:
TreeTableNodeDataEditor, CellEditor, TableCellEditor

public abstract class AbstractTreeTableNodeDataEditor
extends Object
implements TreeTableNodeDataEditor

A convenient editor that eases the implementation of TreeTableNodeDataRenderer by providing convenient access methods to the data within the given TreeNodeData.


Constructor Summary
AbstractTreeTableNodeDataEditor()
           
 
Method Summary
protected  boolean allowsChildren()
          Returns true if the node is of the type that can have child elements; false otherwise.
protected  int getDepth()
          Returns the depth of the tree node in the hierarchy.
protected  boolean hasChildren()
          Returns true if the tree node has child nodes; false otherwise.
protected  boolean isExpanded()
          Returns true if the node is expanded and its children are thus visible; false if it is collapsed and its children are thus hidden.
 void setTreeNodeData(TreeNodeData treeNodeData)
          This method will be called before TableCellEditor.getTableCellEditorComponent(javax.swing.JTable, java.lang.Object, boolean, int, int) in order to provide hierarchy information about the tree node being edited.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.table.TableCellEditor
getTableCellEditorComponent
 
Methods inherited from interface javax.swing.CellEditor
addCellEditorListener, cancelCellEditing, getCellEditorValue, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing
 

Constructor Detail

AbstractTreeTableNodeDataEditor

public AbstractTreeTableNodeDataEditor()
Method Detail

setTreeNodeData

public final void setTreeNodeData(TreeNodeData treeNodeData)
Description copied from interface: TreeTableNodeDataEditor
This method will be called before TableCellEditor.getTableCellEditorComponent(javax.swing.JTable, java.lang.Object, boolean, int, int) in order to provide hierarchy information about the tree node being edited. Implementations should store a reference to the given treeNodeData and use it when producing an editor component.

Specified by:
setTreeNodeData in interface TreeTableNodeDataEditor
Parameters:
treeNodeData - an object describing hierarchical information about the tree node being edited

getDepth

protected int getDepth()
Returns the depth of the tree node in the hierarchy.


hasChildren

protected boolean hasChildren()
Returns true if the tree node has child nodes; false otherwise.


allowsChildren

protected boolean allowsChildren()
Returns true if the node is of the type that can have child elements; false otherwise.


isExpanded

protected boolean isExpanded()
Returns true if the node is expanded and its children are thus visible; false if it is collapsed and its children are thus hidden. This argument only has meaning when hasChildren() returns true; otherwise it should be ignored.



Glazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by hbrands at 2013-02-12 20:58