Package com.storedobject.chart
Class TextStyle
java.lang.Object
com.storedobject.chart.TextStyle
- All Implemented Interfaces:
ComponentProperty
- Direct Known Subclasses:
AbstractLabel,TreeDataProvider.Label
As the name indicates, "text style" is for styling texts.
- Author:
- Syam
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidEncode the JSON string with the properties of this.getAlignment(boolean create) Get the alignment.final AbstractColorGet background color.final BordergetBorder(boolean create) Get the border.final AbstractColorgetColor()Get color.final FontGet font.final PaddinggetPadding(boolean create) Get the padding.getRichTextStyle(boolean create) Get theRichTextStyleinstance associated with this text style.final TextBordergetTextBorder(boolean create) Get the text border.voidsetAlignment(Alignment alignment) Set the alignment.voidsetBackground(AbstractColor background) Set background color.voidSet the border.voidsetColor(AbstractColor color) Set color.voidsetFontStyle(Font font) Set font.voidsetPadding(Padding padding) Set the padding.voidsetRichTextStyle(RichTextStyle richTextStyle) Set aRichTextStyleinstance that was created elsewhere.final voidsetTextBorder(TextBorder textBorder) Set the text border.
-
Constructor Details
-
TextStyle
public TextStyle()
-
-
Method Details
-
encodeJSON
Description copied from interface:ComponentPropertyEncode the JSON string with the properties of this.- Specified by:
encodeJSONin interfaceComponentProperty- Parameters:
sb- Encoded JSON string to be appended to this.
-
getColor
-
setColor
-
getBackground
-
setBackground
Set background color.- Parameters:
background- Background color.
-
getFontStyle
-
setFontStyle
-
getPadding
Get the padding.- Parameters:
create- Whether to create if not exists or not.- Returns:
- Padding.
-
setPadding
-
getBorder
Get the border.- Parameters:
create- Whether to create if not exists or not.- Returns:
- Border.
-
setBorder
-
getTextBorder
Get the text border.- Parameters:
create- Whether to create if not exists or not.- Returns:
- Text border.
-
setTextBorder
Set the text border.- Parameters:
textBorder- Text border.
-
getAlignment
Get the alignment.- Parameters:
create- Whether to create if not exists or not.- Returns:
- Alignment.
-
setAlignment
-
getRichTextStyle
Get theRichTextStyleinstance associated with this text style.- Parameters:
create- Whether to create if not exists or not.- Returns:
RichTextStyleif exists or created just now.
-
setRichTextStyle
Set aRichTextStyleinstance that was created elsewhere.- Parameters:
richTextStyle-RichTextStyleto set.
-