public class VPTCompactModel extends ProjectCustomTreeModel
A directory is displayed only if it contains at least one (non-hidden) file. The relative path is used to display these directories.
Example:
| - | MyProject | ||
| - | src/net/sf/myproject/ui | ||
| MyFrame.java | |||
| MyDialog.java | |||
| - | src/net/sf/myproject/actions | ||
| MyAction.java | |||
| + | src/net/sf/myproject/mybigpackage |
| Constructor and Description |
|---|
VPTCompactModel(VPTNode rootNode)
Create a new
VPTCompactModel. |
| Modifier and Type | Method and Description |
|---|---|
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 number of children of the given node, based on the
internal cached data.
|
protected java.util.List<VPTNode> |
getChildren(VPTProject project)
Subclasses should implement this method to populate the list
of children of a project node.
|
int |
getIndexOfChild(java.lang.Object parent,
java.lang.Object child)
Returns the index of the given child in the given parent,
according to the information in the internal cache.
|
protected java.lang.String |
getName()
Returns the name of the tree, to be shown in the tabbed
pane GUI.
|
javax.swing.tree.TreeNode[] |
getPathToRoot(javax.swing.tree.TreeNode aNode)
Builds the path to the root of the tree up to the given
node.
|
addChild, buildPathToRoot, getCache, getCachedChildren, isCustom, nodeChanged, nodeStructureChanged, projectClosed, removeChildfileClosed, fileOpenedaddTreeModelListener, asksAllowsChildren, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getListeners, getPathToRoot, getRoot, getTreeModelListeners, insertNodeInto, isLeaf, nodesChanged, nodesWereInserted, nodesWereRemoved, reload, reload, removeNodeFromParent, removeTreeModelListener, setAsksAllowsChildren, setRoot, valueForPathChangedpublic VPTCompactModel(VPTNode rootNode)
VPTCompactModel.rootNode - The root node of the tree.public int getChildCount(java.lang.Object parent)
ProjectCustomTreeModelgetChildCount in interface javax.swing.tree.TreeModelgetChildCount in class ProjectCustomTreeModelpublic java.lang.Object getChild(java.lang.Object parent,
int index)
ProjectCustomTreeModelgetChild in interface javax.swing.tree.TreeModelgetChild in class ProjectCustomTreeModelpublic int getIndexOfChild(java.lang.Object parent,
java.lang.Object child)
ProjectCustomTreeModelgetIndexOfChild in interface javax.swing.tree.TreeModelgetIndexOfChild in class ProjectCustomTreeModelpublic javax.swing.tree.TreeNode[] getPathToRoot(javax.swing.tree.TreeNode aNode)
ProjectCustomTreeModelgetPathToRoot in class ProjectCustomTreeModelprotected java.util.List<VPTNode> getChildren(VPTProject project)
ProjectCustomTreeModelgetChildren in class ProjectCustomTreeModelproject - The project being queried.protected java.lang.String getName()
ProjectTreeModelgetName in class ProjectTreeModel