no.hig.okolloen.graphics.chart
Class ChartItem

java.lang.Object
  |
  +--no.hig.okolloen.graphics.chart.ChartItem

public class ChartItem
extends java.lang.Object

Just a collection of data that is used to represent a datapoint in a Chart. Contains the value, title and color representing this datapoint.

Since:
rev 0.1

Constructor Summary
ChartItem(double value)
          Constructor for the ChartItem class.
ChartItem(double value, java.awt.Color color)
          Constructor for the ChartItem class.
ChartItem(java.lang.String title, double value, java.awt.Color color)
          Constructor for the ChartItem class.
 
Method Summary
 java.awt.Color getColor()
          Retrieves the color of this datapoint.
 java.lang.String getTitle()
          Retrieves the title of this datapoint.
 double getValue()
          Retrieves the value of this datapoint.
 void setColor(java.awt.Color color)
          sets the color of this datapoint.
 void setTitle(java.lang.String title)
          sets the title of this datapoint.
 void setValue(double value)
          sets the value of this datapoint.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChartItem

public ChartItem(double value)
Constructor for the ChartItem class.
Parameters:
value - the value of this datapoint.

ChartItem

public ChartItem(double value,
                 java.awt.Color color)
Constructor for the ChartItem class.
Parameters:
value - the value of this datapoint.
color - the color used to draw this datapoint

ChartItem

public ChartItem(java.lang.String title,
                 double value,
                 java.awt.Color color)
Constructor for the ChartItem class.
Parameters:
title - the title or legend value of this datapoint
value - the value of this datapoint.
color - the color used to draw this datapoint
Method Detail

getTitle

public java.lang.String getTitle()
Retrieves the title of this datapoint.
Returns:
String object with the title of the datapoint.

getValue

public double getValue()
Retrieves the value of this datapoint.
Returns:
double with the value of this datapoint.

getColor

public java.awt.Color getColor()
Retrieves the color of this datapoint.
Returns:
Color object with the color of the datapoint.

setTitle

public void setTitle(java.lang.String title)
sets the title of this datapoint.
Parameters:
title - String object with the title of the datapoint.

setValue

public void setValue(double value)
sets the value of this datapoint.
Parameters:
value - the value of this datapoint.

setColor

public void setColor(java.awt.Color color)
sets the color of this datapoint.
Parameters:
color - object with the color of the datapoint.