org.strbio.util.graph
Class PointLegend

java.lang.Object
  extended by org.strbio.util.graph.PointLegend
All Implemented Interfaces:
Legend

public class PointLegend
extends java.lang.Object
implements Legend

A legend for points, showing a the point next to a label.

  Version 1.0, 5/17/99 - original version
  

Version:
1.0, 5/17/99
Author:
JMC

Constructor Summary
PointLegend(PointType ptype, java.awt.Font f, java.awt.FontMetrics fmet, java.lang.String l)
          Initialize new legend.
 
Method Summary
 int getHeight()
          Get the height that the legend wants to draw in.
 int getWidth()
          Get the width that the legend wants to draw in.
 void paintLegend(java.awt.Graphics g, int x, int y)
          draw the legend, at a given top, left position.
 void setFont(java.awt.Font f, java.awt.FontMetrics fmet)
          set the font labels will be printed in.
 void setLabel(java.lang.String l)
          set the label for this legend.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PointLegend

public PointLegend(PointType ptype,
                   java.awt.Font f,
                   java.awt.FontMetrics fmet,
                   java.lang.String l)
Initialize new legend.

Method Detail

setLabel

public void setLabel(java.lang.String l)
set the label for this legend.

Specified by:
setLabel in interface Legend

setFont

public void setFont(java.awt.Font f,
                    java.awt.FontMetrics fmet)
set the font labels will be printed in.

Specified by:
setFont in interface Legend

getWidth

public int getWidth()
Description copied from interface: Legend
Get the width that the legend wants to draw in.

Specified by:
getWidth in interface Legend

getHeight

public int getHeight()
Description copied from interface: Legend
Get the height that the legend wants to draw in.

Specified by:
getHeight in interface Legend

paintLegend

public void paintLegend(java.awt.Graphics g,
                        int x,
                        int y)
Description copied from interface: Legend
draw the legend, at a given top, left position.

Specified by:
paintLegend in interface Legend