org.xnap.gui.tree
Class FileTreeModel

java.lang.Object
  extended by org.xnap.gui.tree.AbstractTreeModel
      extended by org.xnap.gui.tree.FileTreeModel
All Implemented Interfaces:
java.util.Comparator, javax.swing.tree.TreeModel

public class FileTreeModel
extends AbstractTreeModel
implements java.util.Comparator


Field Summary
 
Fields inherited from class org.xnap.gui.tree.AbstractTreeModel
listenerList, root
 
Constructor Summary
FileTreeModel(java.lang.String root)
           
FileTreeModel(java.lang.String root, java.io.File[] roots)
           
 
Method Summary
 void addChildOfSubRoot(java.io.File f, java.lang.String s)
           
 void addChildOfSubRoot(java.io.File f, java.lang.String s, java.lang.String label)
           
 void addSubRoot(java.io.File f)
           
 void addSubRoot(java.lang.String s)
           
 int compare(java.lang.Object o1, java.lang.Object o2)
           
 java.lang.Object getChild(java.lang.Object parent, int index)
           
 int getChildCount(java.lang.Object node)
           
 int getIndexOfChild(java.lang.Object parent, java.lang.Object child)
           
 boolean isLeaf(java.lang.Object node)
           
 void removeChildOfSubRoot(java.io.File f, java.lang.String s)
           
 void removeChildrenOfSubRoot(java.lang.String s)
           
 void removeSubRoots()
           
 
Methods inherited from class org.xnap.gui.tree.AbstractTreeModel
addTreeModelListener, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getRoot, reload, removeTreeModelListener, valueForPathChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

FileTreeModel

public FileTreeModel(java.lang.String root,
                     java.io.File[] roots)

FileTreeModel

public FileTreeModel(java.lang.String root)
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Specified by:
compare in interface java.util.Comparator

isLeaf

public boolean isLeaf(java.lang.Object node)
Specified by:
isLeaf in interface javax.swing.tree.TreeModel
Specified by:
isLeaf in class AbstractTreeModel

getChildCount

public int getChildCount(java.lang.Object node)
Specified by:
getChildCount in interface javax.swing.tree.TreeModel
Specified by:
getChildCount in class AbstractTreeModel

getChild

public java.lang.Object getChild(java.lang.Object parent,
                                 int index)
Specified by:
getChild in interface javax.swing.tree.TreeModel
Specified by:
getChild in class AbstractTreeModel

getIndexOfChild

public int getIndexOfChild(java.lang.Object parent,
                           java.lang.Object child)
Specified by:
getIndexOfChild in interface javax.swing.tree.TreeModel
Specified by:
getIndexOfChild in class AbstractTreeModel

addSubRoot

public void addSubRoot(java.lang.String s)

addSubRoot

public void addSubRoot(java.io.File f)

removeSubRoots

public void removeSubRoots()

removeChildrenOfSubRoot

public void removeChildrenOfSubRoot(java.lang.String s)

addChildOfSubRoot

public void addChildOfSubRoot(java.io.File f,
                              java.lang.String s)

addChildOfSubRoot

public void addChildOfSubRoot(java.io.File f,
                              java.lang.String s,
                              java.lang.String label)

removeChildOfSubRoot

public void removeChildOfSubRoot(java.io.File f,
                                 java.lang.String s)


Copyright © 2001-2005 XNap Team. All Rights Reserved.