Package org.jppf.ui.treetable
Class FileSystemModel
java.lang.Object
org.jppf.ui.treetable.AbstractTreeTableModel
org.jppf.ui.treetable.FileSystemModel
- All Implemented Interfaces:
Serializable,TreeModel,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
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IntegerThe the returned file length for directories.Fields inherited from class org.jppf.ui.treetable.AbstractTreeTableModel
listenerList, root -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetChildCount(Object node) protected Object[]getChildren(Object node) Get the children of the specified node.Class<?>getColumnClass(int column) Returns the type for column numbercolumn.intReturns the number ofs available columns.getColumnName(int column) Returns the name for column numbercolumn.protected FileGet the file a node points to.getValueAt(Object node, int column) Returns the value to be displayed for nodenode, at column numbercolumn.booleanMethods inherited from class org.jppf.ui.treetable.AbstractTreeTableModel
addTreeModelListener, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getColumnTooltip, getIndexOfChild, getRoot, isCellEditable, removeTreeModelListener, setValueAt, valueForPathChanged
-
Field Details
-
ZERO
The the returned file length for directories.
-
-
Constructor Details
-
FileSystemModel
public FileSystemModel()Default constructor.
-
-
Method Details
-
getFile
Get the file a node points to.- Parameters:
node- the node to get the file from.- Returns:
- a
Fileinstance.
-
getChildren
Get the children of the specified node.- Parameters:
node- the node to get the children of.- Returns:
- the children as an array of objects
-
getChildCount
-
getChild
-
isLeaf
- Specified by:
isLeafin interfaceTreeModel- Overrides:
isLeafin classAbstractTreeTableModel
-
getColumnCount
public int getColumnCount()Returns the number ofs available columns.- Returns:
- the number of columns.
-
getColumnName
Returns the name for column numbercolumn.- Parameters:
column- the column number.- Returns:
- the name of the column as a string.
-
getColumnClass
Returns the type for column numbercolumn.- Specified by:
getColumnClassin interfaceTreeTableModel- Overrides:
getColumnClassin classAbstractTreeTableModel- Parameters:
column- the column number.- Returns:
- the type of the column.
-
getValueAt
Returns the value to be displayed for nodenode, at column numbercolumn.- Parameters:
node- the node for which to get the value.column- the column where the value is.- Returns:
- the value for the specified node and column.
-