com.zfqjava.swing.model
Class FileTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
com.zfqjava.swing.model.FileTableModel
- All Implemented Interfaces:
- ColumnSorter, Reloadable, Serializable, TableModel
public class FileTableModel
- extends AbstractTableModel
- implements ColumnSorter, Reloadable
FileTableModel provides a file table model.
- See Also:
- Serialized Form
| Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileTableModel
public FileTableModel(File directory)
FileTableModel
public FileTableModel(File directory,
boolean sync,
Component component)
- Creates a FileTableModel.
- Parameters:
directory - the directory to displaysync - false will list the files in background threadcomponent - the component to display the wait cursor
getDirectory
public File getDirectory()
reload
public void reload()
- Description copied from interface:
Reloadable
- Reloads the model contents.
- Specified by:
reload in interface Reloadable
sortColumn
public void sortColumn(int column,
boolean ascending)
- Sorts the specified column.
- Specified by:
sortColumn in interface ColumnSorter
- Parameters:
column - the column to sortascending - the sort order
getRowCount
public int getRowCount()
- Specified by:
getRowCount in interface TableModel
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount in interface TableModel
getColumnName
public String getColumnName(int column)
- Specified by:
getColumnName in interface TableModel- Overrides:
getColumnName in class AbstractTableModel
getColumnClass
public Class getColumnClass(int column)
- Specified by:
getColumnClass in interface TableModel- Overrides:
getColumnClass in class AbstractTableModel
getValueAt
public Object getValueAt(int row,
int column)
- Specified by:
getValueAt in interface TableModel
setValueAt
public void setValueAt(Object o,
int row,
int column)
- Specified by:
setValueAt in interface TableModel- Overrides:
setValueAt in class AbstractTableModel
isCellEditable
public boolean isCellEditable(int row,
int column)
- Specified by:
isCellEditable in interface TableModel- Overrides:
isCellEditable in class AbstractTableModel
Send your Feedback
JComponentPack 1.5.0
Copyright © 2001-2007 Extreme Component, Inc. All rights reserved.