Package space.maxus.flare.ui.compose
Class RootReferencing
java.lang.Object
space.maxus.flare.ui.compose.RootReferencing
- All Implemented Interfaces:
Composable,ComposableLike
An abstract class for component implementations that automatically handles root frame injection
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinjectRoot(Frame root) Injects frame into this component, the frame can then be retrieved fromComposable.root()@NotNull PackedComposableinside(@NotNull ComposableSpace space) Fits this composable inside the provided space, essentially returning a pair of this component and the space in the form of aPackedComposable.voidMarks this component dirty, meaning its area will be redrawn next tick.root()Returns the frame this component belongs toMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface space.maxus.flare.ui.Composable
asComposable, bind, click, context, contextOrNull, destroy, drag, into, leftClick, renderAt, restore, rightClick, shiftFrom, shiftInto, viewer
-
Field Details
-
root
The root frame
-
-
Constructor Details
-
RootReferencing
public RootReferencing()
-
-
Method Details
-
root
Description copied from interface:ComposableReturns the frame this component belongs to- Specified by:
rootin interfaceComposable- Returns:
- The frame this component belongs to
-
injectRoot
Description copied from interface:ComposableInjects frame into this component, the frame can then be retrieved fromComposable.root()- Specified by:
injectRootin interfaceComposable- Parameters:
root- Frame to be injected
-
inside
Description copied from interface:ComposableFits this composable inside the provided space, essentially returning a pair of this component and the space in the form of aPackedComposable.- Specified by:
insidein interfaceComposable- Specified by:
insidein interfaceComposableLike- 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:ComposableMarks this component dirty, meaning its area will be redrawn next tick.- Specified by:
markDirtyin interfaceComposable
-