## org.jfree.chart
Class MeterLegend

    java.lang.Object
      org.jfree.chart.Legend
          org.jfree.chart.StandardLegend
              org.jfree.chart.MeterLegend

All Implemented Interfaces:
  java.lang.Cloneable, java.io.Serializable

public class MeterLegend
extends StandardLegend

A legend for meter plots.

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, NO_PREFERRED_WIDTH`

Fields inherited from class org.jfree.chart.Legend
`EAST, EAST_NORTHEAST, EAST_SOUTHEAST, HORIZONTAL, INVERTED, NORTH, NORTH_NORTHEAST, NORTH_NORTHWEST, SOUTH, SOUTH_SOUTHEAST, SOUTH_SOUTHWEST, WEST, WEST_NORTHWEST, WEST_SOUTHWEST`

Constructor Summary
`MeterLegend()` The default constructor; sets an empty legend text.
`MeterLegend(JFreeChart chart, java.lang.String legendText)` Deprecated. use the default constructor instead and let JFreeChart manage the chart reference
`MeterLegend(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

`draw, draw, equals, getBackgroundPaint, getBoundingBoxArcHeight, getBoundingBoxArcWidth, getDisplaySeriesLines, getDisplaySeriesShapes, getInnerGap, getItemFont, getItemPaint, getOuterGap, getOutlinePaint, getOutlineShapes, getOutlineStroke, getPreferredWidth, getRenderingOrder, getShapeOutlinePaint, getShapeOutlineStroke, getShapeScaleX, getShapeScaleY, getTitle, getTitleFont, setBackgroundPaint, setBoundingBoxArcHeight, setBoundingBoxArcWidth, setDisplaySeriesLines, setDisplaySeriesShapes, setInnerGap, setItemFont, setItemPaint, setOuterGap, setOutlinePaint, setOutlineShapes, setOutlineStroke, setPreferredWidth, setRenderingOrder, setShapeOutlinePaint, setShapeOutlineStroke, setShapeScaleX, setShapeScaleY, setTitle, setTitleFont`

Methods inherited from class org.jfree.chart.Legend
`addChangeListener, clone, createInstance, getAnchor, getChart, isAnchoredToBottom, isAnchoredToCenter, isAnchoredToLeft, isAnchoredToMiddle, isAnchoredToRight, isAnchoredToTop, notifyListeners, registerChart, removeChangeListener, setAnchor`

Methods inherited from class java.lang.Object
`finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MeterLegend

    public MeterLegend()

  The default constructor; sets an empty legend text.

### MeterLegend

    public MeterLegend(java.lang.String legendText)

  Constructs a new legend.

Parameters:
  `legendText` - the legend text.

### MeterLegend

    public MeterLegend(JFreeChart chart,
                       java.lang.String legendText)

  Deprecated. use the default constructor instead and let JFreeChart manage the chart reference

  Creates a new legend.

Parameters:
  `chart` - the chart that the legend belongs to.
  `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.

  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.

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