public final class StyleImpl extends BaseObject implements Style
Style.Style.Color, Style.SizeUnit, Style.TextAlignment| Constructor and Description |
|---|
StyleImpl() |
StyleImpl(boolean bold,
boolean italic,
boolean underline,
Integer fontSize,
Style.SizeUnit fontSizeUnit,
Style.TextAlignment alignment,
Style.Color backgroundColor,
Style.Color foregroundColor) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
decorateIdentity(List<Object> identifiers)
Subclasses should implement this method and add all fields to the list
that are to be included in equals(...) and hashCode() evaluation
|
Style.TextAlignment |
getAlignment()
Gets the text alignment, or null if text alignment is unspecified.
|
Style.Color |
getBackgroundColor()
Gets the background color, or null if the color is unspecified.
|
Integer |
getFontSize()
Gets the font size, or null if font size is unspecified.
|
Style.SizeUnit |
getFontSizeUnit()
Gets the unit of the font size.
|
Style.Color |
getForegroundColor()
Gets the foreground (text) color, or null if the color is unspecified.
|
boolean |
isBold()
Determines whether or not the value is written in bold text.
|
boolean |
isItalic()
Determines whether or not the value is written in italic text.
|
boolean |
isUnderline()
Determines whether or not the value is written with an underline
|
String |
toCSS()
Creates a Cascading Style Sheets (CSS) representation of this style.
|
String |
toString() |
classEquals, equals, hashCodepublic StyleImpl()
public StyleImpl(boolean bold,
boolean italic,
boolean underline,
Integer fontSize,
Style.SizeUnit fontSizeUnit,
Style.TextAlignment alignment,
Style.Color backgroundColor,
Style.Color foregroundColor)
public boolean isBold()
Stylepublic boolean isItalic()
Stylepublic boolean isUnderline()
StyleisUnderline in interface Stylepublic Integer getFontSize()
StylegetFontSize in interface StyleStyle.SizeUnitpublic Style.SizeUnit getFontSizeUnit()
StylegetFontSizeUnit in interface Stylepublic Style.TextAlignment getAlignment()
StylegetAlignment in interface Stylepublic Style.Color getForegroundColor()
StylegetForegroundColor in interface Stylepublic Style.Color getBackgroundColor()
StylegetBackgroundColor in interface Stylepublic String toCSS()
Stylepublic String toString()
toString in class BaseObjectprotected void decorateIdentity(List<Object> identifiers)
BaseObjectdecorateIdentity in class BaseObjectCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.