| java.lang.Object ti.swing.treetable.AbstractTreeModel ti.chimera.fs.FileSystemTreeModel
All known Subclasses: ti.chimera.fs.FileSystemTreeTableModel,
FileSystemTreeModel | public class FileSystemTreeModel extends AbstractTreeModel (Code) | | Class that makes a TreeModel of the file system
oscript.fs.AbstractFileSystem .
There are some additional "add-ons" that you should use to ensure proper
behavior of your tree. (XXX I should probably just add a factory method to
install the TreeCellRenderer and TreeExpansionListener, and any other steps
that may get added in the future....)
JTree tree = new JTree( new FileSystemTreeModel( "/", null ) )
tree.setCellRenderer( new FileSystemTreeModel.FileSystemTreeCellRenderer() );
tree.addTreeExpansionListener( new FileSystemTreeModel.FileSystemTreeExpansionListener() );
author: Rob Clark version: 0.1 |
Inner Class :public interface FileSystemTreeFilter | |
Inner Class :public static class FileSystemNode | |
FileSystemTreeModel | public FileSystemTreeModel(String path, FileSystemTreeFilter filter)(Code) | | Class Constructor.
Parameters: path - the path to the root node of the tree Parameters: filter - the filter, or null |
FileSystemTreeModel | public FileSystemTreeModel(AbstractFile root, FileSystemTreeFilter filter)(Code) | | Class Constructor.
Parameters: root - the root node of the tree Parameters: filter - the filter, or null |
getFileIcon | public static javax.swing.Icon getFileIcon(String extension)(Code) | | Get the icon associated with the specified file type.
Parameters: extension - the file type extension the icon to displayed for this file type, or null if none |
getFileSystemNode | public FileSystemNode getFileSystemNode(String path)(Code) | | Cached lookup of FileSystemNode
|
getFileSystemNode | public FileSystemNode getFileSystemNode(AbstractFile file)(Code) | | Cached lookup of FileSystemNode
|
pathToFile | final protected static AbstractFile pathToFile(String path)(Code) | | utility to go from path to file... catches and deals with exceptions,
but could return null.
|
setFileInfo | public static void setFileInfo(String extension, javax.swing.Icon icon, String info)(Code) | | Set the icon to draw, and the description of the type, for files of
the specified type (as determined by file extension). If an icon or
description has already been registered for this file type, the new
icon will replace the existing one.
Parameters: extension - the file type extension Parameters: icon - the icon to display for this file type, or null Parameters: info - an info string describing the file type, or null |
Methods inherited from ti.swing.treetable.AbstractTreeModel | public void addTreeModelListener(TreeModelListener l)(Code)(Java Doc) public void fireTreeNodesChanged(Object source, Object[] path, int[] childIndices, Object[] children)(Code)(Java Doc) public void fireTreeNodesInserted(Object source, Object[] path, int[] childIndices, Object[] children)(Code)(Java Doc) public void fireTreeNodesRemoved(Object source, Object[] path, int[] childIndices, Object[] children)(Code)(Java Doc) public void fireTreeStructureChanged(Object source, Object[] path, int[] childIndices, Object[] children)(Code)(Java Doc) public int getIndexOfChild(Object parent, Object child)(Code)(Java Doc) public Object getRoot()(Code)(Java Doc) public boolean isLeaf(Object node)(Code)(Java Doc) public void removeTreeModelListener(TreeModelListener l)(Code)(Java Doc) public void valueForPathChanged(TreePath path, Object newValue)(Code)(Java Doc)
|
|
|