Class RootReferencing

java.lang.Object
space.maxus.flare.ui.compose.RootReferencing
All Implemented Interfaces:
Composable, ComposableLike

public abstract class RootReferencing extends Object implements Composable
An abstract class for component implementations that automatically handles root frame injection
  • Field Details

  • Constructor Details

    • RootReferencing

      public RootReferencing()
  • Method Details

    • root

      public Frame root()
      Description copied from interface: Composable
      Returns the frame this component belongs to
      Specified by:
      root in interface Composable
      Returns:
      The frame this component belongs to
    • injectRoot

      public void injectRoot(Frame root)
      Description copied from interface: Composable
      Injects frame into this component, the frame can then be retrieved from Composable.root()
      Specified by:
      injectRoot in interface Composable
      Parameters:
      root - Frame to be injected
    • inside

      @NotNull public @NotNull PackedComposable inside(@NotNull @NotNull ComposableSpace space)
      Description copied from interface: Composable
      Fits this composable inside the provided space, essentially returning a pair of this component and the space in the form of a PackedComposable.
      Specified by:
      inside in interface Composable
      Specified by:
      inside in interface ComposableLike
      Parameters:
      space - Space to fit inside
      Returns:
      A pair of this component and the space in the form of a PackedComposable
    • markDirty

      public void markDirty()
      Description copied from interface: Composable
      Marks this component dirty, meaning its area will be redrawn next tick.
      Specified by:
      markDirty in interface Composable