Package noaa.coastwatch.gui.open
Class DataVariableTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
noaa.coastwatch.gui.open.DataVariableTableModel
- All Implemented Interfaces:
Serializable
,TableModel
The
DataVariableTableModel
class models the
information in a list of DataVariable
objects. It contains a number of columns including the variable
name and units.- Since:
- 3.2.0
- Author:
- Peter Hollemans
- See Also:
-
Field Summary
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
Constructor Summary
ConstructorDescriptionCreates a new table model with no data.DataVariableTableModel
(List variableList) Creates a new table model using the varible list. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears the variable list so that no data is contained.int
Gets the number of table columns.getColumnName
(int column) Gets the table column name.int
Gets the number of table rows.getValueAt
(int row, int column) Gets the table data value.getVariable
(int row) Gets the variable at the specified row.static void
Tests this class.void
setVariableList
(List variableList) Sets the variable list for this model.Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
-
Constructor Details
-
DataVariableTableModel
public DataVariableTableModel()Creates a new table model with no data. -
DataVariableTableModel
Creates a new table model using the varible list.
-
-
Method Details
-
clear
public void clear()Clears the variable list so that no data is contained. -
setVariableList
Sets the variable list for this model. -
getRowCount
public int getRowCount()Gets the number of table rows. -
getColumnCount
public int getColumnCount()Gets the number of table columns. -
getValueAt
Gets the table data value. -
getVariable
Gets the variable at the specified row. -
getColumnName
Gets the table column name.- Specified by:
getColumnName
in interfaceTableModel
- Overrides:
getColumnName
in classAbstractTableModel
-
main
Tests this class.- Parameters:
argv
- the array of command line parameters.- Throws:
Exception
-