Package ca.spatial.table
Class TransposePeriodTable
java.lang.Object
javax.swing.table.AbstractTableModel
ca.spatial.table.AttributeStore
ca.spatial.table.TransposePeriodTable
- All Implemented Interfaces:
PopupActivationListener
,Serializable
,Comparable
,EventListener
,ListSelectionListener
,TableModelListener
,TableModel
This class converts a row from another table into a
table that is has a row for each period.
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class ca.spatial.table.AttributeStore
SELECT_ADD, SELECT_FROM, SELECT_NEW
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Get the total number of periods that this store supportsint
Get the number of rows in this storegetSnapshot(boolean useSelected, Observer progress)
Get a snapshot of this table definition.int
int
getValueAt(int row, int column)
Get a cell value using the default period for the table.getValueAt(int row, int column, int period)
Get a cell valueint
getYearForPeriod(int period)
Get the ending year for a given period.void
setPeriod(int period)
Set the default time period that is used by this table when an explicit time period is not provided.void
setValueAt(Object aValue, int row, int column, int period)
Set the value in a cell and notify listeners that the value has changed.void
toString()
Returns the title of this AttributeStoreMethods inherited from class ca.spatial.table.AttributeStore
absoluteFile, absoluteFile, absolutePath, absolutePath, addCellEditors, addMenuItems, addPopupActivationListener, addRelate, addRelate, addTableModelListener, addToGlobalStoreList, allowsEditing, booleanValue, booleanValue, buildIndex, calculate, calculateField, calculateField, canIndex, changeSelection, clearSelection, close, compareTo, decodeCharset, doubleValue, doubleValue, exportCSV, exportCSV, exportCSV, exportCSV, exportCSV, exportCSV, exportDBF, exportDBF, exportDBF, exportDBF, exportDBF, findColumn, findColumn, findSimilarColumnNames, getAttributeFormat, getCacheParent, getCachingLayer, getCachingLayer, getCanonicalName, getColumnClass, getColumnCount, getColumnName, getColumnNames, getContextPeriods, getCwd, getEditMode, getFullColumnName, getListSelectionModel, getMinMax, getMinMax, getMinMax, getMinMax, getMinMax, getOpenStore, getOpenStore, getOpenStore, getOpenStores, getPeriod, getPeriodWidth, getRowNodeRemap, getSelectedRowCount, getSelection, getSelection, getSelection, getShortName, getSnapshot, getStoreByShortName, getStoreByTitle, getSynchronizer, getTableName, getTableSpec, getTitle, hasIndex, identifyRecords, integerValue, integerValue, isCellEditable, isSelectedIndex, isSelectionEmpty, listify, listValue, listValue, lookupRow, makeLu, maybePopup, notifyPopupActivationListeners, openOrReuse, openOrReuse, queryTable, queryTable, quoteIfRequired, relativePath, removeFromGlobalStoreList, removePopupActivationListener, removeTableModelListener, select, select, selectAdd, selectFrom, selectNew, setCwd, setCwd, setEditMode, setListSelectionModel, setRowNodeRemap, setShortName, setTableSpec, setTitle, setValueAt, showCube, showTable, uniqueValues, uniqueValues, uniqueValues, uniqueValues, uniqueValues, uniqueValues, uniqueValues, uniqueValues, valueChanged
Methods inherited from class javax.swing.table.AbstractTableModel
fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners
-
Constructor Details
-
TransposePeriodTable
-
-
Method Details
-
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 interfaceTableModel
- Specified by:
getRowCount
in classAttributeStore
- 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 classAttributeStore
- 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 classAttributeStore
- Parameters:
period
- The period of interest- Returns:
- the year for a given period
-
getValueAt
Description copied from class:AttributeStore
Get a cell value- Specified by:
getValueAt
in classAttributeStore
- Parameters:
row
- The row containing the cellcolumn
- The column containing the cellperiod
- The period of interest- Returns:
- An object containing the cell value.
-
setValueAt
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 classAttributeStore
- Parameters:
aValue
- The value to be set.row
- The row containing the cellcolumn
- The column containing the cellperiod
- The period of interest
-
getValueAt
Description copied from class:AttributeStore
Get a cell value using the default period for the table.- Specified by:
getValueAt
in interfaceTableModel
- Overrides:
getValueAt
in classAttributeStore
- Parameters:
row
- The row containing the cellcolumn
- 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 classAttributeStore
- Parameters:
period
- the default period for this store
-
tableChanged
- Specified by:
tableChanged
in interfaceTableModelListener
-
toString
Description copied from class:AttributeStore
Returns the title of this AttributeStore- Overrides:
toString
in classAttributeStore
- Returns:
- The title of this AttributeStore
-
getSnapshot
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 classAttributeStore
- 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.
-