Package hec.dataTable
Class TimeSeriesDataModel
java.lang.Object
javax.swing.table.AbstractTableModel
hec.dataTable.TimeSeriesDataModel
- All Implemented Interfaces:
Serializable,TableModel
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected Vectorprotected intprotected booleanprotected static intprotected DefaultTableCellRendererprotected StringBufferprotected booleanprotected DefaultTableCellRendererprotected DefaultTableCellRendererprotected booleanprotected booleanprotected intArrayContainer[]protected intprotected booleanprotected intprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected HecTimeArraythe array of times, has both a view time zone and a data time zone.protected booleanprotected StringFor incoming data, the time zone for the hec time array is set to the first time series container's time zone that is this time zone.protected intprotected intprotected intprotected intprotected intprotected static TimeZoneprotected final intprotected final intFields inherited from class javax.swing.table.AbstractTableModel
listenerList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddColumn(int col, boolean append) voidappendRows(int numberRows) voidappendRows(int numberRows, HecTimeArray newTimes) voidapplyQuality(int[] cols, int[] rows, IntUnaryOperator qualityFunction) booleancanDeleteColumn(int col) booleancanInsertColumn(int col, boolean append) protected voidprotected TimeSeriesContainerconvertTimeZone(TimeSeriesContainer tsc, String timeZoneID, int timeZoneRawOffset) voiddeleteColumn(int col) voiddeleteRows(int[] selectedRows) protected booleanextendDataSet(int row, int column) protected TableCellRenderergetCellRenderer(HecDataTable table, int row, int column) intprotected StringgetColumnName(int column) booleanintintbooleanintintgetDecimalPosition(int column) static intstatic TimeZonevoidgetMinMaxIntervals(intContainer min, intContainer max) getName()protected int[]getNextEditableCell(int row, int column) final intprotected ObjectgetObject(int row, int column) booleanintbooleanintgetSelectedDataString(int[] selection, int minColumn, int maxColumn) booleanbooleanbooleangetSortColumnClass(int columnIndex) getSortValueAt(int row, int column) getToolTipText(int row, int column) intprotected ObjectgetValue(int row, int column) getValueAt(int rowIndex, int columnIndex) booleanbooleanprotected booleanhasQualityColumn(int column) protected voidincreaseMap(int column, int rows) voidvoidinsertRowsBefore(int initialRow, int numberRows) voidinsertRowsBefore(int initialRow, int numberRows, HecTimeArray newTimes) booleanbooleanisCellEditable(int row, int column) booleanisPasteString(String pstring, int column) protected booleanisQualityColumn(int column) protected booleanisValidTime(int row, int column) protected voidmap(int column, int masterRow, int columnRow) protected intvoidprotected voidreMap(int column) protected voidreMap(int column, int row) voidReset all the data sets to be irregular and figure out a new irregular interval block size.voidvoidbooleansearch(String findStr, int startingRow, int startingColumn, int firstColumn, boolean wholeWordOnly, boolean down, Dimension rowCol) voidsetColumnWidths(TableColumnModel columnModel) voidsetCommas(boolean showCommas) intvoidsetDataChanged(boolean dataChanged) voidsetDateStyle(int dateStyle) voidsetDateTimeAsTwoColumns(boolean dateTimeAsTwoColumns) voidsetDecimalPosition(int position) voidsetDecimalPosition(int column, int position) static voidsetDefaultDateStyle(int dateStyle) voidsetEditable(boolean isEditable) voidsetExtendable(boolean extendable, int numberBlankRows) static voidsetGlobalViewTimeZone(TimeZone viewTimeZone) voidsetNumberHeaderRows(int number) voidsetPasteMode(boolean pasteMode) voidsetPlotProvider(PlotProvider plotProvider) voidsetReverseOrder(boolean reverseOrder) voidsetShowFullDefinition(boolean showFullDefinition) voidsetShowTimes(boolean showTimes) voidsetUndefinedStyle(int undefinedStyle) intvoidsetValueAt(Object value, int row, int column) voidshowTimeAsBeginningOfDay(boolean showTimeAsBeginning) tabPos(int position) protected intunMap(int row, int column) protected intunMapToNextValidRow(int row, int column) intupdateContainers(int[] firstError) Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
-
Field Details
-
_viewTimeZone
-
_dateTimeAsTwoColumns
protected boolean _dateTimeAsTwoColumns -
_allIrregular
protected boolean _allIrregular -
_allSameInterval
protected boolean _allSameInterval -
_timePattern
protected boolean _timePattern -
_qualityStyle
protected int _qualityStyle -
_defaultDateStyle
protected static int _defaultDateStyle -
_dateStyle
protected int _dateStyle -
_undefinedStyle
protected int _undefinedStyle -
_reverseOrder
protected boolean _reverseOrder -
_timeZoneID
For incoming data, the time zone for the hec time array is set to the first time series container's time zone that is this time zone. All other incoming time series containers are converted to this time zone establishing a single data time zone that can be converted to view time zone. -
_timeZoneRawOffset
protected int _timeZoneRawOffset -
_time
the array of times, has both a view time zone and a data time zone. -
_unitsRow
protected int _unitsRow -
_typeRow
protected int _typeRow -
_versionRow
protected int _versionRow -
_isEditable
protected boolean _isEditable -
_isExtendable
protected boolean _isExtendable -
_hasBeenExtended
protected boolean _hasBeenExtended -
_showCommas
protected boolean _showCommas -
_pasteMode
protected boolean _pasteMode -
_showTimes
protected boolean _showTimes -
_showTimeAsBeginning
protected boolean _showTimeAsBeginning -
_showFullDefinition
protected boolean _showFullDefinition -
_firstPasteError
-
_dataColumns
-
_map
-
NULL_MAP_VAL
protected final int NULL_MAP_VAL- See Also:
-
UNDEFINED_MAP_VAL
protected final int UNDEFINED_MAP_VAL- See Also:
-
_headerRenderer
-
_integerRenderer
-
_doubleRenderer
-
_numberBlankRows
protected int _numberBlankRows
-
-
Constructor Details
-
TimeSeriesDataModel
public TimeSeriesDataModel()
-
-
Method Details
-
setGlobalViewTimeZone
-
getGlobalViewTimeZone
-
setData
-
convertTimeZone
protected TimeSeriesContainer convertTimeZone(TimeSeriesContainer tsc, String timeZoneID, int timeZoneRawOffset) -
getDataContainers
-
setDateTimeAsTwoColumns
public void setDateTimeAsTwoColumns(boolean dateTimeAsTwoColumns) -
getDateTimeAsTwoColumns
public boolean getDateTimeAsTwoColumns() -
setDefaultDateStyle
public static void setDefaultDateStyle(int dateStyle) -
getDefaultDateStyle
public static int getDefaultDateStyle() -
setDateStyle
public void setDateStyle(int dateStyle) -
getDateStyle
public int getDateStyle() -
getTimeArray
-
setShowFullDefinition
public void setShowFullDefinition(boolean showFullDefinition) -
getDataSets
-
getDataColumns
-
getColumnCount
public int getColumnCount() -
getRowCount
public int getRowCount() -
getColumnName
- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classAbstractTableModel
-
getNominalName
-
getName
-
setDecimalPosition
public void setDecimalPosition(int position) -
setDecimalPosition
public void setDecimalPosition(int column, int position) -
getDecimalPosition
public int getDecimalPosition() -
getDecimalPosition
public int getDecimalPosition(int column) -
getDataColumnCount
public int getDataColumnCount() -
setUndefinedStyle
public void setUndefinedStyle(int undefinedStyle) -
getUndefinedStyle
public int getUndefinedStyle() -
hasQuality
public boolean hasQuality() -
getCellRenderer
-
isCellEditable
public boolean isCellEditable(int row, int column) - Specified by:
isCellEditablein interfaceTableModel- Overrides:
isCellEditablein classAbstractTableModel
-
getToolTipText
-
orderTimeSeries
protected int orderTimeSeries() -
reMap
protected void reMap(int column) -
reMap
protected void reMap(int column, int row) -
isQualityColumn
protected boolean isQualityColumn(int column) -
hasQualityColumn
protected boolean hasQualityColumn(int column) -
setReverseOrder
public void setReverseOrder(boolean reverseOrder) -
getReverseOrder
public boolean getReverseOrder() -
getValueAt
-
getSortColumnClass
-
getSortValueAt
-
getValue
-
getObject
-
showTimeAsBeginningOfDay
public void showTimeAsBeginningOfDay(boolean showTimeAsBeginning) -
setValue
-
isValidTime
protected boolean isValidTime(int row, int column) -
extendDataSet
protected boolean extendDataSet(int row, int column) -
setColumnWidths
-
hasDataChanged
public boolean hasDataChanged() -
setDataChanged
public void setDataChanged(boolean dataChanged) -
setExtendable
public void setExtendable(boolean extendable, int numberBlankRows) -
getMinMaxIntervals
-
appendRows
public void appendRows(int numberRows) -
appendRows
-
checkIntervals
protected void checkIntervals() -
isAllIrregular
public boolean isAllIrregular() -
insertRowsBefore
public void insertRowsBefore(int initialRow, int numberRows) -
resetToIrregular
public void resetToIrregular()Reset all the data sets to be irregular and figure out a new irregular interval block size. This allows rows to be actually deleted instead of just made missing. -
insertRowsBefore
-
deleteRows
public void deleteRows(int[] selectedRows) -
initializeEntryStartTime
public void initializeEntryStartTime() -
updateContainers
public int updateContainers(int[] firstError) -
save
-
saveAs
-
getQualityStyle
public int getQualityStyle() -
applyQuality
-
getNumberHeaderRows
public final int getNumberHeaderRows() -
setPlotProvider
-
increaseMap
protected void increaseMap(int column, int rows) -
map
protected void map(int column, int masterRow, int columnRow) -
unMap
protected int unMap(int row, int column) -
unMapToNextValidRow
protected int unMapToNextValidRow(int row, int column) -
setEditable
public void setEditable(boolean isEditable) -
setPasteMode
public void setPasteMode(boolean pasteMode) -
getPasteMode
public boolean getPasteMode() -
setCommas
public void setCommas(boolean showCommas) -
getCommas
public boolean getCommas() -
setShowTimes
public void setShowTimes(boolean showTimes) -
getShowTimes
public boolean getShowTimes() -
getshowTimeAsBeginningOfDay
public boolean getshowTimeAsBeginningOfDay() -
getShowFullDefinition
public boolean getShowFullDefinition() -
setNumberHeaderRows
public void setNumberHeaderRows(int number) -
plot
-
deleteColumn
public void deleteColumn(int col) -
canDeleteColumn
public boolean canDeleteColumn(int col) -
canInsertColumn
public boolean canInsertColumn(int col, boolean append) -
addColumn
public void addColumn(int col, boolean append) -
search
-
setValueAt
- Specified by:
setValueAtin interfaceTableModel- Overrides:
setValueAtin classAbstractTableModel
-
isPasteString
-
getNextEditableCell
protected int[] getNextEditableCell(int row, int column) -
getSelectedDataString
-
allDataString
-
getColumnHeaderString
-
printString
-
fillTabs
-
tabPos
-