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 provideddouble
getMaxValue
(RmaDataId itemId, Date timeIndex) double
getMinValue
(RmaDataId itemId, Date timeIndex) int
getQuality
(RmaDataId itemId, Date timeIndex) double
void
setComparator
(Comparator<RmaDataId> idComparator)
-
Constructor Details
-
DefaultChartModel
-
-
Method Details
-
getId
- Specified by:
getId
in interfaceChartModel
- Returns:
- the id for this chart or item item
-
getValue
- Specified by:
getValue
in 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:
getMinValue
in 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:
getMaxValue
in 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:
getQuality
in 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:
getUnits
in interfaceChartModel
- Parameters:
itemId
- the item to retrieve units for- Returns:
- the units of the item identified
-
getEarliestDate
- Specified by:
getEarliestDate
in interfaceChartModel
- Returns:
- the java.util.Date corresponding to the earliest recorded value item
-
getLatestDate
- Specified by:
getLatestDate
in interfaceChartModel
- Returns:
- the java.util.Date corresponding to the latest recorded value item
-
getClosestDate
- Specified by:
getClosestDate
in 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:
setComparator
in interfaceChartModel
- Parameters:
idComparator
- the comparator to use when sorting the item ids in the getItemIds() method
-
getItemIds
Description copied from interface:ChartModel
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 provided- Specified by:
getItemIds
in interfaceChartModel
- Returns:
- the list of all item ids in the chart
- See Also:
-