All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jsz.Plotter.LegendLabel

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----javax.swing.JComponent
                           |
                           +----javax.swing.JLabel
                                   |
                                   +----jsz.Plotter.LegendLabel

public class LegendLabel
extends JLabel
implements Observer
This class implements the legend for plot (graphical representation of a {@link jsz.Plotter.DataSeries}. A legend is simply a JLabel, which uses a {@link jsz.Plotter.LegendIcon} as its icon. Using a JLabel has the advantage of absolut freedom of arranging the legends. You simply take a JPanel, use the LayoutManager which suits best and add the legends. Anyway, there is {@link jsz.Plotter.LegendPanel} for your convinience, which lets you add {@link jsz.Plotter.IDataSeries} objects, so you dont have to instantiate the labels yourself.


Constructor Index

 o LegendLabel(IDataSeries)
Creates a label and adds this instance to ds's observer list.
 o LegendLabel(LegendIcon, String)
Creates a label with icon and text.

Method Index

 o update(Observable, Object)

Constructors

 o LegendLabel
 public LegendLabel(IDataSeries ds)
Creates a label and adds this instance to ds's observer list.

 o LegendLabel
 public LegendLabel(LegendIcon icon,
                    String legend)
Creates a label with icon and text. No Observer functionality in this case.

Methods

 o update
 public void update(Observable o,
                    Object arg)

All Packages  Class Hierarchy  This Package  Previous  Next  Index