org.skunk.swing.filechooser
Class LocalFileChooser.FileNode

java.lang.Object
  |
  +--javax.swing.tree.DefaultMutableTreeNode
        |
        +--org.skunk.swing.filechooser.LocalFileChooser.FileNode
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, javax.swing.tree.MutableTreeNode, java.io.Serializable, javax.swing.tree.TreeNode
Enclosing class:
LocalFileChooser

public static class LocalFileChooser.FileNode
extends javax.swing.tree.DefaultMutableTreeNode
implements java.lang.Comparable

See Also:
Serialized Form

Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
LocalFileChooser.FileNode(java.io.File f)
           
 
Method Summary
 java.util.Enumeration children()
           
 int compareTo(java.lang.Object other)
           
 javax.swing.tree.TreeNode getChildAt(int index)
           
 int getChildCount()
           
 java.io.File getFile()
           
 int getIndex(javax.swing.tree.TreeNode child)
           
static LocalFileChooser.FileNode getRootNode()
           
 boolean isLeaf()
           
static boolean isRoot(java.io.File f)
           
static java.io.File[] listRoots()
          equivalent to calling File.listRoots(), but retrieves statically cached information.
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildBefore, getDepth, getFirstChild, getFirstLeaf, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, 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
 

Constructor Detail

LocalFileChooser.FileNode

public LocalFileChooser.FileNode(java.io.File f)
Method Detail

isRoot

public static final boolean isRoot(java.io.File f)

listRoots

public static java.io.File[] listRoots()
equivalent to calling File.listRoots(), but retrieves statically cached information. on Windows, calling File.listRoots() causes a dialog to appear if there is no disk in a removable drive! Aaargh.

getRootNode

public static LocalFileChooser.FileNode getRootNode()

getChildCount

public int getChildCount()
Overrides:
getChildCount in class javax.swing.tree.DefaultMutableTreeNode

isLeaf

public boolean isLeaf()
Overrides:
isLeaf in class javax.swing.tree.DefaultMutableTreeNode

getChildAt

public javax.swing.tree.TreeNode getChildAt(int index)
Overrides:
getChildAt in class javax.swing.tree.DefaultMutableTreeNode

getIndex

public int getIndex(javax.swing.tree.TreeNode child)
Overrides:
getIndex in class javax.swing.tree.DefaultMutableTreeNode

children

public java.util.Enumeration children()
Overrides:
children in class javax.swing.tree.DefaultMutableTreeNode

getFile

public java.io.File getFile()

compareTo

public int compareTo(java.lang.Object other)
Specified by:
compareTo in interface java.lang.Comparable