Package hec.gfx2d.swing.charts.data
Class DefaultChartModel
java.lang.Object
hec.gfx2d.swing.charts.data.DefaultChartModel
- All Implemented Interfaces:
ChartModel
Copyright (C) 2017 Hydrologic Engineering Center,
United States Army Corps of Engineers, All Rights Reserved
HEC-Java NEXGEN
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetClosestDate(Date date) getId()Returns a list of all item ids in the chart, sorted by the comparator provided in setComparator or by default comparison (alphabetically by id name) if no comparator has been provideddoublegetMaxValue(RmaDataId itemId, Date timeIndex) doublegetMinValue(RmaDataId itemId, Date timeIndex) intgetQuality(RmaDataId itemId, Date timeIndex) doublevoidsetComparator(Comparator<RmaDataId> idComparator)
-
Constructor Details
-
DefaultChartModel
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceChartModel- Returns:
- the id for this chart or item item
-
getValue
- Specified by:
getValuein interfaceChartModel- Parameters:
itemId- the item to retrieve the value fromtimeIndex- the corresponding time for the value retrieved- Returns:
- the operational value of a item
-
getMinValue
- Specified by:
getMinValuein interfaceChartModel- Parameters:
itemId- the item to retrieve the minimum value fromtimeIndex- the corresponding time for the value retrieved- Returns:
- the minimum value of a item
-
getMaxValue
- Specified by:
getMaxValuein interfaceChartModel- Parameters:
itemId- the item to retrieve the maximum value fromtimeIndex- the corresponding time for the value retrieved- Returns:
- the maximum value of a item
-
getQuality
- Specified by:
getQualityin interfaceChartModel- Parameters:
itemId- the item to retrieve the quality fromtimeIndex- the corresponding time for the value retrieved- Returns:
- the quality of the item data
-
getUnits
- Specified by:
getUnitsin interfaceChartModel- Parameters:
itemId- the item to retrieve units for- Returns:
- the units of the item identified
-
getEarliestDate
- Specified by:
getEarliestDatein interfaceChartModel- Returns:
- the java.util.Date corresponding to the earliest recorded value item
-
getLatestDate
- Specified by:
getLatestDatein interfaceChartModel- Returns:
- the java.util.Date corresponding to the latest recorded value item
-
getClosestDate
- Specified by:
getClosestDatein interfaceChartModel- Parameters:
date- the java.util.Date in question, attempting to find a closest match existing in value mappings- Returns:
- the date in values mapping that is the closest to the given date
-
setComparator
- Specified by:
setComparatorin interfaceChartModel- Parameters:
idComparator- the comparator to use when sorting the item ids in the getItemIds() method
-
getItemIds
Description copied from interface:ChartModelReturns a list of all item ids in the chart, sorted by the comparator provided in setComparator or by default comparison (alphabetically by id name) if no comparator has been provided- Specified by:
getItemIdsin interfaceChartModel- Returns:
- the list of all item ids in the chart
- See Also:
-