public class TextBox extends Object implements Serializable
Constructor and Description |
---|
TextBox()
Creates an empty text box.
|
TextBox(String text)
Creates a text box.
|
TextBox(TextBlock block)
Creates a new text box.
|
Modifier and Type | Method and Description |
---|---|
void |
draw(Graphics2D g2,
float x,
float y,
RectangleAnchor anchor)
Draws the text box.
|
boolean |
equals(Object obj)
Tests this object for equality with an arbitrary object.
|
Paint |
getBackgroundPaint()
Returns the background paint.
|
double |
getHeight(Graphics2D g2)
Returns the height of the text box.
|
RectangleInsets |
getInteriorGap()
Returns the interior gap.
|
Paint |
getOutlinePaint()
Returns the outline paint.
|
Stroke |
getOutlineStroke()
Returns the outline stroke.
|
Paint |
getShadowPaint()
Returns the shadow paint.
|
double |
getShadowXOffset()
Returns the x-offset for the shadow effect.
|
double |
getShadowYOffset()
Returns the y-offset for the shadow effect.
|
TextBlock |
getTextBlock()
Returns the text block.
|
int |
hashCode()
Returns a hash code for this object.
|
void |
setBackgroundPaint(Paint paint)
Sets the background paint.
|
void |
setInteriorGap(RectangleInsets gap)
Sets the interior gap.
|
void |
setOutlinePaint(Paint paint)
Sets the outline paint.
|
void |
setOutlineStroke(Stroke stroke)
Sets the outline stroke.
|
void |
setShadowPaint(Paint paint)
Sets the shadow paint.
|
void |
setShadowXOffset(double offset)
Sets the x-offset for the shadow effect.
|
void |
setShadowYOffset(double offset)
Sets the y-offset for the shadow effect.
|
void |
setTextBlock(TextBlock block)
Sets the text block.
|
public TextBox()
public TextBox(String text)
text
- the text.public TextBox(TextBlock block)
block
- the text block.public Paint getOutlinePaint()
public void setOutlinePaint(Paint paint)
paint
- the paint.public Stroke getOutlineStroke()
public void setOutlineStroke(Stroke stroke)
stroke
- the stroke.public RectangleInsets getInteriorGap()
public void setInteriorGap(RectangleInsets gap)
gap
- the gap.public Paint getBackgroundPaint()
public void setBackgroundPaint(Paint paint)
paint
- the paint.public Paint getShadowPaint()
public void setShadowPaint(Paint paint)
paint
- the paint.public double getShadowXOffset()
public void setShadowXOffset(double offset)
offset
- the offset (in Java2D units).public double getShadowYOffset()
public void setShadowYOffset(double offset)
offset
- the offset (in Java2D units).public TextBlock getTextBlock()
public void setTextBlock(TextBlock block)
block
- the block.public void draw(Graphics2D g2, float x, float y, RectangleAnchor anchor)
g2
- the graphics device.x
- the x-coordinate.y
- the y-coordinate.anchor
- the anchor point.public double getHeight(Graphics2D g2)
g2
- the graphics device.public boolean equals(Object obj)
Copyright © 2001–2017 JFree.org. All rights reserved.