public class StyleSet extends Object
| Constructor and Description |
|---|
StyleSet()
Create a new style set with no properties set.
|
StyleSet(Style... styles)
Create a new style set with the given styles.
|
| Modifier and Type | Method and Description |
|---|---|
StyleSet |
clone() |
StyleSet |
extend(StyleSet style)
Create a new instance with styles inherited from this one but with new styles
from the given style set.
|
Boolean |
getBold()
Get whether this style set is bold.
|
Style |
getColor()
Get the color of the text.
|
Boolean |
getItalic()
Get whether this style set is italicized.
|
Boolean |
getStrikethrough()
Get whether this style set is stricken through.
|
Boolean |
getUnderline()
Get whether this style set is underlined.
|
boolean |
hasEqualFormatting(StyleSet other)
Return where the text formatting of the given style set is different from
that assigned to this one.
|
boolean |
hasFormatting()
Return whether text formatting (bold, italics, underline, strikethrough) is set.
|
boolean |
isBold()
Get whether the text is bold.
|
boolean |
isItalic()
Get whether the text is italicized.
|
boolean |
isStrikethrough()
Get whether the text is stricken through.
|
boolean |
isUnderline()
Get whether the text is underlined.
|
void |
setBold(Boolean bold)
Set whether the text is bold.
|
void |
setColor(Style color)
Set the color of the text.
|
void |
setItalic(Boolean italic)
Set whether the text is italicized.
|
void |
setStrikethrough(Boolean strikethrough)
Set whether the text is stricken through.
|
void |
setUnderline(Boolean underline)
Set whether the text is underline.
|
public StyleSet()
public StyleSet(Style... styles)
Style.RESET will be ignored if provided.
styles - a list of stylespublic Boolean getBold()
public boolean isBold()
public void setBold(Boolean bold)
bold - true, false, or null to unsetpublic Boolean getItalic()
public boolean isItalic()
public void setItalic(Boolean italic)
italic - false, or null to unsetpublic Boolean getUnderline()
public boolean isUnderline()
public void setUnderline(Boolean underline)
underline - false, or null to unsetpublic Boolean getStrikethrough()
public boolean isStrikethrough()
public void setStrikethrough(Boolean strikethrough)
strikethrough - false, or null to unsetpublic Style getColor()
public void setColor(Style color)
color - the colorpublic boolean hasFormatting()
public boolean hasEqualFormatting(StyleSet other)
other - the other style setpublic StyleSet extend(StyleSet style)
style - the style setCopyright © 2010-2014. All Rights Reserved.