Package adams.gui.core
Class FileWrapperTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- adams.gui.core.AbstractBaseTableModel
-
- adams.gui.core.FileWrapperTableModel
-
- All Implemented Interfaces:
LoggingLevelHandler
,LoggingSupporter
,SpreadSheetSupporter
,Serializable
,TableModel
public class FileWrapperTableModel extends AbstractBaseTableModel
The model for the table.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected DateFormat
m_DateFormat
the date formatter.protected List<FileObject>
m_Files
the files.protected boolean
m_ShowParentDirs
whether to show parent dirs.-
Fields inherited from class adams.gui.core.AbstractBaseTableModel
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
-
Constructor Summary
Constructors Constructor Description FileWrapperTableModel(List<FileObject> files, boolean showParentDirs)
Initializes the model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<?>
getColumnClass(int columnIndex)
Returns the class of the column.int
getColumnCount()
Returns the number of columns.String
getColumnName(int column)
Returns the name of the column.int
getRowCount()
Returns the number of files/rows.boolean
getShowParentDirs()
Returns whether to show the parent directories.Object
getValueAt(int rowIndex, int columnIndex)
Returns the value at the specified location.-
Methods inherited from class adams.gui.core.AbstractBaseTableModel
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, setLoggingLevel, toSpreadSheet, toString
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
-
-
-
-
Field Detail
-
m_Files
protected List<FileObject> m_Files
the files.
-
m_ShowParentDirs
protected boolean m_ShowParentDirs
whether to show parent dirs.
-
m_DateFormat
protected DateFormat m_DateFormat
the date formatter.
-
-
Constructor Detail
-
FileWrapperTableModel
public FileWrapperTableModel(List<FileObject> files, boolean showParentDirs)
Initializes the model.- Parameters:
files
- the filesshowParentDirs
- true if to show parent dirs
-
-
Method Detail
-
getShowParentDirs
public boolean getShowParentDirs()
Returns whether to show the parent directories.- Returns:
- true if to show
-
getRowCount
public int getRowCount()
Returns the number of files/rows.- Returns:
- the number of rows
-
getColumnCount
public int getColumnCount()
Returns the number of columns.- Returns:
- the number of columns
-
getColumnName
public String getColumnName(int column)
Returns the name of the column.- Specified by:
getColumnName
in interfaceTableModel
- Overrides:
getColumnName
in classAbstractTableModel
- Parameters:
column
- the index of the column- Returns:
- the name, null if not available
-
getColumnClass
public Class<?> getColumnClass(int columnIndex)
Returns the class of the column.- Specified by:
getColumnClass
in interfaceTableModel
- Overrides:
getColumnClass
in classAbstractTableModel
- Parameters:
columnIndex
- the index of the column- Returns:
- the class, null if not available
-
getValueAt
public Object getValueAt(int rowIndex, int columnIndex)
Returns the value at the specified location.- Parameters:
rowIndex
- the rowcolumnIndex
- the column- Returns:
- the value, null if not available
-
-