projectviewer.vpt
Class VPTRoot

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by projectviewer.vpt.VPTNode
          extended by projectviewer.vpt.VPTGroup
              extended by projectviewer.vpt.VPTRoot
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<VPTNode>, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode

public class VPTRoot
extends VPTGroup

The root of the PV tree, representing "All Projects" Aside from being the root of the project tree, it provides methods for manipulating the projects and persisting data to the disk.

Author:
Marcelo Vanzin
See Also:
Serialized Form

Field Summary
 
Fields inherited from class projectviewer.vpt.VPTNode
name, treeNoSelectionBackground, treeNoSelectionForeground, treeSelectionBackground, treeSelectionForeground
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Method Summary
 int compareTo(VPTNode node)
          The root is always the first node.
static VPTRoot getInstance()
          Returns an instance of the VPTRoot, never null.
 java.lang.String getNodePath()
          Returns File.separator.
 
Methods inherited from class projectviewer.vpt.VPTGroup
getIcon, toString
 
Methods inherited from class projectviewer.vpt.VPTNode
canOpen, canRename, canWrite, changed, close, compareName, delete, findIndexForChild, findProjectFor, getBackgroundColor, getChildWithName, getClipType, getForegroundColor, getGroup, getLock, getName, getVersionControlState, insert, isDirectory, isFile, isGroup, isOpened, isProject, isRoot, lock, open, persistChildren, remove, remove, removeAllChildren, removeFromParent, setName, setParent, setVersionControlState, sortChildren, sortChildren, unlock
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, setAllowsChildren, setUserObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getInstance

public static VPTRoot getInstance()
Returns an instance of the VPTRoot, never null. There is only one instance, serving all views.


getNodePath

public java.lang.String getNodePath()
Returns File.separator.

Overrides:
getNodePath in class VPTGroup

compareTo

public int compareTo(VPTNode node)
The root is always the first node. Period.

Specified by:
compareTo in interface java.lang.Comparable<VPTNode>
Overrides:
compareTo in class VPTGroup