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:
  • Constructor Details

    • DssOutputTableModel

      public DssOutputTableModel(String[] columnNames)
      Instantiates a new dss output table model.
      Parameters:
      String - [] columnNames the column names
  • Method Details

    • setDataArray

      public void setDataArray(hec.ui.TristateCheckBoxData[][] data, Class elementClass)
      Sets the data array.
      Parameters:
      TristateCheckBoxData - [][] the new data array
    • setTableFilling

      public void setTableFilling(boolean tf)
    • setValueAt

      public void setValueAt(Object value, int row, int col)
      Specified by:
      setValueAt in interface TableModel
      Overrides:
      setValueAt in class rma.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 row
      col - 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

      public Object getValueAt(int row, int col)
      Description copied from class: rma.swing.table.AbstractRmaTableModel
      Returns the value at a given row/column location. The default method returns null. Needs to be overrridden
      Specified by:
      getValueAt in interface TableModel
      Overrides:
      getValueAt in class rma.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:
      getModel in class rma.swing.table.RmaTableModel
    • saveTable

      public void saveTable(DssOutputData outputData)
      Save table.
      Parameters:
      outputData - the output data