|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.tree.DefaultTreeModel | +--org.objectweb.jac.aspects.gui.TreeModel
A data model for trees.
Field Summary |
Fields inherited from class javax.swing.tree.DefaultTreeModel |
asksAllowsChildren, listenerList, root |
Constructor Summary | |
TreeModel(RootNode rootNode,
String rootObjects,
boolean showRelations)
Constructs a new tree model. |
Method Summary | |
void |
addNode(AbstractNode parent,
AbstractNode child)
Add a child node to a node |
static void |
addNodes(TreeView tree,
ObjectNode rootNode,
Object o,
boolean showRelations)
Add the children nodes for a node. |
void |
addTreeListener(TreeListener listener)
|
static void |
initTree(TreeView tree,
String rootObjects,
boolean showRelations)
Initialize a tree view. |
static boolean |
isLeafNode(TreeView tree,
ObjectNode node,
Object o,
boolean showRelations)
Tells wether a node is a leaf or not, without computing all its children. |
void |
setRootNode(AbstractNode root)
Set the root node of the tree. |
void |
setSelection(TreePath selection)
Sets the selected node for this tree. |
void |
unregisterEvents()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.objectweb.jac.aspects.gui.TreeView |
nodeChanged, nodesWereInserted, nodesWereRemoved |
Constructor Detail |
public TreeModel(RootNode rootNode, String rootObjects, boolean showRelations)
rootNode
- the root noderootObjects
- ???showRelations
- tells if the tree should show the
interobjects relations as nodesMethod Detail |
public void setRootNode(AbstractNode root)
TreeView
setRootNode
in interface TreeView
root
- the root nodepublic void addNode(AbstractNode parent, AbstractNode child)
TreeView
addNode
in interface TreeView
parent
- the node to add the child node tochild
- the node to addpublic void setSelection(TreePath selection)
TreeView
setSelection
in interface TreeView
selection
- a tree path indicating the selected nodepublic void addTreeListener(TreeListener listener)
public void unregisterEvents()
public static void addNodes(TreeView tree, ObjectNode rootNode, Object o, boolean showRelations)
rootNode
- the parent node for which to add children nodes.o
- the object represented by the rootNodepublic static boolean isLeafNode(TreeView tree, ObjectNode node, Object o, boolean showRelations)
tree
- The tree the node belongs tonode
- the nodeo
- the object represented by the nodeshowRelations
- wether to show a node for relationspublic static void initTree(TreeView tree, String rootObjects, boolean showRelations)
tree
- the tree view to initializerootObjects
- a regular expression designating root objectsshowRelations
- wether to build nodes for the relations themselves
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |