All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class COM.ibm.beans.charting.Chart

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----COM.ibm.desktop.ComponentController
                                           |
                                           +----COM.ibm.beans.charting.Chart

public class Chart
extends ComponentController
The Chart class is extended from the ComponentController class of the CAF framework, and serves as the glue between the model, the ChartModel class that maintains all the data of the charting bean, and any of the View classes viz., VerticalBarChartView, HorizontalBarChartView, LineChartView & the PieChartView classes, that perform the actual charting of this data. The getters and setters of the chart's properties are delegated to either the ChartModel or the chart's view class, depending on the property itself.


Constructor Index

 o Chart()
Default constructor.
 o Chart(ChartType)
Constructs a specific type of chart.

Method Index

 o getChartColors()
Delegate the get for the (vector) colors to be used for plotting the data to the model.
 o getChartData()
Delegate the get for the data that is to be plotted to the model.
 o getChartFont()
Returns the font used for the chart's labels.
 o getChartLabels()
Delegate the get for the labels to be used for the chart to the model.
 o getChartTitle()
Delegate the get for the title to be used for the chart to the model.
 o getChartType()
Delegate the get for the chart type to the model.
 o getColor(int)
Delegate the get for the color to be used for plotting the data at this index to the model.
 o getData(int)
Delegate the get for the data at this index to the model.
 o getDataSize()
Delegate the get for the size of the data to be plotted to the model .
 o getLabel(int)
Delegate the get for the label to be used for charting the data at this index.
 o getTitleFont()
Returns the font used for the chart's title.
 o getXAxisLabel()
Delegate the get for the X-axis label to be used for the chart to the model.
 o getYAxisLabel()
Returns the Y axis label to be used for the chart.
 o isLabelsShown()
Delegate the get for the flag for showing the labels for the chart data, to the view.
 o isValuesShown()
Delegate the get for the flag for showing the values for the chart data, to the view.
 o isXAxisLabelShown()
Delegate the get for the flag for showing the X-axis label for the chart data to the view.
 o isYAxisLabelShown()
Delegate the get for the flag for showing the Y-axis label for the chart data to the view.
 o main(String[])
Create a Chart to run as an application.
 o setChartColors(Vector)
Delegate the set for the (vector of) colors to be used for plotting the data to the model.
 o setChartData(Vector)
Delegate the set for the data that is to be plotted to the model.
 o setChartFont(Font)
Sets the font used for the chart's labels to the specified font.
 o setChartLabels(Vector)
Delegate the set for the labels to be used for the chart to the model.
 o setChartTitle(String)
Delegate the set for the title to be used for the chart to the model.
 o setChartType(ChartType)
Delegate the sets for the chart type to the specified one.
 o setColor(int, Color)
Delegate the set for the color to be used for plotting the data at this index to the model.
 o setData(int, Number)
Delegate the set for the data at this index to the model.
 o setLabel(int, String)
Delegate the set for the label to be used for charting the data at this index.
 o setLabelsShown(boolean)
Delegate the set for the flag for showing the labels for the chart data, to the view.
 o setTitleFont(Font)
Sets the font for the chart's title to the specified font.
 o setValuesShown(boolean)
Delegate the get for the flag for showing the values for the chart data, to the view.
 o setXAxisLabel(String)
Delegate the get for the X axis label to be used for the chart, to the model.
 o setXAxisLabelShown(boolean)
Delegate the toggle for the flag for showing the labels for the chart data to the view.
 o setYAxisLabel(String)
Sets the chart's Y=axis label to the one specified.
 o setYAxisLabelShown(boolean)
Delegate the toggle for the flag for showing the Y axis label for the chart data to the view.

Constructors

 o Chart
 public Chart()
Default constructor.

 o Chart
 public Chart(ChartType chartType)
Constructs a specific type of chart.

Parameters:
chartType - the type of chart

Methods

 o main
 public static void main(String args[])
Create a Chart to run as an application.

 o getChartType
 public ChartType getChartType()
Delegate the get for the chart type to the model.

See Also:
ChartModel
 o setChartType
 public void setChartType(ChartType type)
Delegate the sets for the chart type to the specified one.

Parameters:
type - the chart type
See Also:
ChartModel
 o getData
 public Number getData(int index)
Delegate the get for the data at this index to the model.

Parameters:
index - the specified index
See Also:
ChartModel
 o setData
 public void setData(int index,
                     Number value)
Delegate the set for the data at this index to the model.

Parameters:
index - the specified index
value - the data value to be set
See Also:
ChartModel
 o getChartData
 public Vector getChartData()
Delegate the get for the data that is to be plotted to the model.

See Also:
ChartModel
 o setChartData
 public void setChartData(Vector dataValues)
Delegate the set for the data that is to be plotted to the model.

Parameters:
dataValues - the vector of data values (Number objects) to be charted.
See Also:
ChartModel
 o getColor
 public Color getColor(int index)
Delegate the get for the color to be used for plotting the data at this index to the model.

Parameters:
index - the specified index
See Also:
ChartModel
 o setColor
 public void setColor(int index,
                      Color color)
Delegate the set for the color to be used for plotting the data at this index to the model.

Parameters:
index - the specified index
color - the specified color
See Also:
ChartModel
 o getChartColors
 public Vector getChartColors()
Delegate the get for the (vector) colors to be used for plotting the data to the model.

See Also:
ChartModel
 o setChartColors
 public void setChartColors(Vector colors)
Delegate the set for the (vector of) colors to be used for plotting the data to the model.

Parameters:
colors - the vector of colors to be used
See Also:
ChartModel
 o getLabel
 public String getLabel(int index)
Delegate the get for the label to be used for charting the data at this index. to the model.

Parameters:
index - the specified index
 o setLabel
 public void setLabel(int index,
                      String label)
Delegate the set for the label to be used for charting the data at this index. to the model.

Parameters:
index - the specified index
color - the specified label
 o getChartLabels
 public Vector getChartLabels()
Delegate the get for the labels to be used for the chart to the model.

See Also:
ChartModel
 o setChartLabels
 public void setChartLabels(Vector labels)
Delegate the set for the labels to be used for the chart to the model.

Parameters:
labels - the vector of labels to be used
See Also:
ChartModel
 o getChartTitle
 public String getChartTitle()
Delegate the get for the title to be used for the chart to the model.

See Also:
ChartModel
 o setChartTitle
 public void setChartTitle(String title)
Delegate the set for the title to be used for the chart to the model.

Parameters:
title - the title for the chart
See Also:
ChartModel
 o getXAxisLabel
 public String getXAxisLabel()
Delegate the get for the X-axis label to be used for the chart to the model.

See Also:
ChartModel
 o setXAxisLabel
 public void setXAxisLabel(String label)
Delegate the get for the X axis label to be used for the chart, to the model.

Parameters:
label - the X-axis label for the chart
See Also:
ChartModel
 o getYAxisLabel
 public String getYAxisLabel()
Returns the Y axis label to be used for the chart.

 o 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
 o getDataSize
 public int getDataSize()
Delegate the get for the size of the data to be plotted to the model .

See Also:
ChartModel
 o getTitleFont
 public Font getTitleFont()
Returns the font used for the chart's title.

See Also:
ChartView
 o setTitleFont
 public void setTitleFont(Font font)
Sets the font for the chart's title to the specified font.

Parameters:
font - the font for the chart's title
See Also:
ChartView
 o getChartFont
 public Font getChartFont()
Returns the font used for the chart's labels.

 o setChartFont
 public void setChartFont(Font font)
Sets the font used for the chart's labels to the specified font.

Parameters:
font - the font for the chart's labels
 o isLabelsShown
 public boolean isLabelsShown()
Delegate the get for the flag for showing the labels for the chart data, to the view.

See Also:
ChartView
 o setLabelsShown
 public void setLabelsShown(boolean show)
Delegate the set for the flag for showing the labels for the chart data, to the view.

Parameters:
show - if true, the labels for the bars/points are shown, if false, they are hidden
See Also:
ChartView
 o isValuesShown
 public boolean isValuesShown()
Delegate the get for the flag for showing the values for the chart data, to the view.

See Also:
ChartView
 o setValuesShown
 public void setValuesShown(boolean show)
Delegate the get for the flag for showing the values for the chart data, to the view.

Parameters:
show - if true, the values of the bars/points are shown, if false, they are hidden
See Also:
ChartView
 o isXAxisLabelShown
 public boolean isXAxisLabelShown()
Delegate the get for the flag for showing the X-axis label for the chart data to the view.

See Also:
ChartView
 o setXAxisLabelShown
 public void setXAxisLabelShown(boolean show)
Delegate the toggle for the flag for showing the labels for the chart data to the view.

Parameters:
show - if true, the label under the X axis is shown, if false, it is hidden
See Also:
ChartView
 o isYAxisLabelShown
 public boolean isYAxisLabelShown()
Delegate the get for the flag for showing the Y-axis label for the chart data to the view.

See Also:
ChartView
 o setYAxisLabelShown
 public void setYAxisLabelShown(boolean show)
Delegate the toggle for the flag for showing the Y axis label for the chart data to the view.

Parameters:
show - if true, the label above the Y axis is shown, if false, it is hidden
See Also:
ChartView

All Packages  Class Hierarchy  This Package  Previous  Next  Index