Interface GuiStyleValue<T>
- Type Parameters:
T- resolved property type
- All Known Implementing Classes:
GuiStyleValue.Keyword, GuiStyleValue.Literal, GuiStyleValue.Token
public sealed interface GuiStyleValue<T>
permits GuiStyleValue.Literal<T>, GuiStyleValue.Keyword<T>, GuiStyleValue.Token<T>
A typed literal, live design token reference, or cascade-wide keyword.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA cascade-wide keyword.static enumCascade-wide keywords supported by the Java style model.static final recordA literal property value.static final recordA live token reference, resolved during the modern cascade. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic <T> GuiStyleValue<T> inherit()Uses the originating parent's computed value.static <T> GuiStyleValue<T> initial()Uses the property's initial value.static <T> GuiStyleValue<T> token(GuiStyleToken<T> token) References a live shared design token.static <T> GuiStyleValue<T> unset()Inherits an inheritable property and otherwise uses its initial value.static <T> GuiStyleValue<T> value(T value) Creates a literal declaration.
-
Method Details
-
token
References a live shared design token.- Type Parameters:
T- property type- Parameters:
token- shared value- Returns:
- token declaration
-
value
Creates a literal declaration.nullis a valid literal for nullable properties.- Type Parameters:
T- value type- Parameters:
value- literal value- Returns:
- literal declaration
-
initial
Uses the property's initial value.- Type Parameters:
T- value type- Returns:
- initial-value declaration
-
inherit
Uses the originating parent's computed value.- Type Parameters:
T- value type- Returns:
- inherited declaration
-
unset
Inherits an inheritable property and otherwise uses its initial value.- Type Parameters:
T- value type- Returns:
- unset declaration
-