public final class SpenFontNameSpan 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 |
|---|
SpenFontNameSpan()
Creates an SpenFontNameSpan instance.
|
SpenFontNameSpan(int startPosition,
int endPosition,
int expansionType,
String name)
Creates an SpenFontNameSpan instance with the span properties.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getName()
Return the font name.
|
void |
setName(String name)
Sets the font name.
|
getEnd, getExpansion, getStart, getType, setExpansion, setPositionpublic SpenFontNameSpan()
public SpenFontNameSpan(int startPosition,
int endPosition,
int expansionType,
String name)
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.name - The font name.
If the name is invalid, the default font will be shown.IndexOutOfBoundsException - If the endPosition is smaller than the startPosition.
If the expansionType is negative or lager than the SpenTextSpanBase.SPAN_EXCLUSIVE_INCLUSIVE.public void setName(String name)
name - The font name.
If the name is invalid, the default font will be shown.getName()public String getName()
setName(String)