public final class SpenLineSpacingParagraph extends SpenTextParagraphBase
| Modifier and Type | Field and Description |
|---|---|
static int |
TYPE_PERCENT
The percent type line spacing
|
static int |
TYPE_PIXEL
The pixel type line spacing
The default type. |
TYPE_ALIGN, TYPE_BULLET, TYPE_LINE_SPACING, TYPE_NONE| Constructor and Description |
|---|
SpenLineSpacingParagraph()
Creates an SpenLineSpacingParagraph instance with the paragraph properties.
|
SpenLineSpacingParagraph(int startPosition,
int endPosition,
int type,
float spacing)
Creates an SpenLineSpacingParagraph instance with the paragraph properties.
|
| Modifier and Type | Method and Description |
|---|---|
float |
getLineSpacing()
Gets the line spacing.
|
int |
getLineSpacingType()
Gets the line spacing type.
|
void |
setLineSpacing(float spacing)
Sets the line spacing.
|
void |
setLineSpacingType(int type)
Sets the line spacing type.
|
getEnd, getStart, getType, setPositionpublic static final int TYPE_PIXEL
setLineSpacingType(int),
getLineSpacingType(),
Constant Field Valuespublic static final int TYPE_PERCENT
setLineSpacingType(int),
getLineSpacingType(),
Constant Field Valuespublic SpenLineSpacingParagraph()
public SpenLineSpacingParagraph(int startPosition,
int endPosition,
int type,
float spacing)
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.type - The line spacing type of paragraph.spacing - The line spacing value.IndexOutOfBoundsException - If the endPosition is smaller than the startPosition. spacing is negative, if type is TYPE_PIXEL. spacing is negative or zero, if type is TYPE_PERCENT.IllegalArgumentException - If the type is not 0 or 1.public void setLineSpacingType(int type)
type - The line spacing type.IllegalArgumentException - If the type is not 0 or 1.getLineSpacingType(),
TYPE_PIXEL,
TYPE_PERCENTpublic int getLineSpacingType()
setLineSpacingType(int),
TYPE_PIXEL,
TYPE_PERCENTpublic void setLineSpacing(float spacing)
spacing - The line spacing.IndexOutOfBoundsException - If the spacing is negative if type is TYPE_PIXEL. spacing is negative or zero if type is TYPE_PERCENT. getLineSpacing()public float getLineSpacing()
setLineSpacing(float)