com.jrefinery.chart
Class MeterLegend

java.lang.Object
  |
  +--com.jrefinery.chart.Legend
        |
        +--com.jrefinery.chart.StandardLegend
              |
              +--com.jrefinery.chart.MeterLegend

public class MeterLegend
extends StandardLegend

A legend for meter plots.

Author:
Hari

Fields inherited from class com.jrefinery.chart.StandardLegend
DEFAULT_FONT
 
Fields inherited from class com.jrefinery.chart.Legend
EAST, HORIZONTAL, INVERTED, NORTH, SOUTH, WEST
 
Constructor Summary
MeterLegend(JFreeChart chart, int outerGap, Spacer innerGap, java.awt.Paint backgroundPaint, java.awt.Stroke outlineStroke, java.awt.Paint outlinePaint, java.awt.Font itemFont, java.awt.Paint itemPaint, java.lang.String legendText)
          Constructs a new legend.
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 com.jrefinery.chart.StandardLegend
getBackgroundPaint, getItemFont, getItemPaint, getKeyBoxOutlinePaint, getKeyBoxOutlineStroke, getOutlinePaint, getOutlineStroke, setBackgroundPaint, setItemFont, setItemPaint, setKeyBoxOutlinePaint, setKeyBoxOutlineStroke, setOutlinePaint, setOutlineStroke
 
Methods inherited from class com.jrefinery.chart.Legend
addChangeListener, createInstance, getAnchor, getChart, getOuterGap, getOutlineKeyBoxes, notifyListeners, removeChangeListener, setAnchor, setOutlineKeyBoxes
 
Methods inherited from class java.lang.Object
clone, equals, 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.

MeterLegend

public MeterLegend(JFreeChart chart,
                   int outerGap,
                   Spacer innerGap,
                   java.awt.Paint backgroundPaint,
                   java.awt.Stroke outlineStroke,
                   java.awt.Paint outlinePaint,
                   java.awt.Font itemFont,
                   java.awt.Paint itemPaint,
                   java.lang.String legendText)
Constructs a new legend.
Parameters:
chart - the chart.
outerGap - the gap around the outside of the legend.
innerGap - the gaps inside the border of the legend.
backgroundPaint - the background color.
outlineStroke - the outline stroke.
outlinePaint - the outline paint.
itemFont - the font used for the legend items.
itemPaint - the color used for the legend items.
legendText - the text for the legend.
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.