org.jfree.chart.title
public class LegendGraphic extends AbstractBlock implements Block, PublicCloneable
Constructor Summary | |
---|---|
LegendGraphic(Shape shape, Paint fillPaint)
Creates a new legend graphic.
|
Method Summary | |
---|---|
Size2D | arrange(Graphics2D g2, RectangleConstraint constraint)
Arranges the contents of the block, within the given constraints, and
returns the block size.
|
protected Size2D | arrangeNN(Graphics2D g2)
Performs the layout with no constraint, so the content size is
determined by the bounds of the shape and/or line drawn to represent
the series.
|
Object | clone()
Returns a clone of this LegendGraphic instance.
|
void | draw(Graphics2D g2, Rectangle2D area)
Draws the graphic item within the specified area.
|
Object | draw(Graphics2D g2, Rectangle2D area, Object params)
Draws the block within the specified area.
|
boolean | equals(Object obj)
Tests this LegendGraphic instance for equality with an
arbitrary object.
|
Paint | getFillPaint()
Returns the paint used to fill the shape.
|
GradientPaintTransformer | getFillPaintTransformer()
Returns the transformer used when the fill paint is an instance of
GradientPaint .
|
Shape | getLine()
Returns the line centered about (0, 0).
|
Paint | getLinePaint()
Returns the line paint.
|
Stroke | getLineStroke()
Returns the line stroke.
|
Paint | getOutlinePaint()
Returns the outline paint.
|
Stroke | getOutlineStroke()
Returns the outline stroke.
|
Shape | getShape()
Returns the shape.
|
RectangleAnchor | getShapeAnchor()
Returns the shape anchor.
|
RectangleAnchor | getShapeLocation()
Returns the shape location.
|
int | hashCode()
Returns a hash code for this instance.
|
boolean | isLineVisible()
Returns the flag that controls whether or not the line is visible.
|
boolean | isShapeFilled()
Returns a flag that controls whether or not the shapes
are filled.
|
boolean | isShapeOutlineVisible()
Returns a flag that controls whether the shape outline is visible.
|
boolean | isShapeVisible()
Returns a flag that controls whether or not the shape
is visible.
|
void | setFillPaint(Paint paint)
Sets the paint used to fill the shape.
|
void | setFillPaintTransformer(GradientPaintTransformer transformer)
Sets the transformer used when the fill paint is an instance of
GradientPaint .
|
void | setLine(Shape line)
Sets the line. |
void | setLinePaint(Paint paint)
Sets the line paint.
|
void | setLineStroke(Stroke stroke)
Sets the line stroke.
|
void | setLineVisible(boolean visible)
Sets the flag that controls whether or not the line is visible.
|
void | setOutlinePaint(Paint paint)
Sets the outline paint.
|
void | setOutlineStroke(Stroke stroke)
Sets the outline stroke.
|
void | setShape(Shape shape)
Sets the shape.
|
void | setShapeAnchor(RectangleAnchor anchor)
Sets the shape anchor. |
void | setShapeFilled(boolean filled)
Sets a flag that controls whether or not the shape is
filled.
|
void | setShapeLocation(RectangleAnchor location)
Sets the shape location. |
void | setShapeOutlineVisible(boolean visible)
Sets a flag that controls whether or not the shape outline
is visible.
|
void | setShapeVisible(boolean visible)
Sets a flag that controls whether or not the shape is
visible.
|
Parameters: shape the shape (null
not permitted). fillPaint the fill paint (null
not permitted).
Parameters: g2 the graphics device. constraint the constraint (null
not permitted).
Returns: The block size (in Java2D units, never null
).
Parameters: g2 the graphics device.
Returns: The content size.
LegendGraphic
instance.
Returns: A clone of this LegendGraphic
instance.
Throws: CloneNotSupportedException if there is a problem cloning.
Parameters: g2 the graphics device. area the area.
Parameters: g2 the graphics device. area the area. params ignored (null
permitted).
Returns: Always null
.
LegendGraphic
instance for equality with an
arbitrary object.
Parameters: obj the object (null
permitted).
Returns: A boolean.
Returns: The fill paint.
See Also: setFillPaint
GradientPaint
.
Returns: The transformer (never null
).
Since: 1.0.4.
See Also: setFillPaintTransformer
Returns: The line.
See Also: setLine
Returns: The paint.
See Also: setLinePaint
Returns: The stroke.
See Also: setLineStroke
Returns: The paint.
See Also: setOutlinePaint
Returns: The stroke.
See Also: setOutlineStroke
Returns: The shape.
See Also: setShape
Returns: The shape anchor.
See Also: getShapeAnchor
Returns: The shape location.
See Also: setShapeLocation
Returns: A hash code.
Returns: A boolean.
See Also: LegendGraphic
Returns: A boolean.
See Also: LegendGraphic
Returns: A boolean.
See Also: LegendGraphic
Returns: A boolean.
See Also: LegendGraphic
Parameters: paint the paint.
See Also: getFillPaint
GradientPaint
.
Parameters: transformer the transformer (null
not permitted).
Since: 1.0.4
See Also: getFillPaintTransformer
Parameters: line the line.
See Also: getLine
Parameters: paint the paint.
See Also: getLinePaint
Parameters: stroke the stroke.
See Also: getLineStroke
Parameters: visible the flag.
See Also: isLineVisible
Parameters: paint the paint.
See Also: getOutlinePaint
Parameters: stroke the stroke.
See Also: getOutlineStroke
Parameters: shape the shape.
See Also: getShape
Parameters: anchor the anchor (null
not permitted).
See Also: setShapeAnchor
Parameters: filled the flag.
See Also: isShapeFilled
Parameters: location the location (null
not permitted).
See Also: getShapeLocation
Parameters: visible the flag.
See Also: isShapeOutlineVisible
Parameters: visible the flag.
See Also: isShapeVisible