|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--no.hig.okolloen.graphics.chart.ChartDataSet
The ChartDataSet class is used to hold data values used by LineChart and BarChart. It is more or less just a vector of ChartItems.
Constructor Summary | |
ChartDataSet(int maxElements)
Constructor for the ChartDataSet class. |
Method Summary | |
void |
addElement(ChartItem item)
Adds an element to the ChartDataSet. |
void |
addElement(double value)
Adds an element to the ChartDataSet. |
void |
addElement(double value,
java.awt.Color color)
Adds an element to the ChartDataSet. |
void |
addElement(double value,
java.awt.Color color,
java.lang.String title)
Adds an element to the ChartDataSet. |
void |
clear()
Clears the entire ChartDataSet. |
ChartItem |
getElementAt(int element)
Returns the element with the given index as a ChartItem |
void |
removeElementAt(int element)
Removes the element at the given index. all elements behind this index will be shifted down. |
void |
setElementAt(int element,
ChartItem item)
Sets element at given index in the ChartDataSet to given value. |
void |
setElementAt(int element,
double value)
Sets element at given index in the ChartDataSet to given value. |
void |
setElementAt(int element,
double value,
java.awt.Color color)
Sets element at given index in the ChartDataSet to given value and color. |
void |
setElementAt(int element,
double value,
java.awt.Color color,
java.lang.String title)
Sets element at given index in the ChartDataSet to given value, color and with given title. |
int |
size()
Returns the number of elements currently held in this ChartDataSet. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public ChartDataSet(int maxElements)
maxElements
- the maximum number of elements held by this ChartDataSet.Method Detail |
public void addElement(ChartItem item)
item
- the ChartItem to add.public void addElement(double value)
value
- the value of this datapoint.public void addElement(double value, java.awt.Color color)
value
- the value of this datapoint.color
- the color that will be used when representing this datapointpublic void addElement(double value, java.awt.Color color, java.lang.String title)
value
- the value of this datapoint.color
- the color that will be used when representing this datapointtitle
- the title to give this datapointpublic void setElementAt(int element, ChartItem item)
element
- the index in the ChartDataSet where this item is to be placed.item
- the item to put into this position.public void setElementAt(int element, double value)
value
- the value of this datapoint.public void setElementAt(int element, double value, java.awt.Color color)
value
- the value of this datapoint.color
- the color of used for the datapoint.public void setElementAt(int element, double value, java.awt.Color color, java.lang.String title)
value
- the value of this datapoint.color
- the color of used for the datapoint.title
- the title to use for this datapoint.public void removeElementAt(int element)
element
- the index of the element to be removed.public void clear()
public ChartItem getElementAt(int element)
public int size()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |