Package noaa.coastwatch.gui.open
Class FileTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
noaa.coastwatch.gui.open.FileTableModel
- All Implemented Interfaces:
Serializable
,TableModel
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 Summary
Modifier and TypeFieldDescriptionstatic final int
Column index of file modified date.static final DirectoryLister.Entry
The empty directory entry.static final int
Column index of file name.static final int
Column index of file size.Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears the entry list so that no data is contained.int
Gets the number of directory entry columns.getColumnName
(int column) Gets the table column name.getEntry
(int row) Gets the directory entry at the specified row.int
Gets the number of directory entries.getValueAt
(int row, int column) Gets the directory entry value.void
setEntryList
(List entryList) Sets the entry list for this model.Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
-
Field Details
-
NAME_COLUMN
public static final int NAME_COLUMNColumn index of file name.- See Also:
-
SIZE_COLUMN
public static final int SIZE_COLUMNColumn index of file size.- See Also:
-
DATE_COLUMN
public static final int DATE_COLUMNColumn index of file modified date.- See Also:
-
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
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
Gets the directory entry at the specified row. -
getValueAt
Gets the directory entry value. -
getColumnName
Gets the table column name.- Specified by:
getColumnName
in interfaceTableModel
- Overrides:
getColumnName
in classAbstractTableModel
-