|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xnap.commons.gui.tree.AbstractTreeModel org.xnap.commons.gui.tree.FileTreeModel
public class FileTreeModel
Field Summary |
---|
Fields inherited from class org.xnap.commons.gui.tree.AbstractTreeModel |
---|
listenerList, root |
Constructor Summary | |
---|---|
FileTreeModel(String root)
|
|
FileTreeModel(String root,
File[] roots)
|
Method Summary | |
---|---|
void |
addChildOfSubRoot(File file,
String subRoot)
|
void |
addChildOfSubRoot(File file,
String subRoot,
String label)
|
void |
addSubRoot(File f)
|
void |
addSubRoot(String name)
|
Object |
getChild(Object parent,
int index)
|
int |
getChildCount(Object node)
|
FileFilter |
getFileFilter()
Returns the currently set file filter. |
int |
getIndexOfChild(Object parent,
Object child)
|
boolean |
getSortListedFiles()
Returns whether the listed files of a directory are being sorted. |
boolean |
isLeaf(Object node)
|
void |
removeChildOfSubRoot(File file,
String subRoot)
|
void |
removeChildrenOfSubRoot(String s)
|
void |
removeSubRoots()
|
void |
setFileFilter(FileFilter filter)
Sets a file filter that is used for listing directories in the tree. |
void |
setSortListedFiles(boolean sort)
Sets whether the listed files of a directory should be sorted. |
Methods inherited from class org.xnap.commons.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 |
Constructor Detail |
---|
public FileTreeModel(String root, File[] roots)
public FileTreeModel(String root)
Method Detail |
---|
public boolean isLeaf(Object node)
isLeaf
in interface TreeModel
isLeaf
in class AbstractTreeModel
public int getChildCount(Object node)
getChildCount
in interface TreeModel
getChildCount
in class AbstractTreeModel
public Object getChild(Object parent, int index)
getChild
in interface TreeModel
getChild
in class AbstractTreeModel
public int getIndexOfChild(Object parent, Object child)
getIndexOfChild
in interface TreeModel
getIndexOfChild
in class AbstractTreeModel
public void addSubRoot(String name)
public void addSubRoot(File f)
public void removeSubRoots()
public void removeChildrenOfSubRoot(String s)
public void addChildOfSubRoot(File file, String subRoot)
public void addChildOfSubRoot(File file, String subRoot, String label)
public void removeChildOfSubRoot(File file, String subRoot)
public void setFileFilter(FileFilter filter)
The default filter excludes hidden files and files that are not directories.
filter
- can be null
public FileFilter getFileFilter()
null
public void setSortListedFiles(boolean sort)
Fires TreeModelListener.treeStructureChanged(javax.swing.event.TreeModelEvent)
with the root node as parameter to make sure the whole tree is updated
correctly.
sort
- public boolean getSortListedFiles()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |