Class FileTableModel

java.lang.Object
javax.swing.table.AbstractTableModel
noaa.coastwatch.gui.open.FileTableModel
All Implemented Interfaces:
Serializable, TableModel

public class FileTableModel extends AbstractTableModel
The FileTableModel uses a list of DirectoryLister.Entry objects to present a view of a directory and its subdirectories and files.
Since:
3.2.0
Author:
Peter Hollemans
See Also:
  • Field Details

    • NAME_COLUMN

      public static final int NAME_COLUMN
      Column index of file name.
      See Also:
    • SIZE_COLUMN

      public static final int SIZE_COLUMN
      Column index of file size.
      See Also:
    • DATE_COLUMN

      public static final int DATE_COLUMN
      Column index of file modified date.
      See Also:
    • EMPTY

      public static final DirectoryLister.Entry EMPTY
      The empty directory entry.
  • Constructor Details

    • FileTableModel

      public FileTableModel()
      Creates a new file table model with an empty entry list.
  • Method Details

    • clear

      public void clear()
      Clears the entry list so that no data is contained.
    • setEntryList

      public void setEntryList(List entryList)
      Sets the entry list for this model.
    • getRowCount

      public int getRowCount()
      Gets the number of directory entries.
    • getColumnCount

      public int getColumnCount()
      Gets the number of directory entry columns.
    • getEntry

      public DirectoryLister.Entry getEntry(int row)
      Gets the directory entry at the specified row.
    • getValueAt

      public Object getValueAt(int row, int column)
      Gets the directory entry value.
    • getColumnName

      public String getColumnName(int column)
      Gets the table column name.
      Specified by:
      getColumnName in interface TableModel
      Overrides:
      getColumnName in class AbstractTableModel