- java.lang.Object
-
- org.jfree.chart.text.TextBox
-
- All Implemented Interfaces:
Serializable
public class TextBox extends Object implements Serializable
A box containing a text block.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddraw(Graphics2D g2, float x, float y, RectangleAnchor anchor)Draws the text box.booleanequals(Object obj)Tests this object for equality with an arbitrary object.PaintgetBackgroundPaint()Returns the background paint.doublegetHeight(Graphics2D g2)Returns the height of the text box.RectangleInsetsgetInteriorGap()Returns the interior gap.PaintgetOutlinePaint()Returns the outline paint.StrokegetOutlineStroke()Returns the outline stroke.PaintgetShadowPaint()Returns the shadow paint.doublegetShadowXOffset()Returns the x-offset for the shadow effect.doublegetShadowYOffset()Returns the y-offset for the shadow effect.TextBlockgetTextBlock()Returns the text block.inthashCode()Returns a hash code for this object.voidsetBackgroundPaint(Paint paint)Sets the background paint.voidsetInteriorGap(RectangleInsets gap)Sets the interior gap.voidsetOutlinePaint(Paint paint)Sets the outline paint.voidsetOutlineStroke(Stroke stroke)Sets the outline stroke.voidsetShadowPaint(Paint paint)Sets the shadow paint.voidsetShadowXOffset(double offset)Sets the x-offset for the shadow effect.voidsetShadowYOffset(double offset)Sets the y-offset for the shadow effect.voidsetTextBlock(TextBlock block)Sets the text block.
-
-
-
Method Detail
-
getOutlinePaint
public Paint getOutlinePaint()
Returns the outline paint.- Returns:
- The outline paint.
-
setOutlinePaint
public void setOutlinePaint(Paint paint)
Sets the outline paint.- Parameters:
paint- the paint.
-
getOutlineStroke
public Stroke getOutlineStroke()
Returns the outline stroke.- Returns:
- The outline stroke.
-
setOutlineStroke
public void setOutlineStroke(Stroke stroke)
Sets the outline stroke.- Parameters:
stroke- the stroke.
-
getInteriorGap
public RectangleInsets getInteriorGap()
Returns the interior gap.- Returns:
- The interior gap.
-
setInteriorGap
public void setInteriorGap(RectangleInsets gap)
Sets the interior gap.- Parameters:
gap- the gap.
-
getBackgroundPaint
public Paint getBackgroundPaint()
Returns the background paint.- Returns:
- The background paint.
-
setBackgroundPaint
public void setBackgroundPaint(Paint paint)
Sets the background paint.- Parameters:
paint- the paint.
-
getShadowPaint
public Paint getShadowPaint()
Returns the shadow paint.- Returns:
- The shadow paint.
-
setShadowPaint
public void setShadowPaint(Paint paint)
Sets the shadow paint.- Parameters:
paint- the paint.
-
getShadowXOffset
public double getShadowXOffset()
Returns the x-offset for the shadow effect.- Returns:
- The offset.
-
setShadowXOffset
public void setShadowXOffset(double offset)
Sets the x-offset for the shadow effect.- Parameters:
offset- the offset (in Java2D units).
-
getShadowYOffset
public double getShadowYOffset()
Returns the y-offset for the shadow effect.- Returns:
- The offset.
-
setShadowYOffset
public void setShadowYOffset(double offset)
Sets the y-offset for the shadow effect.- Parameters:
offset- the offset (in Java2D units).
-
getTextBlock
public TextBlock getTextBlock()
Returns the text block.- Returns:
- The text block.
-
setTextBlock
public void setTextBlock(TextBlock block)
Sets the text block.- Parameters:
block- the block.
-
draw
public void draw(Graphics2D g2, float x, float y, RectangleAnchor anchor)
Draws the text box.- Parameters:
g2- the graphics device.x- the x-coordinate.y- the y-coordinate.anchor- the anchor point.
-
getHeight
public double getHeight(Graphics2D g2)
Returns the height of the text box.- Parameters:
g2- the graphics device.- Returns:
- The height (in Java2D units).
-
-