All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class MSBChart.Title

java.lang.Object
   |
   +----MSBChart.ChartComponent
           |
           +----MSBChart.Title

public class Title
extends ChartComponent

The title will be displayed as text above the chart. You can create a title like this:

MSBChart.Title title=new Title("Sales (thousands $)");

the title is specified in the constructor of the chart class. This is the result

 

 

If you need more space for the title you can modify the topMargin property of the chart.

You can also construct your own title classes if you want, just implement in the draw method the kind of drawing you want to make.


Variable Index

 o color
 o font
 o text

Constructor Index

 o Title(String)

Method Index

 o draw(Graphics)

Variables

 o text
 public String text
 text of the title.
 o font
 public Font font
 font used for the title.
 
 o color
 public Color color
 color used for the title.

Constructors

 o Title
 public Title(String t)
 Constructs a title with the specified text.

Methods

 o draw
 public void draw(Graphics g)
 draws the title. If you create you own title class you must draw here but you must draw within the coordinates of the ChartComponent.

All Packages  Class Hierarchy  This Package  Previous  Next  Index