Package adams.gui.tools
Class FileChooserBookmarksManagementPanel.TableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- adams.gui.core.AbstractBaseTableModel
-
- adams.gui.selection.AbstractTableBasedSelectionPanel.AbstractSelectionTableModel<T>
-
- adams.gui.tools.AbstractManagementTableModel<com.googlecode.jfilechooserbookmarks.Bookmark>
-
- adams.gui.tools.FileChooserBookmarksManagementPanel.TableModel
-
- All Implemented Interfaces:
LoggingLevelHandler,LoggingSupporter,SpreadSheetSupporter,ClearableModel,CustomSearchTableModel,Serializable,TableModel
- Enclosing class:
- FileChooserBookmarksManagementPanel
public static class FileChooserBookmarksManagementPanel.TableModel extends AbstractManagementTableModel<com.googlecode.jfilechooserbookmarks.Bookmark>
A simple table model for displaying the contacts.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.gui.tools.AbstractManagementTableModel
m_Sorted, m_Values
-
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 TableModel()the constructor.TableModel(com.googlecode.jfilechooserbookmarks.Bookmark[] bookmarks)the constructor.TableModel(List<com.googlecode.jfilechooserbookmarks.Bookmark> bookmarks)the constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassgetColumnClass(int columnIndex)Returns the class type of the column.intgetColumnCount()Returns the number of columns in the table, i.e., 2.StringgetColumnName(int column)Returns the name of the column.ObjectgetValueAt(int row, int column)Returns the substance value at the given position.booleanisSearchMatch(SearchParameters params, int row)Tests whether the search matches the specified row.-
Methods inherited from class adams.gui.tools.AbstractManagementTableModel
add, addAll, clear, getItemAt, getRowCount, indexOf, isSorted, moveDown, moveUp, remove, toList
-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, isCellEditable, removeTableModelListener, setValueAt
-
-
-
-
Constructor Detail
-
TableModel
public TableModel()
the constructor.
-
TableModel
public TableModel(List<com.googlecode.jfilechooserbookmarks.Bookmark> bookmarks)
the constructor.- Parameters:
bookmarks- the bookmarks to display
-
TableModel
public TableModel(com.googlecode.jfilechooserbookmarks.Bookmark[] bookmarks)
the constructor.- Parameters:
bookmarks- the bookmarks to display
-
-
Method Detail
-
getColumnCount
public int getColumnCount()
Returns the number of columns in the table, i.e., 2.- Specified by:
getColumnCountin interfaceTableModel- Specified by:
getColumnCountin classAbstractManagementTableModel<com.googlecode.jfilechooserbookmarks.Bookmark>- Returns:
- the number of columns, always 2
-
getColumnName
public String getColumnName(int column)
Returns the name of the column.- Specified by:
getColumnNamein interfaceTableModel- Specified by:
getColumnNamein classAbstractManagementTableModel<com.googlecode.jfilechooserbookmarks.Bookmark>- Parameters:
column- the column to get the name for- Returns:
- the name of the column
-
getColumnClass
public Class getColumnClass(int columnIndex)
Returns the class type of the column.- Specified by:
getColumnClassin interfaceTableModel- Specified by:
getColumnClassin classAbstractManagementTableModel<com.googlecode.jfilechooserbookmarks.Bookmark>- Parameters:
columnIndex- the column to get the class for- Returns:
- the class for the column
-
getValueAt
public Object getValueAt(int row, int column)
Returns the substance value at the given position.- Specified by:
getValueAtin interfaceTableModel- Specified by:
getValueAtin classAbstractManagementTableModel<com.googlecode.jfilechooserbookmarks.Bookmark>- Parameters:
row- the rowcolumn- the column (ignored, since only 1 column)- Returns:
- the value
-
isSearchMatch
public boolean isSearchMatch(SearchParameters params, int row)
Tests whether the search matches the specified row.- Specified by:
isSearchMatchin interfaceCustomSearchTableModel- Specified by:
isSearchMatchin classAbstractManagementTableModel<com.googlecode.jfilechooserbookmarks.Bookmark>- Parameters:
params- the search parametersrow- the row of the underlying, unsorted model- Returns:
- true if the search matches this row
-
-