Class DataBlockTableView<T extends PamDataUnit>

java.lang.Object
PamView.component.DataBlockTableView<T>
Direct Known Subclasses:
CalibrationTableView, EffortTableView, QAOpsTable, QATestTable, RXTablePanel2

public abstract class DataBlockTableView<T extends PamDataUnit> extends Object
  • Constructor Details Link icon

    • DataBlockTableView Link icon

      public DataBlockTableView(PamDataBlock<T> pamDataBlock, String displayName)
  • Method Details Link icon

    • fireTableStructureChanged Link icon

      public void fireTableStructureChanged()
      Call the fireTableStructureChanged function for the table.
    • fireTableDataChanged Link icon

      public void fireTableDataChanged()
      Call the table data changed function to update table values.
    • getComponent Link icon

      public JComponent getComponent()
    • showViewerScrollControls Link icon

      public void showViewerScrollControls(boolean show)
      Show the scroll bar controls at the top of the display in viewer mode. The are on by default, so if you call this, it will probably be with 'false'
      Parameters:
      show - show controls
    • getTable Link icon

      public JTable getTable()
      Get table. Allows adding of more menu handlers, etc.
      Returns:
      the table object.
    • setAllowMultipleRowSelection Link icon

      public void setAllowMultipleRowSelection(boolean allow)
      Set allowing of multiple row selection.
      Parameters:
      allow -
    • getToolTipText Link icon

      public String getToolTipText(T dataUnit, int columnIndex)
      Get a tooltip for the data unit.
      Parameters:
      dataUnit - Data unit for the row the mouse is over - note that this might be null
      columnIndex - column the mouse is over.
      Returns:
      tool tip text or null
    • getColumnNames Link icon

      public abstract String[] getColumnNames()
      Returns:
      a list of column names.
    • getColumnData Link icon

      public abstract Object getColumnData(T dataUnit, int column)
      Data for a particular column extracted from the data unit.
      Parameters:
      dataUnit -
      column -
      Returns:
    • getColumnClass Link icon

      public Class<?> getColumnClass(int columnIndex)
      The class of the table column. Defaults to 'Object' can be overridden.
      Parameters:
      columnIndex -
      Returns:
    • getDataUnit Link icon

      protected final T getDataUnit(int tableRow)
      The data unit for a given row. Note that in some circumstances this may return null since data may get removed in a different thread between asking for the number of rows and trying to get the data.
      Parameters:
      tableRow -
      Returns:
      data unit for the table row.
    • getSelectedDataUnit Link icon

      public T getSelectedDataUnit()
      Get the data unit for the selected data row
      Returns:
    • getRowCount Link icon

      public int getRowCount()
      Get the number of rows in the table - default behaviour is the number of rows in the datablock, but this may be overridden if data are being selected in a different way.
      Returns:
      number of table rows to show.
    • getDataIndexForRow Link icon

      public int getDataIndexForRow(int tableRow)
      Get the absolute index of the data within the PAMDataBlock for the row in the table. Default behaviour is that in viewer mode, there is 1:1 correspondence, so data are displayed in order. In normal mode, data are displayed in reverse oder, with newest data in row 0.
      Parameters:
      tableRow -
      Returns:
    • popupMenuAction Link icon

      public void popupMenuAction(MouseEvent e, T dataUnit, String colName)
    • getMultipleSelectedRows Link icon

      public T[] getMultipleSelectedRows()
      Check for multiple row selection.

      If wanted, this should be called back from implementations of popupMenuAction

      Returns:
      Array of multiple rows selected.
    • checkRowSelection Link icon

      protected void checkRowSelection(MouseEvent e)
      If right clicking, may have right clicked on a different row, so consider changing the row selection
      Parameters:
      e -
    • getColumnName Link icon

      public String getColumnName(int column)
      Put the getColumnName function out here, so that subclasses can more easily override it than if it's buried in the table model
      Parameters:
      column -
      Returns:
      colum name