public class FileTableModel
extends javax.swing.table.AbstractTableModel
FileTableModel
uses a list of DirectoryLister.Entry
objects to present a view of a directory and
its subdirectories and files.Modifier and Type | Field and Description |
---|---|
static int |
DATE_COLUMN
Column index of file modified date.
|
static DirectoryLister.Entry |
EMPTY
The empty directory entry.
|
static int |
NAME_COLUMN
Column index of file name.
|
static int |
SIZE_COLUMN
Column index of file size.
|
Constructor and Description |
---|
FileTableModel()
Creates a new file table model with an empty entry list.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the entry list so that no data is contained.
|
int |
getColumnCount()
Gets the number of directory entry columns.
|
java.lang.String |
getColumnName(int column)
Gets the table column name.
|
DirectoryLister.Entry |
getEntry(int row)
Gets the directory entry at the specified row.
|
int |
getRowCount()
Gets the number of directory entries.
|
java.lang.Object |
getValueAt(int row,
int column)
Gets the directory entry value.
|
void |
setEntryList(java.util.List entryList)
Sets the entry list for this model.
|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
public static final int NAME_COLUMN
public static final int SIZE_COLUMN
public static final int DATE_COLUMN
public static final DirectoryLister.Entry EMPTY
public FileTableModel()
public void clear()
public void setEntryList(java.util.List entryList)
public int getRowCount()
public int getColumnCount()
public DirectoryLister.Entry getEntry(int row)
public java.lang.Object getValueAt(int row, int column)
public java.lang.String getColumnName(int column)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel