Package hec.gfx2d
Class PlotIconBase
java.lang.Object
javax.swing.ImageIcon
hec.gfx2d.PlotIconBase
- All Implemented Interfaces:
Serializable
,Accessible
,Icon
- Direct Known Subclasses:
ColorBarIcon
,PlotIcon
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.ImageIcon
ImageIcon.AccessibleImageIcon
-
Field Summary
FieldsModifier and TypeFieldDescriptionint
int
protected List
protected Vector
protected Dimension
protected Dimension
protected double
protected double
protected double
protected double
protected boolean
protected int
protected int
protected int
static final double
static final double
static final double
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected double[]
accumulate
(int[] times, double[] values) void
addData
(PairedDataContainer pdContainer) void
addData
(TimeSeriesContainer tsContainer) void
protected int
getDataContainer
(String name) Returns the data container for a given data container name.int
int
Vector[]
Gets the last value in each active data set and when it occurredboolean
hasData
(DataContainer dataContainer) void
setColorSettings
(String settings) protected void
setCumulative
(int cumulativeInterval, int accumulationType) setCumulativevoid
setData
(PairedDataContainer pdContainer) Sets this class to hold a PairedDataContainer.void
setData
(TimeSeriesContainer tsContainer) Sets this class to hold a TimeSeriesContainer.void
setDataContainerList
(List list) void
setDataSetName
(String name) void
setDataSetNames
(Vector names) void
setSelected
(boolean selected) void
Fix the icon's size, so it will not change when it's container is resizedvoid
setTsDataSetNames
(Vector names) void
setXLimits
(double minX, double maxX) void
setXLimits
(int minX, int maxX) void
setYLimits
(double minY, double maxY) Methods inherited from class javax.swing.ImageIcon
getAccessibleContext, getDescription, getImage, getImageLoadStatus, getImageObserver, loadImage, paintIcon, setDescription, setImage, setImageObserver, toString
-
Field Details
-
_accumulationType
public int _accumulationType -
_cumulativeInterval
public int _cumulativeInterval -
_backgroundColor
-
_noDataColor
-
_borderColor
-
UNDEFINED_MAX
public static final double UNDEFINED_MAX- See Also:
-
UNDEFINED_MIN
public static final double UNDEFINED_MIN- See Also:
-
UNDEFINED
public static final double UNDEFINED- See Also:
-
_size
protected int _size -
_xLoc
protected int _xLoc -
_yLoc
protected int _yLoc -
_dimension
-
_fixedDimension
-
_dataSetNames
-
_selected
protected boolean _selected -
_minXSet
protected double _minXSet -
_maxXSet
protected double _maxXSet -
_minYSet
protected double _minYSet -
_maxYSet
protected double _maxYSet -
_dataContainerList
-
-
Constructor Details
-
PlotIconBase
public PlotIconBase()
-
-
Method Details
-
setSize
Fix the icon's size, so it will not change when it's container is resized -
setDataSetName
-
setDataSetNames
-
setTsDataSetNames
-
getDataSetName
-
getDataSetNames
-
setCumulative
protected void setCumulative(int cumulativeInterval, int accumulationType) setCumulative- Parameters:
cumulativeInterval
- int // -1: no interval, show all data (sccumulation not used) 0: total, increase over time >0: Show accumulated amount during that time, no increase e.g. daily (1440), show the total for that day for the entire span of that day.accumulationType
- int flag indicating accumulation type 0: individual values (increasing) 1: total over interval 2: minimum value over interval 3: maximum value over interval 4: average over interval 5: last valid value (for entire interval)
-
getCumulativeInterval
protected int getCumulativeInterval() -
accumulate
protected double[] accumulate(int[] times, double[] values) -
getDataContainer
Returns the data container for a given data container name. Returns null if a data container cannot be found with that name. The data container is either of type TimeSeriesContainer or PairedDataContainer.- Parameters:
name
-- Returns:
-
setData
Sets this class to hold a PairedDataContainer. All other data references are lost.- Parameters:
pdContainer
-
-
setData
Sets this class to hold a TimeSeriesContainer. All other data references are lost.- Parameters:
tsContainer
-
-
addData
-
addData
-
hasData
-
setColorSettings
-
getColorSettings
-
clearData
public void clearData() -
setSelected
public void setSelected(boolean selected) -
setXLimits
public void setXLimits(int minX, int maxX) -
setXLimits
public void setXLimits(double minX, double maxX) -
setYLimits
public void setYLimits(double minY, double maxY) -
getIconWidth
public int getIconWidth()- Specified by:
getIconWidth
in interfaceIcon
- Overrides:
getIconWidth
in classImageIcon
-
getIconHeight
public int getIconHeight()- Specified by:
getIconHeight
in interfaceIcon
- Overrides:
getIconHeight
in classImageIcon
-
getRectangle
-
getDataContainerList
-
setDataContainerList
-
getLastValue
Gets the last value in each active data set and when it occurred- Returns:
- Vector[2]. Vector[0] contains HecDoubles of the values Vector[1] contains HecTime of when that occurred.
-