org.jfree.chart
Class MeterLegend

java.lang.Object
  |
  +--org.jfree.chart.Legend
        |
        +--org.jfree.chart.StandardLegend
              |
              +--org.jfree.chart.MeterLegend
All Implemented Interfaces:
java.io.Serializable

public class MeterLegend
extends StandardLegend

A legend for meter plots.

Author:
Hari
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jfree.chart.StandardLegend
DEFAULT_BACKGROUND_PAINT, DEFAULT_INNER_GAP, DEFAULT_ITEM_FONT, DEFAULT_OUTER_GAP, DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, DEFAULT_TITLE_FONT
 
Fields inherited from class org.jfree.chart.Legend
EAST, HORIZONTAL, INVERTED, NORTH, SOUTH, WEST
 
Constructor Summary
MeterLegend(JFreeChart chart, java.lang.String legendText)
          Constructs a new legend.
 
Method Summary
 java.awt.geom.Rectangle2D draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D available)
          Draws the legend.
protected  java.awt.geom.Rectangle2D draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D available, boolean horizontal, boolean inverted)
          Draws the legend.
 java.lang.String getLegendText()
          Returns the legend text.
 void setLegendText(java.lang.String text)
          Sets the legend text.
 
Methods inherited from class org.jfree.chart.StandardLegend
equals, getBackgroundPaint, getItemFont, getItemPaint, getOuterGap, getOutlinePaint, getOutlineShapes, getOutlineStroke, getShapeOutlinePaint, getShapeOutlineStroke, getTitle, getTitleFont, setBackgroundPaint, setDisplaySeriesShapes, setItemFont, setItemPaint, setOuterGap, setOutlinePaint, setOutlineShapes, setOutlineStroke, setShapeOutlinePaint, setShapeOutlineStroke, setTitle, setTitleFont
 
Methods inherited from class org.jfree.chart.Legend
addChangeListener, createInstance, getAnchor, getChart, notifyListeners, removeChangeListener, setAnchor
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MeterLegend

public MeterLegend(JFreeChart chart,
                   java.lang.String legendText)
Constructs a new legend.

Parameters:
chart - the chart.
legendText - the legend text.
Method Detail

getLegendText

public java.lang.String getLegendText()
Returns the legend text.

Returns:
the legend text.

setLegendText

public void setLegendText(java.lang.String text)
Sets the legend text.

Parameters:
text - the new legend text.

draw

public java.awt.geom.Rectangle2D draw(java.awt.Graphics2D g2,
                                      java.awt.geom.Rectangle2D available)
Draws the legend.

Overrides:
draw in class StandardLegend
Parameters:
g2 - the graphics device.
available - the available area.
Returns:
the remaining available drawing area.

draw

protected java.awt.geom.Rectangle2D draw(java.awt.Graphics2D g2,
                                         java.awt.geom.Rectangle2D available,
                                         boolean horizontal,
                                         boolean inverted)
Draws the legend.

Overrides:
draw in class StandardLegend
Parameters:
g2 - the graphics device.
available - the available drawing area.
horizontal - if true draw a horizontal legend.
inverted - ???
Returns:
the remaining available drawing area.