public class DataCurve extends DataContainer implements DataElement
DataContainer
of DataPoints
.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TITLE_KEY
Config parameter key.
|
static java.lang.String |
X_KEY
Config parameter key.
|
static java.lang.String |
Y_KEY
Config parameter key.
|
Constructor and Description |
---|
DataCurve(ConfigParameters config)
Creates an instance from the specified config parameters.
|
DataCurve(java.lang.String title)
Creates an empty instance with the specified title.
|
Modifier and Type | Method and Description |
---|---|
DataContainer |
getContainer()
Returns the
DataPlot containing this curve. |
java.lang.String |
getTitle()
Returns the title of this curve.
|
protected boolean |
isValid(DataElement element)
Returns true if element is an instance of
DataPoint . |
void |
setContainer(DataContainer container)
Sets the
DataPlot where this is a curve of. |
addDataListener, addElement, getElement, getIndexOf, getNumberOfElements, insertElementAt, removeDataListener, removeElementAt, replaceElementAt
public static final java.lang.String X_KEY
public static final java.lang.String Y_KEY
public static final java.lang.String TITLE_KEY
public DataCurve(java.lang.String title)
public DataCurve(ConfigParameters config)
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. |
public DataContainer getContainer()
DataPlot
containing this curve.getContainer
in interface DataElement
public void setContainer(DataContainer container)
DataPlot
where this is a curve of.setContainer
in interface DataElement
container
- Container which should contains this element. Cann be
null if this element does not belong to a container.public java.lang.String getTitle()
protected boolean isValid(DataElement element)
DataPoint
.isValid
in class DataContainer
element
- DataElement to be checked.Copyright © 2016. All Rights Reserved.