Package jcckit.data
Class DataCurve
java.lang.Object
jcckit.data.DataContainer
jcckit.data.DataCurve
- All Implemented Interfaces:
DataElement
A curve is a
DataContainer
of DataPoints
.-
Field Summary
-
Constructor Summary
ConstructorDescriptionCreates an empty instance with the specified title.DataCurve
(ConfigParameters config) Creates an instance from the specified config parameters. -
Method Summary
Modifier and TypeMethodDescriptionReturns theDataPlot
containing this curve.getTitle()
Returns the title of this curve.protected boolean
isValid
(DataElement element) Returns true if element is an instance ofDataPoint
.void
setContainer
(DataContainer container) Sets theDataPlot
where this is a curve of.Methods inherited from class jcckit.data.DataContainer
addDataListener, addElement, getElement, getIndexOf, getNumberOfElements, insertElementAt, removeDataListener, removeElementAt, replaceElementAt
-
Field Details
-
X_KEY
Config parameter key.- See Also:
-
Y_KEY
Config parameter key.- See Also:
-
TITLE_KEY
Config parameter key.- See Also:
-
-
Constructor Details
-
DataCurve
Creates an empty instance with the specified title. -
DataCurve
Creates an instance from the specified config parameters.Key & Default Value Type Mandatory Description title = empty string String no Curve title. x double[] yes x-coordinates of the curve points. y double[] yes y-coordinates of the curve points.
-
-
Method Details
-
getContainer
Returns theDataPlot
containing this curve.- Specified by:
getContainer
in interfaceDataElement
- Returns:
- null if this element is not an element of a container.
-
setContainer
Sets theDataPlot
where this is a curve of.- Specified by:
setContainer
in interfaceDataElement
- Parameters:
container
- Container which should contains this element. Cann be null if this element does not belong to a container.
-
getTitle
Returns the title of this curve. -
isValid
Returns true if element is an instance ofDataPoint
.- Specified by:
isValid
in classDataContainer
- Parameters:
element
- DataElement to be checked.
-