com.java4less.rchart
Class Title
java.lang.Object
|
+--com.java4less.rchart.ChartComponent
|
+--com.java4less.rchart.Title
- public class Title
- extends ChartComponent
The title will be displayed as text above the chart. You can create a title like this:
com.java4less.rchart.Title title=new Title("Sales (thousands $)");
the title is specified in the constructor of the chart class.
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.
Field Summary |
java.awt.Color |
color
color used for the title |
java.awt.Font |
font
font used for the title |
java.lang.String |
text
text of the title. |
Constructor Summary |
Title(java.lang.String t)
Constructs a title with the specified text. |
Method Summary |
void |
draw(java.awt.Graphics g)
draws the title. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
text
public java.lang.String text
- text of the title.
font
public java.awt.Font font
- font used for the title
color
public java.awt.Color color
- color used for the title
Title
public Title(java.lang.String t)
- Constructs a title with the specified text.
draw
public void draw(java.awt.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