Package org.jfree.chart
Class MeterLegend
java.lang.Object
org.jfree.chart.Legend
org.jfree.chart.StandardLegend
org.jfree.chart.MeterLegend
- All Implemented Interfaces:
Serializable
,Cloneable
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, NORTH, NORTH_NORTHEAST, NORTH_NORTHWEST, SOUTH, SOUTH_SOUTHEAST, SOUTH_SOUTHWEST, WEST, WEST_NORTHWEST, WEST_SOUTHWEST
-
Constructor Summary
Constructors Constructor Description MeterLegend()
The default constructor; sets an empty legend text.MeterLegend(String legendText)
Constructs a new legend.MeterLegend(JFreeChart chart, String legendText)
Deprecated.use the default constructor instead and let JFreeChart manage the chart reference -
Method Summary
Modifier and Type Method Description Rectangle2D
draw(Graphics2D g2, Rectangle2D available)
Draws the legend.String
getLegendText()
Returns the legend text.void
setLegendText(String text)
Sets the legend text.Methods inherited from class org.jfree.chart.StandardLegend
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, createInstance, getAnchor, getChart, removeChangeListener, setAnchor
-
Constructor Details
-
MeterLegend
public MeterLegend()The default constructor; sets an empty legend text. -
MeterLegend
Constructs a new legend.- Parameters:
legendText
- the legend text.
-
MeterLegend
Deprecated.use the default constructor instead and let JFreeChart manage the chart referenceCreates a new legend.- Parameters:
chart
- the chart that the legend belongs to.legendText
- the legend text.
-
-
Method Details
-
getLegendText
Returns the legend text.- Returns:
- the legend text.
-
setLegendText
Sets the legend text.- Parameters:
text
- the new legend text.
-
draw
Draws the legend.- Parameters:
g2
- the graphics device.available
- the available area.- Returns:
- the remaining available drawing area.
-