java.lang.Object
technology.sola.engine.graphics.gui.style.BaseStyles
- Direct Known Subclasses:
TextStyles
BaseStyles contains properties that are common to all
GuiElement to use
as part of rendering.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBaseStyles.Builder<Self extends BaseStyles.Builder<Self>>Builder class forBaseStyles. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseStyles(BaseStyles.Builder<?> builder) PopulatesBaseStylesproperties itsBaseStyles.Builder. -
Method Summary
Modifier and TypeMethodDescription@Nullable BackgroundDescribes how the background of theGuiElementshould render.@Nullable Borderborder()Describes how the border of theGuiElementshould render.@Nullable CrossAxisChildrenDefines how child elements will align on the cross axis (based on thedirection()).@Nullable DirectionDefines theDirectionchild elements flow.@Nullable Integergap()Defines the space between each childGuiElementof this element.@Nullable StyleValueheight()Defines the preferred height of theGuiElement.@Nullable MainAxisChildrenDefines how child elements will align on the main axis (based on thedirection()).padding()Contains the padding values between the content and border of theGuiElement.position()Defines whether thisGuiElementis positioned absolutely or relatively.@Nullable VisibilityDefines the visibility of theGuiElement.@Nullable StyleValuewidth()Defines the preferred width of theGuiElement.
-
Constructor Details
-
BaseStyles
PopulatesBaseStylesproperties itsBaseStyles.Builder.- Parameters:
builder- the builder to build styles from
-
-
Method Details
-
background
Describes how the background of theGuiElementshould render.- Returns:
- the
Background
-
border
Describes how the border of theGuiElementshould render.- Returns:
- the
Border
-
padding
Contains the padding values between the content and border of theGuiElement.- Returns:
- the
Padding
-
width
Defines the preferred width of theGuiElement. This will cause it to not resize based on its children for its width.- Returns:
- the width of the element
-
height
Defines the preferred height of theGuiElement. This will cause it to not resize based on its children for its height.- Returns:
- the height of the element
-
gap
Defines the space between each childGuiElementof this element.- Returns:
- the gap between child elements
-
direction
Defines theDirectionchild elements flow.- Returns:
- the direction child elements flow
-
mainAxisChildren
Defines how child elements will align on the main axis (based on thedirection()).- Returns:
- the
MainAxisChildren
-
crossAxisChildren
Defines how child elements will align on the cross axis (based on thedirection()).- Returns:
- the
CrossAxisChildren
-
position
Defines whether thisGuiElementis positioned absolutely or relatively. Absolutely positioned elements are not considered part of the flow of its parent but instead position based on its parent'sGuiElement.getBounds().- Returns:
- the
Position
-
visibility
Defines the visibility of theGuiElement.- Returns:
- the
Visibility
-