Package hec.dataTable

Class TimeSeriesDataModel

java.lang.Object
javax.swing.table.AbstractTableModel
hec.dataTable.TimeSeriesDataModel
All Implemented Interfaces:
Serializable, TableModel

public class TimeSeriesDataModel extends AbstractTableModel
See Also:
  • Field Details

    • _viewTimeZone

      protected static TimeZone _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

      protected String _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

      protected HecTimeArray _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

      protected StringBuffer _firstPasteError
    • _dataColumns

      protected Vector _dataColumns
    • _map

      protected intArrayContainer[] _map
    • NULL_MAP_VAL

      protected final int NULL_MAP_VAL
      See Also:
    • UNDEFINED_MAP_VAL

      protected final int UNDEFINED_MAP_VAL
      See Also:
    • _headerRenderer

      protected DefaultTableCellRenderer _headerRenderer
    • _integerRenderer

      protected DefaultTableCellRenderer _integerRenderer
    • _doubleRenderer

      protected DefaultTableCellRenderer _doubleRenderer
    • _numberBlankRows

      protected int _numberBlankRows
  • Constructor Details

    • TimeSeriesDataModel

      public TimeSeriesDataModel()
  • Method Details

    • setGlobalViewTimeZone

      public static void setGlobalViewTimeZone(TimeZone viewTimeZone)
    • getGlobalViewTimeZone

      public static TimeZone getGlobalViewTimeZone()
    • setData

      public int setData(List dataSets, boolean showCommas, int qualityStyle)
    • convertTimeZone

      protected TimeSeriesContainer convertTimeZone(TimeSeriesContainer tsc, String timeZoneID, int timeZoneRawOffset)
    • getDataContainers

      public Vector 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

      public HecTimeArray getTimeArray()
    • setShowFullDefinition

      public void setShowFullDefinition(boolean showFullDefinition)
    • getDataSets

      public Vector getDataSets()
    • getDataColumns

      public Vector getDataColumns()
    • getColumnCount

      public int getColumnCount()
    • getRowCount

      public int getRowCount()
    • getColumnName

      public String getColumnName(int column)
      Specified by:
      getColumnName in interface TableModel
      Overrides:
      getColumnName in class AbstractTableModel
    • getNominalName

      public String getNominalName()
    • getName

      public String 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

      protected TableCellRenderer getCellRenderer(HecDataTable table, int row, int column)
    • isCellEditable

      public boolean isCellEditable(int row, int column)
      Specified by:
      isCellEditable in interface TableModel
      Overrides:
      isCellEditable in class AbstractTableModel
    • getToolTipText

      public String getToolTipText(int row, int column)
    • 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

      public Object getValueAt(int rowIndex, int columnIndex)
    • getSortColumnClass

      public Class getSortColumnClass(int columnIndex)
    • getSortValueAt

      public Object getSortValueAt(int row, int column)
    • getValue

      protected Object getValue(int row, int column)
    • getObject

      protected Object getObject(int row, int column)
    • showTimeAsBeginningOfDay

      public void showTimeAsBeginningOfDay(boolean showTimeAsBeginning)
    • setValue

      public int setValue(Object ovalue, int row, int column)
    • isValidTime

      protected boolean isValidTime(int row, int column)
    • extendDataSet

      protected boolean extendDataSet(int row, int column)
    • setColumnWidths

      public void setColumnWidths(TableColumnModel columnModel)
    • hasDataChanged

      public boolean hasDataChanged()
    • setDataChanged

      public void setDataChanged(boolean dataChanged)
    • setExtendable

      public void setExtendable(boolean extendable, int numberBlankRows)
    • getMinMaxIntervals

      public void getMinMaxIntervals(intContainer min, intContainer max)
    • appendRows

      public void appendRows(int numberRows)
    • appendRows

      public void appendRows(int numberRows, HecTimeArray newTimes)
    • 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

      public void insertRowsBefore(int initialRow, int numberRows, HecTimeArray newTimes)
    • deleteRows

      public void deleteRows(int[] selectedRows)
    • initializeEntryStartTime

      public void initializeEntryStartTime()
    • updateContainers

      public int updateContainers(int[] firstError)
    • save

      public void save(Object parent)
    • saveAs

      public void saveAs(Object parent)
    • getQualityStyle

      public int getQualityStyle()
    • applyQuality

      public void applyQuality(int[] cols, int[] rows, IntUnaryOperator qualityFunction)
    • getNumberHeaderRows

      public final int getNumberHeaderRows()
    • setPlotProvider

      public void setPlotProvider(PlotProvider plotProvider)
    • 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

      public void plot(JFrame parent)
    • 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

      public boolean search(String findStr, int startingRow, int startingColumn, int firstColumn, boolean wholeWordOnly, boolean down, Dimension rowCol)
    • setValueAt

      public void setValueAt(Object value, int row, int column)
      Specified by:
      setValueAt in interface TableModel
      Overrides:
      setValueAt in class AbstractTableModel
    • isPasteString

      public boolean isPasteString(String pstring, int column)
    • getNextEditableCell

      protected int[] getNextEditableCell(int row, int column)
    • getSelectedDataString

      public String getSelectedDataString(int[] selection, int minColumn, int maxColumn)
    • allDataString

      public String allDataString()
    • getColumnHeaderString

      protected String getColumnHeaderString()
    • printString

      public String printString()
    • fillTabs

      public String fillTabs(String line)
    • tabPos

      public String tabPos(int position)