Class FileSystemModel

java.lang.Object
org.jppf.ui.treetable.AbstractTreeTableModel
org.jppf.ui.treetable.FileSystemModel
All Implemented Interfaces:
Serializable, TreeModel, TreeTableModel

public class FileSystemModel extends AbstractTreeTableModel
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 Details

    • ZERO

      public static final Integer ZERO
      The the returned file length for directories.
  • Constructor Details

    • FileSystemModel

      public FileSystemModel()
      Default constructor.
  • Method Details

    • getFile

      protected File getFile(Object node)
      Get the file a node points to.
      Parameters:
      node - the node to get the file from.
      Returns:
      a File instance.
    • getChildren

      protected Object[] getChildren(Object node)
      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

      public int getChildCount(Object node)
    • getChild

      public Object getChild(Object node, int i)
    • isLeaf

      public boolean isLeaf(Object node)
      Specified by:
      isLeaf in interface TreeModel
      Overrides:
      isLeaf in class AbstractTreeTableModel
    • getColumnCount

      public int getColumnCount()
      Returns the number ofs available columns.
      Returns:
      the number of columns.
    • getColumnName

      public String getColumnName(int column)
      Returns the name for column number column.
      Parameters:
      column - the column number.
      Returns:
      the name of the column as a string.
    • getColumnClass

      public Class<?> getColumnClass(int column)
      Returns the type for column number column.
      Specified by:
      getColumnClass in interface TreeTableModel
      Overrides:
      getColumnClass in class AbstractTreeTableModel
      Parameters:
      column - the column number.
      Returns:
      the type of the column.
    • getValueAt

      public Object getValueAt(Object node, int column)
      Returns the value to be displayed for node node, at column number column.
      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.