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