Package hec.dataTable

Class HecDataTable

All Implemented Interfaces:
ActionListener, ItemListener, KeyListener, MouseListener, TextListener, ImageObserver, MenuContainer, Printable, Serializable, EventListener, Accessible, CellEditorListener, DocumentListener, ListSelectionListener, RowSorterListener, TableColumnModelListener, TableModelListener, Scrollable, Modifiable, TimeZoneComponent, UnitsComponent, EditableComponent, FormManagementListener, RmaValidComponent

public class HecDataTable extends RmaJTable implements TableModelListener
Description of the Class
See Also:
  • Field Details

    • _editMode

      protected boolean _editMode
      Description of the Field
    • _tableData

      protected hec.dataTable.DataModel _tableData
    • _allowSort

      protected boolean _allowSort
    • _hasBeenSorted

      protected boolean _hasBeenSorted
    • _parentFrame

      protected Component _parentFrame
    • _ignoreNextEditingStopped

      protected boolean _ignoreNextEditingStopped
  • Constructor Details

    • HecDataTable

      public HecDataTable(Component parentFrame)
      Constructor for the Table object
      Parameters:
      parentFrame - Description of Parameter
    • HecDataTable

      public HecDataTable(Component parentFrame, boolean allowSort)
  • Method Details

    • init

      protected void init()
    • setData

      public int setData(List dataSets, boolean showCommas, int qualityStyle)
      Sets the data attribute of the Table object
      Parameters:
      dataSets - The new data value
      showCommas - The new data value
      qualityStyle - The new data value
      Returns:
      Description of the Returned Value
    • setupModel

      public void setupModel()
      Description of the Method
    • setToolTipHeaders

      protected void setToolTipHeaders()
    • setSorter

      protected void setSorter()
    • setData

      public int setData(DataContainer container, boolean showCommas, int qualityStyle)
      Sets the data attribute of the Table object
      Parameters:
      container - The new data value
      showCommas - The new data value
      qualityStyle - The new data value
      Returns:
      Description of the Returned Value
    • setEditable

      public void setEditable(boolean isEditable)
      Sets the editable attribute of the Table object
      Overrides:
      setEditable in class RmaJTable
      Parameters:
      isEditable - The new editable value
    • selectColumnHeader

      protected void selectColumnHeader(int column)
    • setDateStyle

      public void setDateStyle(int dateStyle)
      Sets the dateStyle attribute of the Table object
      Parameters:
      dateStyle - The new dateStyle value
    • setColumnWidths

      public void setColumnWidths()
    • setExtendable

      public void setExtendable(boolean extendable, int numberBlankRows)
      Sets the extendable attribute of the Table object
      Parameters:
      extendable - The new extendable value
      numberBlankRows - The new extendable value
    • setDateTimeAsTwoColumns

      public void setDateTimeAsTwoColumns(boolean dateTimeAsTwoColumns)
      Sets the dateTimeAsTwoColumns attribute of the Table object
      Parameters:
      dateTimeAsTwoColumns - The new dateTimeAsTwoColumns value
    • getTableModel

      public hec.dataTable.DataModel getTableModel()
    • setCommas

      public void setCommas(boolean showCommas)
      Sets the commas attribute of the Table object
      Parameters:
      showCommas - The new commas value
    • showTimeAsBeginningOfDay

      public void showTimeAsBeginningOfDay(boolean showTimeAsBeginning)
    • setShowTimes

      public void setShowTimes(boolean showTimes)
    • getShowTimes

      public boolean getShowTimes()
    • setShowFullDefinition

      public void setShowFullDefinition(boolean showFullDefinition)
    • getShowFullDefinition

      public boolean getShowFullDefinition()
    • setDecimalPosition

      public void setDecimalPosition(int numberDecimals)
      Sets the decimalPosition attribute of the Table object
      Parameters:
      numberDecimals - The new decimalPosition value
    • setDecimalPosition

      public void setDecimalPosition(int column, int numberDecimals)
      Sets the decimalPosition attribute of the Table object
      Parameters:
      column - The table column to set
      numberDecimals - The new decimalPosition value
    • setUndefinedStyle

      public void setUndefinedStyle(int undefinedStyle)
      Sets the undefinedStyle attribute of the Table object
      Parameters:
      undefinedStyle - The new undefinedStyle value
    • setNumberHeaderRows

      public void setNumberHeaderRows(int number)
      Sets the numberHeaderRows attribute of the Table object
      Parameters:
      number - The new numberHeaderRows value
    • getTableType

      public String getTableType()
    • getDataSets

      public Vector getDataSets()
      Gets the dataSets attribute of the Table object
      Returns:
      The dataSets value
    • getDateStyle

      public int getDateStyle()
      Gets the dateStyle attribute of the Table object
      Returns:
      The dateStyle value
    • getDateTimeAsTwoColumns

      public boolean getDateTimeAsTwoColumns()
      Gets the dateTimeAsTwoColumns attribute of the Table object
      Returns:
      The dateTimeAsTwoColumns value
    • getDecimalPosition

      public int getDecimalPosition()
      Gets the decimalPosition attribute of the Table object
      Returns:
      The decimalPosition value
    • getDecimalPosition

      public int getDecimalPosition(int column)
      Gets the decimalPosition attribute of the Table object
      Parameters:
      column - The column to retrieve the postion from
      Returns:
      The decimalPosition value
    • getRowCount

      public int getRowCount()
      Gets the rowCount attribute of the Table object
      Overrides:
      getRowCount in class JTable
      Returns:
      The rowCount value
    • getColumnCount

      public int getColumnCount()
      Gets the columnCount attribute of the Table object
      Overrides:
      getColumnCount in class JTable
      Returns:
      The columnCount value
    • getDataColumnCount

      public int getDataColumnCount()
    • getFirstDataColumn

      public int getFirstDataColumn()
    • getFirstDataRow

      public int getFirstDataRow()
    • getNominalName

      public String getNominalName()
      Gets the nominalName attribute of the Table object
      Returns:
      The nominalName value
    • getName

      public String getName()
      Gets the name attribute of the Table object
      Overrides:
      getName in class Component
      Returns:
      The name value
    • getNumberHeaderRows

      public int getNumberHeaderRows()
      Gets the numberHeaderRows attribute of the Table object
      Returns:
      The numberHeaderRows value
    • isCellEditable

      public boolean isCellEditable(int row, int column)
      Description copied from class: RmaJTable
      Returns true if the cell at row and column is editable. Otherwise, invoking setValueAt on the cell will have no effect.

      Note: The column is specified in the table view's display order, and not in the TableModel's column order. This is an important distinction because as the user rearranges the columns in the table, the column at a given index in the view will change. Meanwhile the user's actions never affect the model's column ordering.

      Overrides:
      isCellEditable in class RmaJTable
      Parameters:
      row - the row whose value is to be queried
      column - the column whose value is to be queried
      Returns:
      true if the cell is editable
      See Also:
    • getToolTipText

      public String getToolTipText(MouseEvent event)
      Gets the toolTipText attribute of the Table object
      Overrides:
      getToolTipText in class RmaJTable
      Parameters:
      event - Description of Parameter
      Returns:
      The toolTipText value
    • getSelectedDataString

      public String getSelectedDataString()
      Gets the selectedDataString attribute of the Table object
      Returns:
      The selectedDataString value
    • addData

      public int addData(TimeSeriesContainer timeSeriesContainer)
      Adds a feature to the Data attribute of the Table object
      Parameters:
      timeSeriesContainer - The feature to be added to the Data attribute
      Returns:
      Description of the Returned Value
    • xgetCellRenderer

      public TableCellRenderer xgetCellRenderer(int row, int column)
      Description of the Method
      Parameters:
      row - Description of Parameter
      column - Description of Parameter
      Returns:
      Description of the Returned Value
    • tableChanged

      public void tableChanged(TableModelEvent e)
      Description of the Method
      Specified by:
      tableChanged in interface TableModelListener
      Overrides:
      tableChanged in class RmaJTable
      Parameters:
      e - Description of Parameter
    • export

      public void export(String filename)
      export the table to file specified with default export options.
      Parameters:
      filename - Description
    • export

      public void export(String filename, TableExportOptions exportOptions)
      export the table to file specified with the export options specified by options.
      Parameters:
      filename - Description
      exportOptions - Description
    • stopEditing

      public void stopEditing()
      Description of the Method
    • initializeEntryStartTime

      public void initializeEntryStartTime()
      Description of the Method
    • allowSort

      public void allowSort(boolean doSort)
      Description of the Method
      Parameters:
      doSort - Description of Parameter
    • numberOfPairedCurvesChanged

      public void numberOfPairedCurvesChanged(int newNumber)
      Description of the Method
      Parameters:
      newNumber - Description of Parameter
    • hasDataChanged

      public boolean hasDataChanged()
      Description of the Method
      Returns:
      Description of the Returned Value
    • setDataChanged

      public void setDataChanged(boolean dataChanged)
    • hasQuality

      public boolean hasQuality()
      Description of the Method
      Returns:
      Description of the Returned Value
    • updateContainers

      public int updateContainers(int[] firstError)
      Description of the Method
    • getDataContainers

      public Vector getDataContainers()
    • save

      public void save(Object parent)
      Description of the Method
      Parameters:
      parent - Description of Parameter
    • saveAs

      public void saveAs(Object parent)
      Description of the Method
      Parameters:
      parent - Description of Parameter
    • plot

      public void plot(JFrame parent)
      Description of the Method
      Parameters:
      parent - Description of Parameter
    • printString

      public String printString()
      Description of the Method
      Returns:
      Description of the Returned Value
    • find

      public boolean find(String findStr, int startingRow, int startingColumn, int firstColumn, boolean wholeWordOnly, boolean down, Dimension rowCol)
    • allDataString

      public String allDataString()
      Description of the Method
      Returns:
      Description of the Returned Value
    • isSorted

      public boolean isSorted()
      isSorted()
      Returns:
      boolean if this table has ever been sorted (If so, do not allow an edit on it)
    • insertRow

      public void insertRow()
      insert a row at the current row
      Overrides:
      insertRow in class RmaJTable
    • insertTimeSeriesRow

      public boolean insertTimeSeriesRow(int selRow)
    • insertPairedDataRow

      public boolean insertPairedDataRow(int selRow)
    • getParentFrame

      public Component getParentFrame()
    • deleteRow

      public void deleteRow()
      Description of the Method
      Overrides:
      deleteRow in class RmaJTable
    • deleteRows

      public void deleteRows(int[] rows)
    • deleteColumn

      public void deleteColumn()
    • insertColumn

      public void insertColumn()
    • appendColumn

      protected void appendColumn()
    • applyQuality

      public void applyQuality(IntUnaryOperator qualityFunction)
    • insertColumn

      public void insertColumn(boolean append)
    • allowDeleteRow

      public boolean allowDeleteRow()
      Does this data set allow rows to be deleted? Only true if irregular interval and single column.
    • appendRows

      public void appendRows(int numberRows)
      Append rows at the bottom of the table This method is usually called automatically when entering data at the of the table
      Overrides:
      appendRows in class RmaJTable
      Parameters:
      numberRows - number of rows to append
    • appendRows

      public void appendRows()
      Description copied from class: RmaJTable
      asks the user how many rows they want to append to the end of the table
      Overrides:
      appendRows in class RmaJTable
    • appendRow

      public void appendRow()
      Inserts one row after the currently selected row This method is called by the popup menu
      Overrides:
      appendRow in class RmaJTable
    • paste

      public void paste()
      Description copied from class: RmaJTable
      paste implementation
      Overrides:
      paste in class RmaJTable
    • editingStopped

      public void editingStopped(ChangeEvent e)
      Description copied from class: RmaJTable
      called when editing has stopped. Pass on call to any registered listeners.
      Specified by:
      editingStopped in interface CellEditorListener
      Overrides:
      editingStopped in class RmaJTable
      Parameters:
      e - Description
    • pasteData

      public void pasteData(String pasteString)
      Description of the Method
      Parameters:
      pasteString - Description of Parameter
    • addMouseListenerToHeaderInTable

      public void addMouseListenerToHeaderInTable(JTable table)
    • exportAsXML

      public void exportAsXML(BufferedWriter writer, String title, String indent)
      Description of the Method
      Overrides:
      exportAsXML in class RmaJTable
      Parameters:
      writer - Description of Parameter
      title - Description of Parameter
      indent - Description of Parameter
    • exportAsHTML

      public void exportAsHTML(BufferedWriter writer, String title, String indent)
      Description of the Method
      Overrides:
      exportAsHTML in class RmaJTable
      Parameters:
      writer - Description of Parameter
      title - Description of Parameter
      indent - Description of Parameter
    • setEditBackground

      public void setEditBackground(boolean isEditable)
      Sets the editBackground attribute of the Table object
      Parameters:
      isEditable - The new editBackground value