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 boolean
protected boolean
protected Vector
protected int
protected boolean
protected static int
protected DefaultTableCellRenderer
protected StringBuffer
protected boolean
protected DefaultTableCellRenderer
protected DefaultTableCellRenderer
protected boolean
protected boolean
protected intArrayContainer[]
protected int
protected boolean
protected int
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected HecTimeArray
the array of times, has both a view time zone and a data time zone.protected boolean
protected String
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.protected int
protected int
protected int
protected int
protected int
protected static TimeZone
protected final int
protected final int
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addColumn
(int col, boolean append) void
appendRows
(int numberRows) void
appendRows
(int numberRows, HecTimeArray newTimes) void
applyQuality
(int[] cols, int[] rows, IntUnaryOperator qualityFunction) boolean
canDeleteColumn
(int col) boolean
canInsertColumn
(int col, boolean append) protected void
protected TimeSeriesContainer
convertTimeZone
(TimeSeriesContainer tsc, String timeZoneID, int timeZoneRawOffset) void
deleteColumn
(int col) void
deleteRows
(int[] selectedRows) protected boolean
extendDataSet
(int row, int column) protected TableCellRenderer
getCellRenderer
(HecDataTable table, int row, int column) int
protected String
getColumnName
(int column) boolean
int
int
boolean
int
int
getDecimalPosition
(int column) static int
static TimeZone
void
getMinMaxIntervals
(intContainer min, intContainer max) getName()
protected int[]
getNextEditableCell
(int row, int column) final int
protected Object
getObject
(int row, int column) boolean
int
boolean
int
getSelectedDataString
(int[] selection, int minColumn, int maxColumn) boolean
boolean
boolean
getSortColumnClass
(int columnIndex) getSortValueAt
(int row, int column) getToolTipText
(int row, int column) int
protected Object
getValue
(int row, int column) getValueAt
(int rowIndex, int columnIndex) boolean
boolean
protected boolean
hasQualityColumn
(int column) protected void
increaseMap
(int column, int rows) void
void
insertRowsBefore
(int initialRow, int numberRows) void
insertRowsBefore
(int initialRow, int numberRows, HecTimeArray newTimes) boolean
boolean
isCellEditable
(int row, int column) boolean
isPasteString
(String pstring, int column) protected boolean
isQualityColumn
(int column) protected boolean
isValidTime
(int row, int column) protected void
map
(int column, int masterRow, int columnRow) protected int
void
protected void
reMap
(int column) protected void
reMap
(int column, int row) void
Reset all the data sets to be irregular and figure out a new irregular interval block size.void
void
boolean
search
(String findStr, int startingRow, int startingColumn, int firstColumn, boolean wholeWordOnly, boolean down, Dimension rowCol) void
setColumnWidths
(TableColumnModel columnModel) void
setCommas
(boolean showCommas) int
void
setDataChanged
(boolean dataChanged) void
setDateStyle
(int dateStyle) void
setDateTimeAsTwoColumns
(boolean dateTimeAsTwoColumns) void
setDecimalPosition
(int position) void
setDecimalPosition
(int column, int position) static void
setDefaultDateStyle
(int dateStyle) void
setEditable
(boolean isEditable) void
setExtendable
(boolean extendable, int numberBlankRows) static void
setGlobalViewTimeZone
(TimeZone viewTimeZone) void
setNumberHeaderRows
(int number) void
setPasteMode
(boolean pasteMode) void
setPlotProvider
(PlotProvider plotProvider) void
setReverseOrder
(boolean reverseOrder) void
setShowFullDefinition
(boolean showFullDefinition) void
setShowTimes
(boolean showTimes) void
setUndefinedStyle
(int undefinedStyle) int
void
setValueAt
(Object value, int row, int column) void
showTimeAsBeginningOfDay
(boolean showTimeAsBeginning) tabPos
(int position) protected int
unMap
(int row, int column) protected int
unMapToNextValidRow
(int row, int column) int
updateContainers
(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:
getColumnName
in interfaceTableModel
- Overrides:
getColumnName
in 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:
isCellEditable
in interfaceTableModel
- Overrides:
isCellEditable
in 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:
setValueAt
in interfaceTableModel
- Overrides:
setValueAt
in classAbstractTableModel
-
isPasteString
-
getNextEditableCell
protected int[] getNextEditableCell(int row, int column) -
getSelectedDataString
-
allDataString
-
getColumnHeaderString
-
printString
-
fillTabs
-
tabPos
-