Class RenderObjectElement

java.lang.Object
com.ultikits.ultitools.abstracts.gui.declarative.core.Element
com.ultikits.ultitools.abstracts.gui.declarative.core.RenderObjectElement
Direct Known Subclasses:
ItemDisplayElement, TextButtonElement

public abstract class RenderObjectElement extends Element
RenderObjectElement is the Element that corresponds to a RenderNode.

This is a leaf node of the render tree, and ultimately produces a RenderNode.

Since:
6.2.0
Version:
1.0.0
Author:
UltiTools Team
  • Field Details

    • _renderNode

      @Nullable private @Nullable RenderNode _renderNode
  • Constructor Details

    • RenderObjectElement

      public RenderObjectElement(@NotNull @NotNull Widget widget)
  • Method Details

    • createRenderNode

      @NotNull protected abstract @NotNull RenderNode createRenderNode()
      Creates the RenderNode corresponding to this Element.
      Returns:
      the new RenderNode
    • updateRenderNode

      protected abstract void updateRenderNode(@NotNull @NotNull RenderNode renderNode)
      Updates the RenderNode.
      Parameters:
      renderNode - the RenderNode to update
    • getRenderNode

      @NotNull public @NotNull RenderNode getRenderNode()
      Gets the RenderNode, creating it first if it has not been created yet.
      Returns:
      the RenderNode
    • performRebuild

      public void performRebuild()
      Description copied from class: Element
      Performs a rebuild.

      Subclasses should implement this method to build or rebuild the Widget tree.

      Specified by:
      performRebuild in class Element
    • unmount

      public void unmount()
      Description copied from class: Element
      Removes this Element from the tree.

      Called when the Element is no longer needed. Subclasses should perform cleanup work here and unmount their child Elements.

      Overrides:
      unmount in class Element