siuying.gm.app.gmailer4j.model.treetable
Class FileSystemModel

java.lang.Object
  extended by siuying.gm.app.gmailer4j.model.treetable.AbstractTreeTableModel
      extended by siuying.gm.app.gmailer4j.model.treetable.FileSystemModel
All Implemented Interfaces:
javax.swing.tree.TreeModel, TreeTableModel

public class FileSystemModel
extends AbstractTreeTableModel
implements TreeTableModel

FileSystemModel is a TreeTableModel representing a hierarchical file system. Nodes in the FileSystemModel are FileNodes which, when they are directory nodes, cache their children to avoid repeatedly querying the real file system.

Version:
%I% %G%
Author:
Philip Milne, Scott Violet

Field Summary
protected static java.lang.String[] cNames
           
protected static java.lang.Class[] cTypes
           
static java.lang.Integer ZERO
           
 
Fields inherited from class siuying.gm.app.gmailer4j.model.treetable.AbstractTreeTableModel
listenerList, root
 
Constructor Summary
FileSystemModel()
           
 
Method Summary
 java.lang.Object getChild(java.lang.Object node, int i)
           
 int getChildCount(java.lang.Object node)
           
protected  java.lang.Object[] getChildren(java.lang.Object node)
           
 java.lang.Class getColumnClass(int column)
          Returns the type for column number column.
 int getColumnCount()
          Returns the number ofs availible column.
 java.lang.String getColumnName(int column)
          Returns the name for column number column.
protected  java.io.File getFile(java.lang.Object node)
           
 java.lang.Object getValueAt(java.lang.Object node, int column)
          Returns the value to be displayed for node node, at column number column.
 boolean isLeaf(java.lang.Object node)
           
 
Methods inherited from class siuying.gm.app.gmailer4j.model.treetable.AbstractTreeTableModel
addTreeModelListener, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getIndexOfChild, getRoot, isCellEditable, removeTreeModelListener, setValueAt, valueForPathChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface siuying.gm.app.gmailer4j.model.treetable.TreeTableModel
isCellEditable, setValueAt
 
Methods inherited from interface javax.swing.tree.TreeModel
addTreeModelListener, getIndexOfChild, getRoot, removeTreeModelListener, valueForPathChanged
 

Field Detail

cNames

protected static java.lang.String[] cNames

cTypes

protected static java.lang.Class[] cTypes

ZERO

public static final java.lang.Integer ZERO
Constructor Detail

FileSystemModel

public FileSystemModel()
Method Detail

getFile

protected java.io.File getFile(java.lang.Object node)

getChildren

protected java.lang.Object[] getChildren(java.lang.Object node)

getChildCount

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

getChild

public java.lang.Object getChild(java.lang.Object node,
                                 int i)
Specified by:
getChild in interface javax.swing.tree.TreeModel

isLeaf

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

getColumnCount

public int getColumnCount()
Description copied from interface: TreeTableModel
Returns the number ofs availible column.

Specified by:
getColumnCount in interface TreeTableModel

getColumnName

public java.lang.String getColumnName(int column)
Description copied from interface: TreeTableModel
Returns the name for column number column.

Specified by:
getColumnName in interface TreeTableModel

getColumnClass

public java.lang.Class getColumnClass(int column)
Description copied from interface: TreeTableModel
Returns the type for column number column.

Specified by:
getColumnClass in interface TreeTableModel
Overrides:
getColumnClass in class AbstractTreeTableModel

getValueAt

public java.lang.Object getValueAt(java.lang.Object node,
                                   int column)
Description copied from interface: TreeTableModel
Returns the value to be displayed for node node, at column number column.

Specified by:
getValueAt in interface TreeTableModel