|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.tree.DefaultMutableTreeNode | +--magi.toolkit.dialogs.dirchooser.DirectoryNode
DirectoryNode is a thin wrapper for DefaultMutableTreeNode, to create nodes of the DirectoryChooser tree view. This class adds an 'icon type' which can be used to set the icon in the tree to different display values. Also maintains the node's 'children loaded' status for load-on-demand tree building.
Field Summary | |
static int |
ICONTYPE_DIRECTORY
|
static int |
ICONTYPE_DRIVE
|
static int |
ICONTYPE_MY_COMPUTER
|
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
Constructor Summary | |
DirectoryNode(int iconType,
java.lang.String dirName,
java.lang.String fullPath,
boolean allowsChildren)
Create a new directory node. |
Method Summary | |
boolean |
childrenAreLoaded()
Returns true if the child nodes of this parent have already been loaded. |
int |
compareTo(java.lang.Object o)
Comparitor used to sort directories in the list. |
java.lang.String |
getFullPath()
Returns the full path required to navigate to this directory on the drive. |
int |
getIconType()
Returns the icon type for this node. |
void |
setChildrenLoaded(boolean loaded)
Sets the 'children loaded' flag once all child nodes have been loaded into this parent node. |
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, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int ICONTYPE_MY_COMPUTER
public static final int ICONTYPE_DRIVE
public static final int ICONTYPE_DIRECTORY
Constructor Detail |
public DirectoryNode(int iconType, java.lang.String dirName, java.lang.String fullPath, boolean allowsChildren)
iconType
- the icon to display, one of the ICONTYPE constants defined in this class.dirName
- the name of this directory node (to display for the user).fullPath
- the full directory path to this node on the drive.allowsChildren
- is true when child nodes are allowed to be added.Method Detail |
public int getIconType()
public void setChildrenLoaded(boolean loaded)
public boolean childrenAreLoaded()
public java.lang.String getFullPath()
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |