AlignComponent

public final class AlignComponent extends GuiComponent(source)

Constructors

Link copied to clipboard

Properties

Link copied to clipboard
private final GuiComponent child
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
public Unit blur()

Unfocus this element only if this element is selected.

Link copied to clipboard
public T foldChildren<T extends Any>(T initial, BiFunction<GuiComponent, T, T> visitor)

Walk over the direct children of this element. A gui element that composites other gui elements should override this method. By default, the initial element is returned without change.

Link copied to clipboard
public final T foldRecursive<T extends Any>(T initial, @NotNull() @NotNull() BiFunction<@NotNull() GuiComponent, T, T> visitor)

Walk the scene tree of this gui element, including children of children. By default, the visitor is called with only this element.

Link copied to clipboard
public final GuiComponent getChild()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public Integer getHeight()

Get the requested y size for this element. This is opposed to the actual size given in the context. Giving this element less space than this may result in misaligned or overlapping rendering.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public Integer getWidth()

Get the requested x size for this element. This is opposed to the actual size given in the context. Giving this element less space than this may result in misaligned or overlapping rendering.

Link copied to clipboard
public Boolean isFocused()

Test if this element is focused.

Link copied to clipboard
public Boolean isInFocus()

Test if this element is focused, or has a focused child.

Link copied to clipboard

Called by the parent renderer.

Link copied to clipboard
public Boolean mouseEvent(MouseEvent mouseEvent, GuiImmediateContext context)

Called by the parent renderer.

Link copied to clipboard

This method is called by the gui context when an element gains focus. This does only get called if this element specifically is being focused.

Link copied to clipboard
public Unit onLostFocus()

This method is called by the gui context when an element loses focus. This does only get called if this element specifically was focused.

Link copied to clipboard
public Unit render(GuiImmediateContext context)

Called by the parent renderer. The GL matrix stack is pre-transformed, so rendering can begin at (0, 0) and should not render beyond what the context says is available.

Link copied to clipboard
public Unit requestFocus()

Call this method to request focus in the current gui context.

Link copied to clipboard
public Unit setContext(GuiContext context)
Link copied to clipboard
public Unit setFocus(Boolean shouldFocus)

Focuses or blurs this element depending on shouldFocus