|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjdepend.swingui.DependTreeModel
public class DependTreeModel
The DependTreeModel class defines the data model being
observed by a DependTree instance.
| Constructor Summary | |
|---|---|
DependTreeModel(PackageNode root)
Constructs a DependTreeModel with the specified root
package node. |
|
| Method Summary | |
|---|---|
void |
addTreeModelListener(javax.swing.event.TreeModelListener l)
Adds a listener for the TreeModelEvent posted after the
tree changes. |
java.lang.Object |
getChild(java.lang.Object parent,
int index)
Returns the child of the specified parent at the specified index in the parent's child collection. |
int |
getChildCount(java.lang.Object parent)
Returns the number of children for the specified parent. |
int |
getIndexOfChild(java.lang.Object parent,
java.lang.Object child)
Returns the index of the specified child within the specified parent. |
java.lang.Object |
getRoot()
Returns the root of the tree. |
boolean |
isLeaf(java.lang.Object o)
Determines whether the specified tree node is a leaf node. |
void |
removeTreeModelListener(javax.swing.event.TreeModelListener l)
Removes a listener for TreeModelEvents. |
void |
valueForPathChanged(javax.swing.tree.TreePath path,
java.lang.Object newValue)
Callback method triggered when the value for the item specified by path has changed to newValue . |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DependTreeModel(PackageNode root)
DependTreeModel with the specified root
package node.
root - Root package node.| Method Detail |
|---|
public java.lang.Object getRoot()
getRoot in interface javax.swing.tree.TreeModelnull if the tree has no
nodes.
public java.lang.Object getChild(java.lang.Object parent,
int index)
The specified parent must be a node previously obtained from this data source.
getChild in interface javax.swing.tree.TreeModelparent - A node in the tree, obtained from this data source.index - Index of child in the parent's child collection.
public int getChildCount(java.lang.Object parent)
The specified parent must be a node previously obtained from this data source.
getChildCount in interface javax.swing.tree.TreeModelparent - A node in the tree, obtained from this data source.
public boolean isLeaf(java.lang.Object o)
isLeaf in interface javax.swing.tree.TreeModelo - A node in the tree, obtained from this data source.
true if the node is a leaf; false
otherwise.
public void valueForPathChanged(javax.swing.tree.TreePath path,
java.lang.Object newValue)
valueForPathChanged in interface javax.swing.tree.TreeModelpath - Path to the node that has changed.newValue - The new value of the node.
public int getIndexOfChild(java.lang.Object parent,
java.lang.Object child)
getIndexOfChild in interface javax.swing.tree.TreeModelparent - Parent node.child - Child node.
public void addTreeModelListener(javax.swing.event.TreeModelListener l)
TreeModelEvent posted after the
tree changes.
addTreeModelListener in interface javax.swing.tree.TreeModell - The listener to add.public void removeTreeModelListener(javax.swing.event.TreeModelListener l)
TreeModelEvents.
removeTreeModelListener in interface javax.swing.tree.TreeModell - The listener to remove.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||