All Packages Class Hierarchy This Package Previous Next Index
Class COM.ibm.beans.charting.ChartModel
java.lang.Object
|
+----COM.ibm.desktop.Model
|
+----COM.ibm.beans.charting.ChartModel
- public class ChartModel
- extends Model
ChartModel defines the data required by the Charting Beans for charting, viz.,
the data values to be charted, the labels, axes labels and title to be used for
the chart.
It allows access and modification of all of these chart properties.
It also maintains the type (view) of the chart currently being displayed.
-
fChartColors
- The colors to be used for drawing each bar/wedge of the chart.
-
fChartData
- The data to be charted, which is essentially a Vector of Numbers.
-
fChartLabels
- The labels to be displayed for each bar/point/wedge in the charts
-
fChartTitle
- The title of the chart.
-
fChartType
- The type of chart to be displayed, which could be one of:
1.
-
fXAxisLabel
- The label to be drawn below the X axis in the Bar and Line
Charts.
-
fYAxisLabel
- The label to be drawn above the Y axis in the Bar and Line
Charts.
-
ChartModel()
- Default constructor of the Chart's Model.
-
getChartColors()
- Returns a vector of all the colors to be used for plotting the data.
-
getChartData()
- Returns all the data that is to be charted, in a Vector.
-
getChartLabels()
- Returns the vector of labels for the data.
-
getChartTitle()
- Returns the chart's title.
-
getChartType()
- Returns the currently selected chart type.
-
getColor(int)
- Returns the color to be used for charting the data at the specified index.
-
getData(int)
- Returns the data value at this index.
-
getDataSize()
- Returns the size of the data (vector) to be plotted.
-
getFileExtension()
- Return the file extension string (3 or 4 letter string without the .)
-
getLabel(int)
- Returns the label to be used for charting the data at this index.
-
getXAxisLabel()
- Returns the X axis label to be used for the chart.
-
getYAxisLabel()
- Returns the Y axis label to be used for the chart.
-
setChartColors(Vector)
- Sets all the colors to be used for charting the data, from the
vector specified.
-
setChartData(Vector)
- Sets all the data that is to be charted from the vector specified
-
setChartLabels(Vector)
- Sets the vector of labels for the data.
-
setChartTitle(String)
- Sets the chart's title to the one specified.
-
setChartType(ChartType)
- Sets the chart type to the specified one.
-
setColor(int, Color)
- Sets the color to be used for charting the data at this index.
-
setData(int, Number)
- Sets the data at this index.
-
setLabel(int, String)
- Sets the label to be used for data at this index.
-
setXAxisLabel(String)
- Sets the chart's X-axis label to the one specified.
-
setYAxisLabel(String)
- Sets the chart's Y-axis label to the one specified.
fChartType
protected ChartType fChartType
- The type of chart to be displayed, which could be one of:
1. BarChart
2. LineChart
3. PieChart
fChartData
protected Vector fChartData
- The data to be charted, which is essentially a Vector of Numbers.
fChartLabels
protected Vector fChartLabels
- The labels to be displayed for each bar/point/wedge in the charts
fChartTitle
protected String fChartTitle
- The title of the chart.
fChartColors
protected Vector fChartColors
- The colors to be used for drawing each bar/wedge of the chart.
fXAxisLabel
protected String fXAxisLabel
- The label to be drawn below the X axis in the Bar and Line
Charts.
fYAxisLabel
protected String fYAxisLabel
- The label to be drawn above the Y axis in the Bar and Line
Charts.
ChartModel
public ChartModel()
- Default constructor of the Chart's Model.
getFileExtension
public String getFileExtension()
- Return the file extension string (3 or 4 letter string without the .)
- Overrides:
- getFileExtension in class Model
getChartType
public ChartType getChartType()
- Returns the currently selected chart type.
setChartType
public void setChartType(ChartType type)
- Sets the chart type to the specified one.
- Parameters:
- type - the chart type
getData
public Number getData(int index) throws ArrayIndexOutOfBoundsException
- Returns the data value at this index.
- Parameters:
- index - the specified index
setData
public void setData(int index,
Number value)
- Sets the data at this index.
- Parameters:
- index - the specified index
- value - the data value to be set
getChartData
public Vector getChartData()
- Returns all the data that is to be charted, in a Vector.
setChartData
public void setChartData(Vector dataValues)
- Sets all the data that is to be charted from the vector specified
- Parameters:
- dataValues - the vector of data values (Number objects)
to be charted.
getColor
public Color getColor(int index)
- Returns the color to be used for charting the data at the specified index.
- Parameters:
- index - the specified index
setColor
public void setColor(int index,
Color color)
- Sets the color to be used for charting the data at this index.
- Parameters:
- index - the specified index
- color - the specified color
getChartColors
public Vector getChartColors()
- Returns a vector of all the colors to be used for plotting the data.
setChartColors
public void setChartColors(Vector colors)
- Sets all the colors to be used for charting the data, from the
vector specified.
- Parameters:
- colors - the vector of colors to be used
getLabel
public String getLabel(int index)
- Returns the label to be used for charting the data at this index.
- Parameters:
- index - the specified index
setLabel
public void setLabel(int index,
String label)
- Sets the label to be used for data at this index.
- Parameters:
- index - the specified index
- label - the label string
getChartLabels
public Vector getChartLabels()
- Returns the vector of labels for the data.
setChartLabels
public void setChartLabels(Vector labels)
- Sets the vector of labels for the data.
- Parameters:
- labels - the vector of labels to be used
getChartTitle
public String getChartTitle()
- Returns the chart's title.
setChartTitle
public void setChartTitle(String title)
- Sets the chart's title to the one specified.
- Parameters:
- title - the title for the chart
getXAxisLabel
public String getXAxisLabel()
- Returns the X axis label to be used for the chart.
setXAxisLabel
public void setXAxisLabel(String label)
- Sets the chart's X-axis label to the one specified.
- Parameters:
- label - the X-axis label for the chart
getYAxisLabel
public String getYAxisLabel()
- Returns the Y axis label to be used for the chart.
setYAxisLabel
public void setYAxisLabel(String label)
- Sets the chart's Y-axis label to the one specified.
- Parameters:
- label - the Y-axis label for the chart
getDataSize
public int getDataSize()
- Returns the size of the data (vector) to be plotted.
All Packages Class Hierarchy This Package Previous Next Index