Class TextStyleBuilder

Text Style Builder

A builder for text styles.

Methods

Method Return type Brief description
Text Style Creates a text style from this builder.
Text Style Builder Sets whether or not the text is bold.
Text Style Builder Sets the text font family, such as "Arial".
Text Style Builder Sets the text font size in points.
Text Style Builder Sets the text font color.
Text Style Builder Sets the text font color.
Text Style Builder Sets whether or not the text is italic.
Text Style Builder Sets whether or not the text has strikethrough.
Text Style Builder Sets whether or not the text is underlined.

Detailed documentation

build()

Creates a text style from this builder.

Return

Text Style — A text style created from this builder.


set Bold(bold)

Sets whether or not the text is bold.

Parameters

Name Type Description
bold
Boolean Whether or not the text is bold.

Return

Text Style Builder — The builder for chaining.


set Font Family(fontFamily)

Sets the text font family, such as "Arial".

Parameters

Name Type Description
font Family
String The desired font family.

Return

Text Style Builder — The builder for chaining.


set Font Size(fontSize)

Sets the text font size in points.

Parameters

Name Type Description
font Size
Integer The desired font size.

Return

Text Style Builder — The builder for chaining.


set Foreground Color(cssString)

Sets the text font color.

Parameters

Name Type Description
css String
String The desired font color in CSS notation (such as '#ffffff' or 'white' ).

Return

Text Style Builder — The builder for chaining.


set Foreground Color Object(color)

Sets the text font color.

Parameters

Name Type Description
color
Color The desired font color.

Return

Text Style Builder — The builder for chaining.


set Italic(italic)

Sets whether or not the text is italic.

Parameters

Name Type Description
italic
Boolean Whether or not the text is italic.

Return

Text Style Builder — The builder for chaining.


set Strikethrough(strikethrough)

Sets whether or not the text has strikethrough.

Parameters

Name Type Description
strikethrough
Boolean Whether or not the text has strikethrough.

Return

Text Style Builder — The builder for chaining.


set Underline(underline)

Sets whether or not the text is underlined.

Parameters

Name Type Description
underline
Boolean Whether or not the text is underlined.

Return

Text Style Builder — The builder for chaining.

Design a Mobile Site
View Site in Mobile | Classic
Share by: