Package ca.spatial.util
Class RangeStore
java.lang.Object
javax.swing.table.AbstractTableModel
ca.spatial.table.AttributeStore
ca.spatial.util.RangeStore
- All Implemented Interfaces:
EditableTableModel
,PopupActivationListener
,Serializable
,Comparable
,EventListener
,ListSelectionListener
,TableModel
- 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 TypeMethodDescriptionvoid
Add a row to the table using default values.void
Add a row to the table.int
Get the total number of periods that this store supportsint
Get the number of rows in this storegetValueAt(int row, int column, int period)
Get a cell valueint
getYearForPeriod(int period)
Get the ending year for a given period.void
moveRow(int from, int to)
Move the specified row to a new locationvoid
removeRow(int row)
Remove the row specified by the row number.void
setValueAt(Object o, int row, int column, int period)
Set the value in a cell and notify listeners that the value has changed.Methods 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, getSnapshot, getStoreByShortName, getStoreByTitle, getSynchronizer, getTableName, getTableSpec, getTitle, getValueAt, 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, setPeriod, setRowNodeRemap, setShortName, setTableSpec, setTitle, setValueAt, showCube, showTable, toString, 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
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getValueAt, isCellEditable, removeTableModelListener, setValueAt
-
Constructor Details
-
RangeStore
public RangeStore()
-
-
Method Details
-
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
-
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
-
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
-
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:
o
- The value to be set.row
- The row containing the cellcolumn
- The column containing the cellperiod
- The period of interest
-
addRow
Description copied from interface:EditableTableModel
Add a row to the table using default values. Optionally provide a reference to the parent window in case a dialog needs to be shown.- Specified by:
addRow
in interfaceEditableTableModel
-
addRow
Description copied from interface:EditableTableModel
Add a row to the table. The number of items in the rowData array must match the number of columns in the table.- Specified by:
addRow
in interfaceEditableTableModel
-
removeRow
public void removeRow(int row)Description copied from interface:EditableTableModel
Remove the row specified by the row number.- Specified by:
removeRow
in interfaceEditableTableModel
-
moveRow
public void moveRow(int from, int to)Description copied from interface:EditableTableModel
Move the specified row to a new location- Specified by:
moveRow
in interfaceEditableTableModel
-