| java.lang.Object jdepend.swingui.DependTreeModel
DependTreeModel | public class DependTreeModel implements TreeModel(Code) | | The DependTreeModel class defines the data model being
observed by a DependTree instance.
author: Mike Clark author: Clarkware Consulting, Inc. |
Method Summary | |
public void | addTreeModelListener(TreeModelListener l) Adds a listener for the TreeModelEvent posted after the
tree changes. | public Object | getChild(Object parent, int index) Returns the child of the specified parent at the specified index in the
parent's child collection.
The specified parent must be a node previously obtained from this data
source.
Parameters: parent - A node in the tree, obtained from this data source. Parameters: index - Index of child in the parent's child collection. | public int | getChildCount(Object parent) Returns the number of children for the specified parent.
The specified parent must be a node previously obtained from this data
source.
Parameters: parent - A node in the tree, obtained from this data source. | public int | getIndexOfChild(Object parent, Object child) Returns the index of the specified child within the specified parent.
Parameters: parent - Parent node. Parameters: child - Child node. | public Object | getRoot() Returns the root of the tree. | public boolean | isLeaf(Object o) Determines whether the specified tree node is a leaf node.
Parameters: o - A node in the tree, obtained from this data source. | public void | removeTreeModelListener(TreeModelListener l) Removes a listener for TreeModelEvent s. | public void | valueForPathChanged(TreePath path, Object newValue) Callback method triggered when the value for the item specified by
path has changed to newValue . |
DependTreeModel | public DependTreeModel(PackageNode root)(Code) | | Constructs a DependTreeModel with the specified root
package node.
Parameters: root - Root package node. |
addTreeModelListener | public void addTreeModelListener(TreeModelListener l)(Code) | | Adds a listener for the TreeModelEvent posted after the
tree changes.
Parameters: l - The listener to add. |
getChild | public Object getChild(Object parent, int index)(Code) | | Returns the child of the specified parent at the specified index in the
parent's child collection.
The specified parent must be a node previously obtained from this data
source.
Parameters: parent - A node in the tree, obtained from this data source. Parameters: index - Index of child in the parent's child collection. Child. |
getChildCount | public int getChildCount(Object parent)(Code) | | Returns the number of children for the specified parent.
The specified parent must be a node previously obtained from this data
source.
Parameters: parent - A node in the tree, obtained from this data source. The number of children of the specified parent, or 0 if theparent is a leaf node or if it has no children. |
getIndexOfChild | public int getIndexOfChild(Object parent, Object child)(Code) | | Returns the index of the specified child within the specified parent.
Parameters: parent - Parent node. Parameters: child - Child node. Index of child within parent. |
getRoot | public Object getRoot()(Code) | | Returns the root of the tree.
The root of the tree, or null if the tree has nonodes. |
isLeaf | public boolean isLeaf(Object o)(Code) | | Determines whether the specified tree node is a leaf node.
Parameters: o - A node in the tree, obtained from this data source. true if the node is a leaf; false otherwise. |
removeTreeModelListener | public void removeTreeModelListener(TreeModelListener l)(Code) | | Removes a listener for TreeModelEvent s.
Parameters: l - The listener to remove. |
valueForPathChanged | public void valueForPathChanged(TreePath path, Object newValue)(Code) | | Callback method triggered when the value for the item specified by
path has changed to newValue .
Parameters: path - Path to the node that has changed. Parameters: newValue - The new value of the node. |
|
|