All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object
   |
   +----MSBChart.ChartComponent
           |
           +----MSBChart.Legend
The legend contains the description of the data displayed in the chart. A legend can be displayed on the right side of the chart (default), at the top or at the bottom. The property Layout of the Chart modifies the behaviour.
A legend is a list of pairs:
Example:
Legend l=new Legend();
l.border=new LineStyle(0.2f,java.awt.Color.black,LineStyle.LINE_NORMAL);
l.addItem("Company A",new FillStyle(java.awt.Color.cyan));
l.addItem("Company B",new FillStyle(java.awt.Color.green));
the legend must be assigned to the chart:
chart.legend=l;

 
 background
	background
   border
	border
   color
	color
   font
	font
   legendMargin
	legendMargin
   verticalLayout
	verticalLayout
   
 Legend()
	Legend()
   
 addItem(String, Object)
	addItem(String, Object)
   draw(Graphics)
	draw(Graphics)
 
 background
background
public FillStyle background
background of the legend.
 border
border
public LineStyle border
border of the legend.
 legendMargin
legendMargin
public int legendMargin
margin of the legend.
 color
color
public Color color
 font
font
public Font font
 verticalLayout
verticalLayout
public boolean verticalLayout
if false the items will be displayed from left to right.
 
 Legend
Legend
public Legend()
 
 addItem
addItem
 public void addItem(String Name,
                     Object icon)
Adds an item. The item is a description and an icon. The icon can be an Image, a Linestyle or a FillStyle.
 draw
draw
public void draw(Graphics g)
All Packages Class Hierarchy This Package Previous Next Index