Class TransposePeriodTable

All Implemented Interfaces:
PopupActivationListener, Serializable, Comparable, EventListener, ListSelectionListener, TableModelListener, TableModel

public class TransposePeriodTable extends AttributeStore implements TableModelListener
This class converts a row from another table into a table that is has a row for each period.
See Also:
Serialized Form
  • Constructor Details

    • TransposePeriodTable

      public TransposePeriodTable(AttributeStore as, int row, int periods)
  • Method Details

    • getParentStore

      public AttributeStore getParentStore()
    • getTransposeRow

      public int getTransposeRow()
    • getTransposePeriods

      public int getTransposePeriods()
    • getRowCount

      public int getRowCount()
      Description copied from class: AttributeStore
      Get the number of rows in this store
      Specified by:
      getRowCount in interface TableModel
      Specified by:
      getRowCount in class AttributeStore
      Returns:
      the number of rows in this store
    • getPeriodCount

      public int getPeriodCount()
      Description copied from class: AttributeStore
      Get the total number of periods that this store supports
      Specified by:
      getPeriodCount in class AttributeStore
      Returns:
      The number of periods in this store
    • getYearForPeriod

      public int getYearForPeriod(int period)
      Description copied from class: AttributeStore
      Get the ending year for a given period.
      Specified by:
      getYearForPeriod in class AttributeStore
      Parameters:
      period - The period of interest
      Returns:
      the year for a given period
    • getValueAt

      public Object getValueAt(int row, int column, int period)
      Description copied from class: AttributeStore
      Get a cell value
      Specified by:
      getValueAt in class AttributeStore
      Parameters:
      row - The row containing the cell
      column - The column containing the cell
      period - The period of interest
      Returns:
      An object containing the cell value.
    • setValueAt

      public void setValueAt(Object aValue, int row, int column, int period)
      Description copied from class: AttributeStore
      Set the value in a cell and notify listeners that the value has changed.

      Implementing classes that override must call this method to ensure that joins are properly maintained.

      Overrides:
      setValueAt in class AttributeStore
      Parameters:
      aValue - The value to be set.
      row - The row containing the cell
      column - The column containing the cell
      period - The period of interest
    • getValueAt

      public Object getValueAt(int row, int column)
      Description copied from class: AttributeStore
      Get a cell value using the default period for the table.
      Specified by:
      getValueAt in interface TableModel
      Overrides:
      getValueAt in class AttributeStore
      Parameters:
      row - The row containing the cell
      column - The column containing the cell
      Returns:
      An object containing the cell value.
    • setPeriod

      public void setPeriod(int period)
      Description copied from class: AttributeStore
      Set the default time period that is used by this table when an explicit time period is not provided. When the time period changes send out notifications for the columns that are dynamically dependent on period.
      Overrides:
      setPeriod in class AttributeStore
      Parameters:
      period - the default period for this store
    • tableChanged

      public void tableChanged(TableModelEvent e)
      Specified by:
      tableChanged in interface TableModelListener
    • toString

      public String toString()
      Description copied from class: AttributeStore
      Returns the title of this AttributeStore
      Overrides:
      toString in class AttributeStore
      Returns:
      The title of this AttributeStore
    • getSnapshot

      public AttributeStore getSnapshot(boolean useSelected, Observer progress)
      Get a snapshot of this table definition. This will request snpashots of the input data store, in case any of those are crosstabs. The results will be contained in the snapshot and will not change even if the underlying data set changes.
      Overrides:
      getSnapshot in class AttributeStore
      Parameters:
      useSelected - The calculations will only be computed on the selected records.
      progress - A reference to a progress widget that will be updated with the progress of the calculations.
      Returns:
      This method will return a new shapshot that captures the state of the table definition for the input current data sets.