Module technology.sola.engine
Class TextStyles.Builder<Self extends TextStyles.Builder<Self>>
java.lang.Object
technology.sola.engine.graphics.gui.style.BaseStyles.Builder<Self>
technology.sola.engine.graphics.gui.elements.TextStyles.Builder<Self>
- Type Parameters:
Self- this builder type
- Direct Known Subclasses:
TextInputStyles.Builder
- Enclosing class:
- TextStyles
public static class TextStyles.Builder<Self extends TextStyles.Builder<Self>>
extends BaseStyles.Builder<Self>
Builder class for
TextStyles.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a new styles instance based on the builder properties that were set.setFontAssetId(@Nullable String fontAssetId) Sets theTextStyles.fontAssetId().setTextAlignment(@Nullable TextStyles.TextAlignment textAlignment) Sets theTextStyles.textAlignment().setTextColor(@Nullable Color textColor) Sets theTextStyles.textColor().Methods inherited from class technology.sola.engine.graphics.gui.style.BaseStyles.Builder
setBackgroundColor, setBorderColor, setCrossAxisChildren, setDirection, setGap, setHeight, setHeight, setMainAxisChildren, setPadding, setPadding, setPaddingBottom, setPaddingHorizontal, setPaddingLeft, setPaddingRight, setPaddingTop, setPaddingVertical, setPositionX, setPositionY, setVisibility, setWidth, setWidth
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Description copied from class:BaseStyles.BuilderBuilds a new styles instance based on the builder properties that were set.- Overrides:
buildin classBaseStyles.Builder<Self extends TextStyles.Builder<Self>>- Returns:
- the new styles instance
-
setTextColor
Sets theTextStyles.textColor().- Parameters:
textColor- theColorof the text- Returns:
- this
-
setTextAlignment
Sets theTextStyles.textAlignment().- Parameters:
textAlignment- theTextStyles.TextAlignmentof the text- Returns:
- this
-
setFontAssetId
Sets theTextStyles.fontAssetId().- Parameters:
fontAssetId- the id of theFontasset- Returns:
- this
-