Interface GuiStyleValue<T>

Type Parameters:
T - resolved property type
All Known Implementing Classes:
GuiStyleValue.Keyword, GuiStyleValue.Literal

public sealed interface GuiStyleValue<T> permits GuiStyleValue.Literal<T>, GuiStyleValue.Keyword<T>
A typed declaration value or cascade-wide keyword.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    A cascade-wide keyword.
    static enum 
    Cascade-wide keywords supported by the Java style model.
    static final record 
    A literal property value.
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    static <T> GuiStyleValue<T>
    Uses the originating parent's computed value.
    static <T> GuiStyleValue<T>
    Uses the property's initial value.
    static <T> GuiStyleValue<T>
    Inherits an inheritable property and otherwise uses its initial value.
    static <T> GuiStyleValue<T>
    value(T value)
    Creates a literal declaration.
  • Method Details

    • value

      static <T> GuiStyleValue<T> value(T value)
      Creates a literal declaration. null is a valid literal for nullable properties.
      Type Parameters:
      T - value type
      Parameters:
      value - literal value
      Returns:
      literal declaration
    • initial

      static <T> GuiStyleValue<T> initial()
      Uses the property's initial value.
      Type Parameters:
      T - value type
      Returns:
      initial-value declaration
    • inherit

      static <T> GuiStyleValue<T> inherit()
      Uses the originating parent's computed value.
      Type Parameters:
      T - value type
      Returns:
      inherited declaration
    • unset

      static <T> GuiStyleValue<T> unset()
      Inherits an inheritable property and otherwise uses its initial value.
      Type Parameters:
      T - value type
      Returns:
      unset declaration