Package hec.rss.model
Class DssOutputTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
rma.swing.table.AbstractRmaTableModel
rma.swing.table.RmaTableModel
hec.rss.model.DssOutputTableModel
- All Implemented Interfaces:
Serializable,TableModel,rma.swing.table.RmaTableModelInterface
public class DssOutputTableModel
extends rma.swing.table.RmaTableModel
implements rma.swing.table.RmaTableModelInterface
The Class DssOutputTableModel. Sets the states of the table and determines the tables
row and column header states for the TristateCheckBox cells
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class rma.swing.table.RmaTableModel
rma.swing.table.RmaTableModel.IntContainer -
Field Summary
Fields inherited from class rma.swing.table.RmaTableModel
colParamId, rows, UNDEF_COLUMN_UNIT_SYSTEMFields inherited from class rma.swing.table.AbstractRmaTableModel
m_columnNames, m_displayUnitSystem, m_gmtOffset, m_unitSystemFields inherited from class javax.swing.table.AbstractTableModel
listenerListFields inherited from interface rma.swing.table.RmaTableModelInterface
UNDEF_COLUMN_PARAM_ID -
Constructor Summary
ConstructorsConstructorDescriptionDssOutputTableModel(String[] columnNames) Instantiates a new dss output table model. -
Method Summary
Modifier and TypeMethodDescriptionhec.ui.TristateCheckBox.Statehec.ui.TristateCheckBox.StatecheckColumnSelectedState(int col) voidcheckRowColumnHeadersState(int row, int col) After setting the check box state, the header states need to be re-set.hec.ui.TristateCheckBox.StatecheckRowSelectedState(int row) rma.swing.table.RmaTableModelgetModel()getValueAt(int row, int col) Returns the value at a given row/column location.hec.ui.TristateCheckBox.StatenextState(hec.ui.TristateCheckBox.State current) voidsaveTable(DssOutputData outputData) Save table.voidsetDataArray(hec.ui.TristateCheckBoxData[][] data, Class elementClass) Sets the data array.voidsetTableFilling(boolean tf) voidsetValueAt(Object value, int row, int col) Methods inherited from class rma.swing.table.RmaTableModel
addColumn, addColumn, addRow, addRow, clearAll, clearNonEditableCells, deleteRow, getColumnClass, getColumnCount, getColumnName, getColumnParameter, getDataVector, getGmtOffset, getRow, getRowCount, insertRow, insertRows, isCellEditable, load, newRowsAdded, removeColumn, resetRowEnabled, save, setCellEnabled, setColEnabled, setColumnClass, setColumnName, setColumnNames, setColumnNames, setColumnParameters, setGmtOffset, setRowEnabled, setUnitSystemMethods inherited from class rma.swing.table.AbstractRmaTableModel
getDisplayUnitSystem, getUnitSystem, setDisplayUnitsSystemMethods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface rma.swing.table.RmaTableModelInterface
addColumn, addColumn, addRow, clearAll, deleteRow, getColumnParameter, getDataVector, getGmtOffset, getRow, getUnitSystem, insertRow, insertRows, resetRowEnabled, setCellEnabled, setColEnabled, setColumnClass, setColumnNames, setColumnNames, setColumnParameters, setDisplayUnitsSystem, setRowEnabledMethods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, isCellEditable, removeTableModelListener
-
Constructor Details
-
DssOutputTableModel
Instantiates a new dss output table model.- Parameters:
String- [] columnNames the column names
-
-
Method Details
-
setDataArray
Sets the data array.- Parameters:
TristateCheckBoxData- [][] the new data array
-
setTableFilling
public void setTableFilling(boolean tf) -
setValueAt
- Specified by:
setValueAtin interfaceTableModel- Overrides:
setValueAtin classrma.swing.table.RmaTableModel
-
nextState
public hec.ui.TristateCheckBox.State nextState(hec.ui.TristateCheckBox.State current) -
checkRowColumnHeadersState
public void checkRowColumnHeadersState(int row, int col) After setting the check box state, the header states need to be re-set. this method goes through the rows and columns and checks what the column and row header states should be and sets them accordingly. should be, then sets the head. This method should be called in or after the setValue method.- Parameters:
row- the rowcol- the col
-
checkRowSelectedState
public hec.ui.TristateCheckBox.State checkRowSelectedState(int row) -
checkColumnSelectedState
public hec.ui.TristateCheckBox.State checkColumnSelectedState(int col) -
checkAllSelectedState
public hec.ui.TristateCheckBox.State checkAllSelectedState() -
getValueAt
Description copied from class:rma.swing.table.AbstractRmaTableModelReturns the value at a given row/column location. The default method returns null. Needs to be overrridden- Specified by:
getValueAtin interfaceTableModel- Overrides:
getValueAtin classrma.swing.table.RmaTableModel- Parameters:
row- the row to look for the value in.col- the column to look for the value in.- Returns:
-
getModel
public rma.swing.table.RmaTableModel getModel()- Overrides:
getModelin classrma.swing.table.RmaTableModel
-
saveTable
Save table.- Parameters:
outputData- the output data
-