public class DataCurve extends DataContainer implements DataElement
DataContainer
of DataPoints
.Modifier and Type | Field and Description |
---|---|
static String |
TITLE_KEY
Config parameter key.
|
static String |
X_KEY
Config parameter key.
|
static String |
Y_KEY
Config parameter key.
|
Constructor and Description |
---|
DataCurve(ConfigParameters config)
Creates an instance from the specified config parameters.
|
DataCurve(String title)
Creates an empty instance with the specified title.
|
Modifier and Type | Method and Description |
---|---|
DataContainer |
getContainer()
Returns the
DataPlot containing this curve. |
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 String X_KEY
public static final String Y_KEY
public static final String TITLE_KEY
public DataCurve(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 String getTitle()
protected boolean isValid(DataElement element)
DataPoint
.isValid
in class DataContainer
element
- DataElement to be checked.Copyright © 2015. All Rights Reserved.