public class LegendGraphic extends AbstractBlock implements Block, org.jfree.util.PublicCloneable
Constructor and Description |
---|
LegendGraphic(Shape shape,
Paint fillPaint)
Creates a new legend graphic.
|
Modifier and Type | Method and Description |
---|---|
org.jfree.ui.Size2D |
arrange(Graphics2D g2,
RectangleConstraint constraint)
Arranges the contents of the block, within the given constraints, and
returns the block size.
|
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.
|
org.jfree.ui.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.
|
org.jfree.ui.RectangleAnchor |
getShapeAnchor()
Returns the shape anchor.
|
org.jfree.ui.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(org.jfree.ui.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(org.jfree.ui.RectangleAnchor anchor)
Sets the shape anchor.
|
void |
setShapeFilled(boolean filled)
Sets a flag that controls whether or not the shape is
filled.
|
void |
setShapeLocation(org.jfree.ui.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.
|
arrange, getBorder, getBounds, getContentXOffset, getContentYOffset, getFrame, getHeight, getID, getMargin, getPadding, getWidth, setBorder, setBorder, setBounds, setFrame, setHeight, setID, setMargin, setMargin, setPadding, setPadding, setWidth
public boolean isShapeVisible()
setShapeVisible(boolean)
public void setShapeVisible(boolean visible)
visible
- the flag.isShapeVisible()
public Shape getShape()
setShape(Shape)
public void setShape(Shape shape)
shape
- the shape.getShape()
public boolean isShapeFilled()
setShapeFilled(boolean)
public void setShapeFilled(boolean filled)
filled
- the flag.isShapeFilled()
public Paint getFillPaint()
setFillPaint(Paint)
public void setFillPaint(Paint paint)
paint
- the paint.getFillPaint()
public org.jfree.ui.GradientPaintTransformer getFillPaintTransformer()
GradientPaint
.null
).setFillPaintTransformer(GradientPaintTransformer)
public void setFillPaintTransformer(org.jfree.ui.GradientPaintTransformer transformer)
GradientPaint
.transformer
- the transformer (null
not permitted).getFillPaintTransformer()
public boolean isShapeOutlineVisible()
setShapeOutlineVisible(boolean)
public void setShapeOutlineVisible(boolean visible)
visible
- the flag.isShapeOutlineVisible()
public Paint getOutlinePaint()
setOutlinePaint(Paint)
public void setOutlinePaint(Paint paint)
paint
- the paint.getOutlinePaint()
public Stroke getOutlineStroke()
setOutlineStroke(Stroke)
public void setOutlineStroke(Stroke stroke)
stroke
- the stroke.getOutlineStroke()
public org.jfree.ui.RectangleAnchor getShapeAnchor()
getShapeAnchor()
public void setShapeAnchor(org.jfree.ui.RectangleAnchor anchor)
anchor
- the anchor (null
not permitted).setShapeAnchor(RectangleAnchor)
public org.jfree.ui.RectangleAnchor getShapeLocation()
setShapeLocation(RectangleAnchor)
public void setShapeLocation(org.jfree.ui.RectangleAnchor location)
location
- the location (null
not permitted).getShapeLocation()
public boolean isLineVisible()
setLineVisible(boolean)
public void setLineVisible(boolean visible)
visible
- the flag.isLineVisible()
public Shape getLine()
setLine(Shape)
public void setLine(Shape line)
line
- the line.getLine()
public Paint getLinePaint()
setLinePaint(Paint)
public void setLinePaint(Paint paint)
paint
- the paint.getLinePaint()
public Stroke getLineStroke()
setLineStroke(Stroke)
public void setLineStroke(Stroke stroke)
stroke
- the stroke.getLineStroke()
public org.jfree.ui.Size2D arrange(Graphics2D g2, RectangleConstraint constraint)
arrange
in interface Block
arrange
in class AbstractBlock
g2
- the graphics device.constraint
- the constraint (null
not permitted).null
).public void draw(Graphics2D g2, Rectangle2D area)
draw
in interface org.jfree.ui.Drawable
g2
- the graphics device.area
- the area.public Object draw(Graphics2D g2, Rectangle2D area, Object params)
public boolean equals(Object obj)
LegendGraphic
instance for equality with an
arbitrary object.equals
in class AbstractBlock
obj
- the object (null
permitted).public int hashCode()
public Object clone() throws CloneNotSupportedException
LegendGraphic
instance.clone
in interface org.jfree.util.PublicCloneable
clone
in class AbstractBlock
LegendGraphic
instance.CloneNotSupportedException
- if there is a problem cloning.Jas4pp 1.5 © Java Analysis Studio for Particle Physics