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
FieldsModifier and TypeFieldDescriptionstatic final intColumn index of file modified date.static final DirectoryLister.EntryThe empty directory entry.static final intColumn index of file name.static final intColumn index of file size.Fields inherited from class javax.swing.table.AbstractTableModel
listenerList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the entry list so that no data is contained.intGets 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.intGets the number of directory entries.getValueAt(int row, int column) Gets the directory entry value.voidsetEntryList(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:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classAbstractTableModel
-