java.lang.Object
com.ultikits.ultitools.abstracts.gui.declarative.core.Widget
com.ultikits.ultitools.abstracts.gui.declarative.widgets.Container

public class Container extends Widget
Container is a widget that can hold multiple child Widgets.

It is responsible for:

  • managing the list of child Widgets
  • assigning slots to child Widgets

Usage example:


 Container.builder()
     .child(ItemDisplay.builder(item).build())
     .child(TextButton.builder().text("Click").build())
     .build();
 
Since:
6.2.0
Version:
1.0.0
Author:
UltiTools Team
  • Field Details

    • children

      @NotNull private final @NotNull List<Widget> children
  • Constructor Details

  • Method Details

    • builder

      @NotNull public static @NotNull Container.Builder builder()
      Creates a new Builder.
      Returns:
      the Builder
    • getChildren

      @NotNull public @NotNull List<Widget> getChildren()
    • createElement

      @NotNull public @NotNull Element createElement()
      Description copied from class: Widget
      Creates the Element corresponding to this Widget.

      This is a framework-internal method; subclasses should return the Element implementation appropriate to the Widget type.

      Specified by:
      createElement in class Widget
      Returns:
      the corresponding Element instance