Class TextBox
java.lang.Object
org.jfree.chart.text.TextBox
- All Implemented Interfaces:
Serializable
A box containing a text block.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate PaintThe background paint.private RectangleInsetsThe interior space.private PaintThe outline paint.private StrokeThe outline stroke.private static final longFor serialization.private PaintThe shadow paint.private doubleThe shadow x-offset.private doubleThe shadow y-offset.private TextBlockThe text block. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(Graphics2D g2, float x, float y, RectangleAnchor anchor) Draws the text box.booleanTests this object for equality with an arbitrary object.Returns the background paint.doublegetHeight(Graphics2D g2) Returns the height of the text box.Returns the interior gap.Returns the outline paint.Returns the outline stroke.Returns the shadow paint.doubleReturns the x-offset for the shadow effect.doubleReturns the y-offset for the shadow effect.Returns the text block.inthashCode()Returns a hash code for this object.private voidreadObject(ObjectInputStream stream) Provides serialization support.voidsetBackgroundPaint(Paint paint) Sets the background paint.voidSets 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.private voidwriteObject(ObjectOutputStream stream) Provides serialization support.
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor serialization.- See Also:
-
outlinePaint
The outline paint. -
outlineStroke
The outline stroke. -
interiorGap
The interior space. -
backgroundPaint
The background paint. -
shadowPaint
The shadow paint. -
shadowXOffset
private double shadowXOffsetThe shadow x-offset. -
shadowYOffset
private double shadowYOffsetThe shadow y-offset. -
textBlock
The text block.
-
-
Constructor Details
-
TextBox
public TextBox()Creates an empty text box. -
TextBox
-
TextBox
-
-
Method Details
-
getOutlinePaint
-
setOutlinePaint
-
getOutlineStroke
-
setOutlineStroke
Sets the outline stroke.- Parameters:
stroke- the stroke.
-
getInteriorGap
-
setInteriorGap
-
getBackgroundPaint
-
setBackgroundPaint
Sets the background paint.- Parameters:
paint- the paint.
-
getShadowPaint
-
setShadowPaint
-
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
-
setTextBlock
-
draw
Draws the text box.- Parameters:
g2- the graphics device.x- the x-coordinate.y- the y-coordinate.anchor- the anchor point.
-
getHeight
Returns the height of the text box.- Parameters:
g2- the graphics device.- Returns:
- The height (in Java2D units).
-
equals
-
hashCode
-
writeObject
Provides serialization support.- Parameters:
stream- the output stream.- Throws:
IOException- if there is an I/O error.
-
readObject
Provides serialization support.- Parameters:
stream- the input stream.- Throws:
IOException- if there is an I/O error.ClassNotFoundException- if there is a classpath problem.
-