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, removeChild
fileClosed, fileOpened
addTreeModelListener, asksAllowsChildren, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getListeners, getPathToRoot, getRoot, getTreeModelListeners, insertNodeInto, isLeaf, nodesChanged, nodesWereInserted, nodesWereRemoved, reload, reload, removeNodeFromParent, removeTreeModelListener, setAsksAllowsChildren, setRoot, valueForPathChanged
public VPTCompactModel(VPTNode rootNode)
VPTCompactModel
.rootNode
- The root node of the tree.public int getChildCount(java.lang.Object parent)
ProjectCustomTreeModel
getChildCount
in interface javax.swing.tree.TreeModel
getChildCount
in class ProjectCustomTreeModel
public java.lang.Object getChild(java.lang.Object parent, int index)
ProjectCustomTreeModel
getChild
in interface javax.swing.tree.TreeModel
getChild
in class ProjectCustomTreeModel
public int getIndexOfChild(java.lang.Object parent, java.lang.Object child)
ProjectCustomTreeModel
getIndexOfChild
in interface javax.swing.tree.TreeModel
getIndexOfChild
in class ProjectCustomTreeModel
public javax.swing.tree.TreeNode[] getPathToRoot(javax.swing.tree.TreeNode aNode)
ProjectCustomTreeModel
getPathToRoot
in class ProjectCustomTreeModel
protected java.util.List<VPTNode> getChildren(VPTProject project)
ProjectCustomTreeModel
getChildren
in class ProjectCustomTreeModel
project
- The project being queried.protected java.lang.String getName()
ProjectTreeModel
getName
in class ProjectTreeModel