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.int
getChildCount
(Object node) TreeModel method to return the number of children of a particular node.getColumnClass
(int column) Returns the column class for columncolumn
.int
Returns 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 columncolumn
and objectnode
.boolean
isCellEditable
(Object node, int column) Returns true if there is a setter method name for columncolumn
.boolean
TreeModel method to determine if a node is a leaf.void
setValueAt
(Object aValue, Object node, int column) Sets the value toaValue
for the objectnode
in 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. Sincenode
is a TreeNode, this can be answered via the TreeNode methodgetChildCount
. -
getChild
TreeModel method to locate a particular child of the specified node. Sincenode
is a TreeNode, this can be answered via the TreeNode methodgetChild
. -
isLeaf
TreeModel method to determine if a node is a leaf. Sincenode
is a TreeNode, this can be answered via the TreeNode methodisLeaf
.- Specified by:
isLeaf
in interfaceTreeModel
- Overrides:
isLeaf
in 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:
getColumnClass
in interfaceTreeTableModel
- Overrides:
getColumnClass
in classAbstractTreeTableModel
-
getValueAt
Returns the value for the columncolumn
and 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:
isCellEditable
in interfaceTreeTableModel
- Overrides:
isCellEditable
in classAbstractTreeTableModel
-
setValueAt
Sets the value toaValue
for the objectnode
in 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.
-