Package hec.util

Class GeneralTableModel

All Implemented Interfaces:
Serializable, TableModel, RmaTableModelInterface

public class GeneralTableModel extends RmaTableModel
See Also:
  • Field Details

    • colNames

      protected String[] colNames
    • _rows

      protected Vector _rows
    • _dataChanged

      protected boolean _dataChanged
    • _editable

      protected boolean _editable
  • Constructor Details

    • GeneralTableModel

      public GeneralTableModel(String[] columnNames)
    • GeneralTableModel

      public GeneralTableModel()
  • Method Details

    • setEditable

      public void setEditable(boolean editable)
    • getEditable

      public boolean getEditable()
    • setColumnNames

      public void setColumnNames(String[] columnNames)
      Specified by:
      setColumnNames in interface RmaTableModelInterface
      Overrides:
      setColumnNames in class RmaTableModel
    • getColumnCount

      public int getColumnCount()
      Description copied from class: AbstractRmaTableModel
      Returns the number of columns represented by this model. The number of columns is determined by the number of column labels assigned to this table model. If the array of column labels is null, 0 columns are held.
      Specified by:
      getColumnCount in interface TableModel
      Overrides:
      getColumnCount in class RmaTableModel
    • getRowCount

      public int getRowCount()
      Description copied from class: AbstractRmaTableModel
      Returns the number of row in the table model. The default method always returns 0, so this method must be overridden to return a row count other than 0.
      Specified by:
      getRowCount in interface TableModel
      Overrides:
      getRowCount in class RmaTableModel
      Returns:
      the row count.
    • setRows

      public void setRows(Vector rows)
    • getRows

      public Vector getRows()
    • getColumnClass

      public Class getColumnClass(int column)
      Specified by:
      getColumnClass in interface TableModel
      Overrides:
      getColumnClass in class RmaTableModel
    • getValueAt

      public Object getValueAt(int row, int column)
      Description copied from class: 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 RmaTableModel
      Parameters:
      row - the row to look for the value in.
      column - the column to look for the value in.
    • setValueAt

      public void setValueAt(Object object, int row, int column)
      Specified by:
      setValueAt in interface TableModel
      Overrides:
      setValueAt in class RmaTableModel
    • getColumnName

      public String getColumnName(int column)
      Specified by:
      getColumnName in interface TableModel
      Overrides:
      getColumnName in class RmaTableModel
    • addRow

      public void addRow(int row)
    • removeRow

      public void removeRow(int row)
    • moveRowUp

      public void moveRowUp(int row)
    • moveRowDown

      public void moveRowDown(int row)
    • isCellEditable

      public boolean isCellEditable(int row, int column)
      Specified by:
      isCellEditable in interface TableModel
      Overrides:
      isCellEditable in class RmaTableModel
    • setDataChanged

      public void setDataChanged(boolean dataChanged)
    • getDataChanged

      public boolean getDataChanged()
    • search

      public boolean search(String findStr, int startingRow, int startingColumn, int firstColumn, boolean wholeWordOnly, boolean caseSensitive, boolean down, Dimension rowCol)
    • replace

      public boolean replace(String findStr, String replaceStr, int startingRow, int startingColumn, int firstColumn, boolean wholeWordOnly, boolean caseSensitive, boolean down, Dimension rowCol)
    • searchReplace

      protected boolean searchReplace(String findStr, String replaceStr, boolean replace, int startingRow, int startingColumn, int firstColumn, boolean wholeWordOnly, boolean caseSensitive, boolean down, Dimension rowCol)
    • replaceAll

      public boolean replaceAll(String findStr, String replaceStr, int firstColumn, int firstRow, boolean wholeWordOnly, boolean caseSensitive)