Package com.portal.app.cc
Class DynamicTreeTableModel
java.lang.Object
com.portal.pfc.ui.AbstractTreeTableModel
com.portal.app.cc.DynamicTreeTableModel
- All Implemented Interfaces:
TreeTableModel,TreeModel
- Direct Known Subclasses:
ItemChargesModel,PendingItemChargesModel
-
Field Summary
Fields inherited from class com.portal.pfc.ui.AbstractTreeTableModel
listenerList, root -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionTreeModel method to locate a particular child of the specified node.intgetChildCount(Object node) TreeModel method to return the number of children of a particular node.getColumnClass(int column) Returns the column class for columncolumn.intReturns the number of column names passed into the constructor.getColumnName(int column) Returns the column name passed into the constructor.TreeNode[]getPathToRoot(TreeNode aNode) Builds the parents of the node up to and including the root node, where the original node is the last element in the returned array.getValueAt(Object node, int column) Returns the value for the columncolumnand objectnode.booleanisCellEditable(Object node, int column) Returns true if there is a setter method name for columncolumn.booleanTreeModel method to determine if a node is a leaf.voidsetValueAt(Object aValue, Object node, int column) Sets the value toaValuefor the objectnodein columncolumn.Methods inherited from class com.portal.pfc.ui.AbstractTreeTableModel
addTreeModelListener, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getIndexOfChild, getRoot, removeTreeModelListener, setValueAt, valueForPathChanged
-
Constructor Details
-
Method Details
-
getChildCount
TreeModel method to return the number of children of a particular node. Sincenodeis a TreeNode, this can be answered via the TreeNode methodgetChildCount. -
getChild
TreeModel method to locate a particular child of the specified node. Sincenodeis a TreeNode, this can be answered via the TreeNode methodgetChild. -
isLeaf
TreeModel method to determine if a node is a leaf. Sincenodeis a TreeNode, this can be answered via the TreeNode methodisLeaf.- Specified by:
isLeafin interfaceTreeModel- Overrides:
isLeafin classAbstractTreeTableModel
-
getColumnCount
public int getColumnCount()Returns the number of column names passed into the constructor. -
getColumnName
Returns the column name passed into the constructor. -
getColumnClass
Returns the column class for columncolumn. This is set in the constructor.- Specified by:
getColumnClassin interfaceTreeTableModel- Overrides:
getColumnClassin classAbstractTreeTableModel
-
getValueAt
Returns the value for the columncolumnand objectnode. The return value is determined by invoking the method specified in constructor for the passed in column. -
isCellEditable
Returns true if there is a setter method name for columncolumn. This is set in the constructor.- Specified by:
isCellEditablein interfaceTreeTableModel- Overrides:
isCellEditablein classAbstractTreeTableModel
-
setValueAt
Sets the value toaValuefor the objectnodein columncolumn. This is done by using the setter method name, and coercing the passed in value to the specified type. -
getPathToRoot
Builds the parents of the node up to and including the root node, where the original node is the last element in the returned array. The length of the returned array gives the node's depth in the tree.- Parameters:
aNode- the TreeNode to get the path foran- array of TreeNodes giving the path from the root to the specified node.
-