|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.androidplot.xy.SimpleXYSeries
public class SimpleXYSeries
A convenience class used to create instances of XYPlot generated from Lists of Numbers. Note that SimpleXYSeries is not synchronized; never alter the underlying model of a SimpleXYSeries during a call to Plot.redraw() on a Plot with which the SimpleXYSeries instance has been registered. It is the developer's responsibility to implement the synchronization mechanism(s) to accomplish this.
Nested Class Summary | |
---|---|
static class |
SimpleXYSeries.ArrayFormat
|
Constructor Summary | |
---|---|
SimpleXYSeries(java.util.List<? extends java.lang.Number> xVals,
java.util.List<? extends java.lang.Number> yVals,
java.lang.String title)
|
|
SimpleXYSeries(java.util.List<? extends java.lang.Number> model,
SimpleXYSeries.ArrayFormat format,
java.lang.String title)
Generates an XYSeries instance from the List of numbers passed in. |
|
SimpleXYSeries(java.lang.String title)
|
Method Summary | |
---|---|
void |
addFirst(java.lang.Number x,
java.lang.Number y)
|
void |
addLast(java.lang.Number x,
java.lang.Number y)
|
java.lang.String |
getTitle()
|
java.lang.Number |
getX(int index)
Returns the x-value for an index within a series. |
java.lang.Number |
getY(int index)
Returns the y-value for an index within a series. |
android.util.Pair<java.lang.Number,java.lang.Number> |
removeFirst()
|
android.util.Pair<java.lang.Number,java.lang.Number> |
removeLast()
|
void |
setModel(java.util.List<? extends java.lang.Number> model,
SimpleXYSeries.ArrayFormat format)
|
void |
setX(java.lang.Number value,
int index)
Sets individual x value based on index |
void |
setY(java.lang.Number value,
int index)
Sets individual y value based on index |
int |
size()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleXYSeries(java.lang.String title)
public SimpleXYSeries(java.util.List<? extends java.lang.Number> model, SimpleXYSeries.ArrayFormat format, java.lang.String title)
model
- A List of Number elements comprising the data model.format
- Format of the model. A format of Y_VALS_ONLY means that the array only contains y-values.
For this format x values are autogenerated using values of 0 through n-1 where n is the size of the model.title
- Title of the seriespublic SimpleXYSeries(java.util.List<? extends java.lang.Number> xVals, java.util.List<? extends java.lang.Number> yVals, java.lang.String title)
Method Detail |
---|
public void setModel(java.util.List<? extends java.lang.Number> model, SimpleXYSeries.ArrayFormat format)
model
- A List of Number elements comprising the data model.format
- Format of the model. A format of Y_VALS_ONLY means that the array only contains y-values.
For this format x values are autogenerated using values of 0 through n-1 where n is the size of the model.public void setX(java.lang.Number value, int index)
value
- index
- public void setY(java.lang.Number value, int index)
value
- index
- public void addFirst(java.lang.Number x, java.lang.Number y)
public android.util.Pair<java.lang.Number,java.lang.Number> removeFirst()
public void addLast(java.lang.Number x, java.lang.Number y)
public android.util.Pair<java.lang.Number,java.lang.Number> removeLast()
public java.lang.String getTitle()
getTitle
in interface Series
public int size()
size
in interface Series
public java.lang.Number getX(int index)
XYSeries
getX
in interface XYSeries
index
- the index index (in the range 0
to
size()-1
).
public java.lang.Number getY(int index)
XYSeries
getY
in interface XYSeries
index
- the index index (in the range 0
to
size()-1
).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |