public class MultiLineString extends java.lang.Object implements java.lang.Cloneable, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static int |
CENTER |
static int |
LARGE |
static int |
LEFT |
static int |
NORMAL |
static int |
RIGHT |
static int |
SMALL |
Constructor and Description |
---|
MultiLineString()
Constructs an empty, centered, normal size multiline
string that is not underlined.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D r)
Draws this multiline string inside a given rectangle
|
java.awt.geom.Rectangle2D |
getBounds(java.awt.Graphics2D g2)
Gets the bounding rectangle for this multiline string.
|
int |
getJustification()
Gets the value of the justification property.
|
int |
getSize()
Gets the value of the size property.
|
java.lang.String |
getText()
Gets the value of the text property.
|
boolean |
isUnderlined()
Gets the value of the underlined property.
|
void |
setJustification(int newValue)
Sets the value of the justification property.
|
void |
setSize(int newValue)
Sets the value of the size property.
|
void |
setText(java.lang.String newValue)
Sets the value of the text property.
|
void |
setUnderlined(boolean newValue)
Sets the value of the underlined property.
|
java.lang.String |
toString() |
public static final int LEFT
public static final int CENTER
public static final int RIGHT
public static final int LARGE
public static final int NORMAL
public static final int SMALL
public MultiLineString()
public void setText(java.lang.String newValue)
newValue
- the text of the multiline stringpublic java.lang.String getText()
public void setJustification(int newValue)
newValue
- the justification, one of LEFT, CENTER,
RIGHTpublic int getJustification()
public boolean isUnderlined()
public void setUnderlined(boolean newValue)
newValue
- true to underline the textpublic void setSize(int newValue)
newValue
- the size, one of SMALL, NORMAL, LARGEpublic int getSize()
public java.lang.String toString()
toString
in class java.lang.Object
public java.awt.geom.Rectangle2D getBounds(java.awt.Graphics2D g2)
g2
- the graphics contextpublic void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D r)
g2
- the graphics contextr
- the rectangle into which to place this multiline stringpublic java.lang.Object clone()
clone
in class java.lang.Object