|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.jrefinery.chart.Legend
com.jrefinery.chart.StandardLegend
public class StandardLegend
A chart legend shows the names and visual representations of the series that are plotted in a chart.
| Field Summary | |
|---|---|
protected java.awt.Paint |
backgroundPaint
The color used to draw the background of the legend. |
static java.awt.Font |
DEFAULT_FONT
Default font. |
protected Spacer |
innerGap
The blank space inside the legend box. |
protected java.awt.Font |
itemFont
The font used to display the legend item names. |
protected java.awt.Paint |
itemPaint
The color used to display the legend item names. |
protected java.awt.Paint |
outlinePaint
The color used to draw the outline of the legend. |
protected java.awt.Stroke |
outlineStroke
The pen/brush used to draw the outline of the legend. |
| Fields inherited from class com.jrefinery.chart.Legend |
|---|
_anchor, chart, EAST, HORIZONTAL, INVERTED, listeners, NORTH, outerGap, SOUTH, WEST |
| Constructor Summary | |
|---|---|
StandardLegend(JFreeChart chart)
Constructs a new legend with default settings. |
|
StandardLegend(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)
Constructs a new legend. |
|
| Method Summary | |
|---|---|
java.awt.geom.Rectangle2D |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D available)
Draws the legend on a Java 2D graphics device (such as the screen or a printer). |
protected java.awt.geom.Rectangle2D |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D available,
boolean horizontal,
boolean inverted)
Draws the legend. |
java.awt.Paint |
getBackgroundPaint()
Returns the background color for the legend. |
java.awt.Font |
getItemFont()
Returns the series label font. |
java.awt.Paint |
getItemPaint()
Returns the series label color. |
java.awt.Paint |
getOutlinePaint()
Returns the outline color. |
java.awt.Stroke |
getOutlineStroke()
Returns the outline pen/brush. |
void |
setBackgroundPaint(java.awt.Paint paint)
Sets the background color of the legend. |
void |
setItemFont(java.awt.Font font)
Sets the series label font. |
void |
setItemPaint(java.awt.Paint paint)
Sets the series label color. |
void |
setOutlinePaint(java.awt.Paint paint)
Sets the outline color. |
void |
setOutlineStroke(java.awt.Stroke stroke)
Sets the outline pen/brush. |
| Methods inherited from class com.jrefinery.chart.Legend |
|---|
addChangeListener, createInstance, getAnchor, notifyListeners, removeChangeListener, setAnchor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.awt.Font DEFAULT_FONT
protected java.awt.Stroke outlineStroke
protected java.awt.Paint outlinePaint
protected java.awt.Paint backgroundPaint
protected Spacer innerGap
protected java.awt.Font itemFont
protected java.awt.Paint itemPaint
| Constructor Detail |
|---|
public StandardLegend(JFreeChart chart)
chart - The chart that the legend belongs to.
public StandardLegend(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)
chart - The chart that the legend belongs to.outerGap - The gap around the outside of the legend.innerGap - The gap inside the legend.backgroundPaint - The background color.outlineStroke - The pen/brush used to draw the outline.outlinePaint - The color used to draw the outline.seriesFont - The font used to draw the legend items.seriesPaint - The color used to draw the legend items.| Method Detail |
|---|
public java.awt.Paint getBackgroundPaint()
public void setBackgroundPaint(java.awt.Paint paint)
Registered listeners are notified that the legend has changed.
paint - The new background color.public java.awt.Stroke getOutlineStroke()
public void setOutlineStroke(java.awt.Stroke stroke)
Registered listeners are notified that the legend has changed.
stroke - The new outline pen/brush.public java.awt.Paint getOutlinePaint()
public void setOutlinePaint(java.awt.Paint paint)
Registered listeners are notified that the legend has changed.
stroke - The new outline color.public java.awt.Font getItemFont()
public void setItemFont(java.awt.Font font)
Registered listeners are notified that the legend has changed.
font - The new series label font.public java.awt.Paint getItemPaint()
public void setItemPaint(java.awt.Paint paint)
Registered listeners are notified that the legend has changed.
paint - The new series label color.
public java.awt.geom.Rectangle2D draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D available)
draw in class Legendg2 - The graphics device.available - The area within which the legend, and afterwards the plot, should be drawn.
protected java.awt.geom.Rectangle2D draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D available,
boolean horizontal,
boolean inverted)
graphics - The graphics device.available - The area available for drawing the chart.horizontal - A flag indicating whether the legend items are laid out horizontally.inverted - ???
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||