|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.tree.DefaultTreeModel
projectviewer.vpt.VPTFileListModel
A tree model that represents all files in a project without any relationship to the nodes they are a child of.
This model, similarly to the other "flat model": VPTWorkingFileList, is
a little dumb, for the sake of code simplicity. Using "insertNodeInto" or
similar methods will not work for these models. The only structure change
supported is the nodeStructureChanged()
method. So, classes that change the tree structure in some way should wait
until all changes are made and then call this method for the project node or
the root node of the tree, preferably using the "broadcast" method available
in the ProjectViewer class.
Field Summary |
Fields inherited from class javax.swing.tree.DefaultTreeModel |
asksAllowsChildren, listenerList, root |
Constructor Summary | |
VPTFileListModel(VPTNode rootNode)
Create a new VPTFileListModel . |
Method Summary | |
void |
cleanup(VPTProject p)
|
java.lang.Object |
getChild(java.lang.Object parent,
int index)
Returns the child at the given index of the given parent. |
int |
getChildCount(java.lang.Object parent)
Returns the child at the given index of the given parent. |
int |
getIndexOfChild(java.lang.Object parent,
java.lang.Object child)
|
javax.swing.tree.TreeNode[] |
getPathToRoot(javax.swing.tree.TreeNode aNode)
|
void |
nodeChanged(javax.swing.tree.TreeNode node)
Handles a node changed request. |
void |
nodeStructureChanged(javax.swing.tree.TreeNode node)
Called when some node in the tree is changed. |
Methods inherited from class javax.swing.tree.DefaultTreeModel |
addTreeModelListener, asksAllowsChildren, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getListeners, getPathToRoot, getRoot, getTreeModelListeners, insertNodeInto, isLeaf, nodesChanged, nodesWereInserted, nodesWereRemoved, reload, reload, removeNodeFromParent, removeTreeModelListener, setAsksAllowsChildren, setRoot, valueForPathChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public VPTFileListModel(VPTNode rootNode)
VPTFileListModel
.
rootNode
- The root node of the tree.Method Detail |
public int getChildCount(java.lang.Object parent)
public java.lang.Object getChild(java.lang.Object parent, int index)
public void nodeStructureChanged(javax.swing.tree.TreeNode node)
public int getIndexOfChild(java.lang.Object parent, java.lang.Object child)
public javax.swing.tree.TreeNode[] getPathToRoot(javax.swing.tree.TreeNode aNode)
public void nodeChanged(javax.swing.tree.TreeNode node)
public void cleanup(VPTProject p)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |