Package adams.gui.core
Class MapTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- adams.gui.core.AbstractBaseTableModel
-
- adams.gui.core.KeyValuePairTableModel
-
- adams.gui.core.MapTableModel
-
- All Implemented Interfaces:
LoggingLevelHandler
,LoggingSupporter
,SpreadSheetSupporter
,CustomSearchTableModel
,Serializable
,TableModel
public class MapTableModel extends KeyValuePairTableModel
The model for displaying a map.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Class
m_TypeValue
the type of the value column.-
Fields inherited from class adams.gui.core.KeyValuePairTableModel
m_ColumnNames, m_Data, m_Editable, m_Modified
-
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 MapTableModel()
Initializes the table model with no data.MapTableModel(String[] colNames)
Initializes the table model with no data.MapTableModel(Map data)
Initializes the table model.MapTableModel(Map data, Class typeValue)
Initializes the table model.MapTableModel(Map data, String[] colNames)
Initializes the table model.MapTableModel(Map data, String[] colNames, Class typeValue)
Initializes the table model.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static Object[][]
convert(Map data)
Turns the hashtable into key-value pairs.Class
getColumnClass(int column)
Returns the class for the column.-
Methods inherited from class adams.gui.core.KeyValuePairTableModel
getColumnCount, getColumnName, getKeyAt, getRowCount, getValueAt, getValueAt, isCellEditable, isEditable, isModified, isSearchMatch, setEditable, setModified, setValueAt
-
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, removeTableModelListener
-
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, removeTableModelListener
-
-
-
-
Field Detail
-
m_TypeValue
protected Class m_TypeValue
the type of the value column.
-
-
Constructor Detail
-
MapTableModel
public MapTableModel()
Initializes the table model with no data.
-
MapTableModel
public MapTableModel(String[] colNames)
Initializes the table model with no data.- Parameters:
colNames
- the column names to use
-
MapTableModel
public MapTableModel(Map data)
Initializes the table model.- Parameters:
data
- the map to display
-
MapTableModel
public MapTableModel(Map data, Class typeValue)
Initializes the table model.- Parameters:
data
- the map to displaytypeValue
- the type for the value column, ignored if null
-
MapTableModel
public MapTableModel(Map data, String[] colNames)
Initializes the table model.- Parameters:
data
- the map to displaycolNames
- the column names to use
-
-
Method Detail
-
getColumnClass
public Class getColumnClass(int column)
Returns the class for the column.- Specified by:
getColumnClass
in interfaceTableModel
- Overrides:
getColumnClass
in classKeyValuePairTableModel
- Parameters:
column
- the column to retrieve the class for- Returns:
- the class
-
-