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, hashCode
public 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()
Style
public boolean isItalic()
Style
public boolean isUnderline()
Style
isUnderline
in interface Style
public Integer getFontSize()
Style
getFontSize
in interface Style
Style.SizeUnit
public Style.SizeUnit getFontSizeUnit()
Style
getFontSizeUnit
in interface Style
public Style.TextAlignment getAlignment()
Style
getAlignment
in interface Style
public Style.Color getForegroundColor()
Style
getForegroundColor
in interface Style
public Style.Color getBackgroundColor()
Style
getBackgroundColor
in interface Style
public String toCSS()
Style
public String toString()
toString
in class BaseObject
protected void decorateIdentity(List<Object> identifiers)
BaseObject
decorateIdentity
in class BaseObject
Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.