public final class SpenForegroundColorSpan 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 |
|---|
SpenForegroundColorSpan()
Creates an SpenForegroundColorSpan instance.
|
SpenForegroundColorSpan(int startPosition,
int endPosition,
int expansionType,
int color)
Creates an SpenForegroundColorSpan instance with the span properties.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getColor()
return the text color.
|
void |
setColor(int color)
Sets the text color.
|
getEnd, getExpansion, getStart, getType, setExpansion, setPositionpublic SpenForegroundColorSpan()
public SpenForegroundColorSpan(int startPosition,
int endPosition,
int expansionType,
int color)
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.color - The text color.IndexOutOfBoundsException - If the endPosition is smaller than the startPosition.
If the expansionType is negative or lager than the SpenTextSpanBase.SPAN_EXCLUSIVE_INCLUSIVE.public void setColor(int color)
color - The text color.getColor()public int getColor()
setColor(int)