public final class SpenAlignmentParagraph extends SpenTextParagraphBase
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGN_BOTH
Align both type.
|
static int |
ALIGN_CENTER
Align center type.
|
static int |
ALIGN_LEFT
Align left type.
The default type. |
static int |
ALIGN_RIGHT
Align right type.
|
TYPE_ALIGN, TYPE_BULLET, TYPE_LINE_SPACING, TYPE_NONE| Constructor and Description |
|---|
SpenAlignmentParagraph()
Creates an SpenAlignmentParagraph instance.
|
SpenAlignmentParagraph(int startPosition,
int endPosition,
int align)
Creates an SpenAlignmentParagraph instance with the paragraph properties.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getAlignment()
Gets the alignment type
|
void |
setAlignment(int align)
Sets the alignment type.
|
getEnd, getStart, getType, setPositionpublic static final int ALIGN_LEFT
setAlignment(int),
getAlignment(),
Constant Field Valuespublic static final int ALIGN_RIGHT
setAlignment(int),
getAlignment(),
Constant Field Valuespublic static final int ALIGN_CENTER
setAlignment(int),
getAlignment(),
Constant Field Valuespublic static final int ALIGN_BOTH
setAlignment(int),
getAlignment(),
Constant Field Valuespublic SpenAlignmentParagraph()
public SpenAlignmentParagraph(int startPosition,
int endPosition,
int align)
startPosition - The start position of paragraph. The position should not be negative number. The negative number will be ignored.endPosition - The end position of paragraph. The position should not be negative number. The negative number will be ignored.align - The align type of paragraph.IndexOutOfBoundsException - If the endPosition is smaller than the startPosition.IllegalArgumentException - If the align is smaller than 0 or lager than 3public void setAlignment(int align)
align - The align type.IllegalArgumentException - If the align is smaller than 0 or lager than 3getAlignment(),
ALIGN_LEFT,
ALIGN_RIGHT,
ALIGN_BOTHpublic int getAlignment()
setAlignment(int),
ALIGN_LEFT,
ALIGN_RIGHT,
ALIGN_BOTH