org.jfree.chart
Class MeterLegend

java.lang.Object
  extended byorg.jfree.chart.Legend
      extended byorg.jfree.chart.StandardLegend
          extended byorg.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_ITEM_FONT, DEFAULT_MARGIN, DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, DEFAULT_PADDING, 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(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, getItemFont, getItemPaint, getMargin, getOutlinePaint, getOutlineStroke, getPadding, getPreferredWidth, getRenderingOrder, getShapeScaleX, getShapeScaleY, getTitle, getTitleFont, setBackgroundPaint, setBoundingBoxArcHeight, setBoundingBoxArcWidth, setItemFont, setItemPaint, setMargin, setOutlinePaint, setOutlineStroke, setPadding, setPreferredWidth, setRenderingOrder, 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.
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.