fri.gui.swing.polytreetable
Interface PolyTreeTableUserObject

All Known Implementing Classes:
AbstractPolyTreeTableUserObject, FileTreeTable.FileTreeTableUserObject, Sample.FileTreeTableUserObject

public interface PolyTreeTableUserObject

A utility record that provides all methods necessary to be rendered generic in a TreeTable.
The DefaultTreeTableModel and DefaultPolyTreeNode implementations take note of the presence of this interface, which makes it possible to avoid overriding model and node classes (DefaultTreeTableModel, DefaultTreeNode). That means you are not obliged to implement subclasses of these classes to render table columns.

You need to implement equals() and hashCode(), as these nodes are managed in a Hashtable. Else there will be multiple appearances of one node.

Author:
Ritzberger Fritz

Method Summary
 boolean getAllowsChildren()
          Returns true if the receiver allows children, i.e. it is a "child folder".
 boolean getAllowsParents()
          Returns true if the receiver allows parents, i.e. it is a "parent folder".
 java.lang.Object getChildAt(int index)
          Returns the child object at given index of this userObject.
 int getChildCount()
          Returns the number of children of this userObject.
 java.lang.Class getColumnClass(int column)
          Returns the class for given column.
 int getColumnCount()
          Returns the number of columns for this userObject.
 java.lang.String getColumnName(int column)
          Returns the name for given column.
 java.lang.Object getColumnObject(int column)
          Returns the Object for given column from this userObject.
 java.lang.Object getParentAt(int index)
          Returns the parent object at given index of this userObject.
 int getParentCount()
          Returns the number of parents of this userObject.
 boolean isColumnEditable(int column)
          Returns true if passed column is editable.
 java.lang.Object setColumnObject(int column, java.lang.Object aValue)
          Sets the the given column Object into this userObject.
 

Method Detail

isColumnEditable

public boolean isColumnEditable(int column)
Returns true if passed column is editable.


getColumnObject

public java.lang.Object getColumnObject(int column)
Returns the Object for given column from this userObject.


setColumnObject

public java.lang.Object setColumnObject(int column,
                                        java.lang.Object aValue)
Sets the the given column Object into this userObject.

Returns:
new PolyTreeTableUserObject if it had to be changed completely, else "this".

getColumnCount

public int getColumnCount()
Returns the number of columns for this userObject.


getColumnClass

public java.lang.Class getColumnClass(int column)
Returns the class for given column.


getColumnName

public java.lang.String getColumnName(int column)
Returns the name for given column.


getChildCount

public int getChildCount()
Returns the number of children of this userObject.


getChildAt

public java.lang.Object getChildAt(int index)
Returns the child object at given index of this userObject.


getAllowsChildren

public boolean getAllowsChildren()
Returns true if the receiver allows children, i.e. it is a "child folder".


getParentCount

public int getParentCount()
Returns the number of parents of this userObject.


getParentAt

public java.lang.Object getParentAt(int index)
Returns the parent object at given index of this userObject.


getAllowsParents

public boolean getAllowsParents()
Returns true if the receiver allows parents, i.e. it is a "parent folder".