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 class
BaseStyles.Builder<Self extends BaseStyles.Builder<Self>>
Builder class forBaseStyles
. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
BaseStyles
(BaseStyles.Builder<?> builder) PopulatesBaseStyles
properties itsBaseStyles.Builder
. -
Method Summary
Modifier and TypeMethodDescription@Nullable Background
Describes how the background of theGuiElement
should render.@Nullable Border
border()
Describes how the border of theGuiElement
should render.static BaseStyles.Builder<?>
create()
Convenience method for creating a newBaseStyles.Builder
.@Nullable CrossAxisChildren
Defines how child elements will align on the cross axis (based on thedirection()
).@Nullable Direction
Defines theDirection
child elements flow.@Nullable Integer
gap()
Defines the space between each childGuiElement
of this element.@Nullable StyleValue
height()
Defines the preferred height of theGuiElement
.@Nullable MainAxisChildren
Defines 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 thisGuiElement
is positioned absolutely or relatively.@Nullable Visibility
Defines the visibility of theGuiElement
.@Nullable StyleValue
width()
Defines the preferred width of theGuiElement
.
-
Constructor Details
-
BaseStyles
PopulatesBaseStyles
properties itsBaseStyles.Builder
.- Parameters:
builder
- the builder to build styles from
-
-
Method Details
-
create
Convenience method for creating a newBaseStyles.Builder
.- Returns:
- a new builder instance
-
background
Describes how the background of theGuiElement
should render.- Returns:
- the
Background
-
border
Describes how the border of theGuiElement
should 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 childGuiElement
of this element.- Returns:
- the gap between child elements
-
direction
Defines theDirection
child 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 thisGuiElement
is 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
-