Class TElementList

java.lang.Object
io.github.thecsdev.tcdcommons.api.client.gui.TElementList
All Implemented Interfaces:
Iterable<TElement>

public final class TElementList extends Object implements Iterable<TElement>
  • Constructor Details

  • Method Details

    • getParent

      public final TParentElement getParent()
      Returns the TParentElement that owns this TElementList of children.
    • getTopmostElements

      @Deprecated(forRemoval=true, since="3") public final Tuple4<TElement,TElement,TElement,TElement> getTopmostElements()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the topmostElements for this parent element.
    • iterator

      public final Iterator<TElement> iterator()
      Returns an Iterator for iterating the TElementList.
      Specified by:
      iterator in interface Iterable<TElement>
    • add

      public final boolean add(TElement child)
      Adds a TElement child to the list of __children, and repositions the child based on the parent's location.
      Parameters:
      child - The child to add.
      See Also:
    • add

      public final boolean add(TElement child, boolean reposition)
    • add

      public final boolean add(int index, TElement child, boolean reposition) throws IndexOutOfBoundsException
      Throws:
      IndexOutOfBoundsException
    • remove

      public final boolean remove(TElement child)
      Removes a TElement child from the list of __children, and repositions the child based on the parent's location.
      Parameters:
      child - The child to add.
      See Also:
    • remove

      public final boolean remove(TElement child, boolean reposition)
    • clear

      public final void clear()
    • clear

      public final void clear(boolean reposition)
    • contains

      public final boolean contains(TElement child)
    • size

      public final int size()
    • getFirstChild

      @Nullable public final @Nullable TElement getFirstChild()
    • getLastChild

      @Nullable public final @Nullable TElement getLastChild()
    • updateTopmostChildren

      public final void updateTopmostChildren()
      Iterates all of the TElement children in the list, and updates the topmostElements.

      Automatically called when removing a child.