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
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 java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MeterLegend
public MeterLegend(JFreeChart chart,
java.lang.String legendText)
- Constructs a new legend.
- Parameters:
chart
- the chart.legendText
- the legend text.
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.