public final class SpenFontSizeSpan extends SpenTextSpanBase
SPAN_EXCLUSIVE_EXCLUSIVE, SPAN_EXCLUSIVE_INCLUSIVE, SPAN_INCLUSIVE_EXCLUSIVE, SPAN_INCLUSIVE_INCLUSIVE, TYPE_BACKGROUND_COLOR, TYPE_BOLD, TYPE_FONT_NAME, TYPE_FONT_SIZE, TYPE_FOREGROUND_COLOR, TYPE_HYPER_TEXT, TYPE_ITALIC, TYPE_NONE, TYPE_UNDERLINE| Constructor and Description |
|---|
SpenFontSizeSpan()
Creates an SpenFontSizeSpan instance.
|
SpenFontSizeSpan(int startPosition,
int endPosition,
int expansionType,
float size)
Creates an SpenFontSizeSpan instance with the span properties.
|
| Modifier and Type | Method and Description |
|---|---|
float |
getSize()
Return the font size.
|
void |
setSize(float size)
Sets the font size.
|
getEnd, getExpansion, getStart, getType, setExpansion, setPositionpublic SpenFontSizeSpan()
public SpenFontSizeSpan(int startPosition,
int endPosition,
int expansionType,
float size)
startPosition - The start position of span. The position should not be negative number. The negative number will be ignored.endPosition - The end position of span. The position should not be negative number. The negative number will be ignored.expansionType - The expansion type of span.size - The font size.IndexOutOfBoundsException - If the endPosition is smaller than the startPosition.
If the expansionType is negative or lager than the SpenTextSpanBase.SPAN_EXCLUSIVE_INCLUSIVE.
If the size is negative.public void setSize(float size)
size - The font size.IndexOutOfBoundsException - If the size is negative.getSize()public float getSize()
setSize(float)