|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.jrefinery.data.Series | +--com.jrefinery.data.XYSeries
Represents a sequence of zero or more data pairs in the form (x, y).
Constructor Summary | |
XYSeries(java.lang.String name)
Constructs a new xy-series that contains no data. |
|
XYSeries(java.lang.String name,
boolean allowDuplicateXValues)
Constructs a new xy-series that contains no data. |
Method Summary | |
void |
add(double x,
double y)
Adds a data item to the series. |
void |
add(double x,
java.lang.Number y)
Adds a data item to the series. |
void |
add(java.lang.Number x,
java.lang.Number y)
Adds new data to the series. |
void |
add(XYDataPair pair)
Adds a data item to the series. |
void |
clear()
Removes all data pairs from the series. |
java.lang.Object |
clone()
Returns a clone of the series. |
XYSeries |
createCopy(int start,
int end)
Creates a new series by copying a subset of the data in this time series. |
void |
delete(int start,
int end)
Deletes a range of items from the series. |
XYDataPair |
getDataPair(int index)
Return the data pair with the specified index. |
int |
getItemCount()
Returns the number of items in the series. |
java.lang.Number |
getXValue(int index)
Returns the x-value at the specified index. |
java.lang.Number |
getYValue(int index)
Returns the y-value at the specified index. |
void |
update(int index,
java.lang.Number y)
Updates the value of an item in the series. |
Methods inherited from class com.jrefinery.data.Series |
addChangeListener, addPropertyChangeListener, firePropertyChange, fireSeriesChanged, getDescription, getName, notifyListeners, removeChangeListener, removePropertyChangeListener, setDescription, setName |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XYSeries(java.lang.String name)
By default, duplicate x-values will be allowed for the series.
name
- the series name.public XYSeries(java.lang.String name, boolean allowDuplicateXValues)
name
- the series name.allowDuplicateXValues
- a flag that controls whether duplicate x-values are allowed.Method Detail |
public int getItemCount()
public void add(XYDataPair pair) throws SeriesException
pair
- the (x, y) pair.SeriesException
- if there is a problem adding the data.public void add(double x, double y) throws SeriesException
x
- the x value.y
- the y value.SeriesException
- if there is a problem adding the data.public void add(double x, java.lang.Number y) throws SeriesException
The unusual pairing of parameter types is to make it easier to add null y-values.
x
- the x value.y
- the y value.SeriesException
- if there is a problem adding the data.public void add(java.lang.Number x, java.lang.Number y) throws SeriesException
Throws an exception if the x-value is a duplicate AND the allowDuplicateXValues flag is false.
x
- the x-value.y
- the y-value.SeriesException
- if there is a problem adding the data.public void delete(int start, int end)
start
- The start index (zero-based).end
- The end index (zero-based).public void clear()
public XYDataPair getDataPair(int index)
index
- The index.public java.lang.Number getXValue(int index)
index
- The index.public java.lang.Number getYValue(int index)
index
- The index.public void update(int index, java.lang.Number y)
index
- The item (zero based index).y
- The new value.public java.lang.Object clone()
clone
in class Series
public XYSeries createCopy(int start, int end)
start
- The index of the first item to copy.end
- The index of the last item to copy.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |