Class TElementList
java.lang.Object
io.github.thecsdev.tcdcommons.api.client.gui.TElementList
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
final boolean
Adds aTElement
child to the list of__children
, and repositions the child based on theparent
's location.final boolean
final void
clear()
final void
clear
(boolean reposition) final boolean
final @Nullable TElement
final @Nullable TElement
final TParentElement
Returns theTParentElement
that owns thisTElementList
of children.Deprecated, for removal: This API element is subject to removal in a future version.iterator()
Returns anIterator
for iterating theTElementList
.final boolean
Removes aTElement
child from the list of__children
, and repositions the child based on theparent
's location.final boolean
final int
size()
final void
Iterates all of theTElement
children in the list, and updates thetopmostElements
.
Automatically called when removing a child.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
TElementList
-
-
Method Details
-
getParent
Returns theTParentElement
that owns thisTElementList
of children. -
getTopmostElements
@Deprecated(forRemoval=true, since="3") public final Tuple4<TElement,TElement, getTopmostElements()TElement, TElement> Deprecated, for removal: This API element is subject to removal in a future version.Returns thetopmostElements
for thisparent
element. -
iterator
Returns anIterator
for iterating theTElementList
. -
add
Adds aTElement
child to the list of__children
, and repositions the child based on theparent
's location.- Parameters:
child
- The child to add.- See Also:
-
add
-
add
public final boolean add(int index, TElement child, boolean reposition) throws IndexOutOfBoundsException - Throws:
IndexOutOfBoundsException
-
remove
Removes aTElement
child from the list of__children
, and repositions the child based on theparent
's location.- Parameters:
child
- The child to add.- See Also:
-
remove
-
clear
public final void clear() -
clear
public final void clear(boolean reposition) -
contains
-
size
public final int size() -
getFirstChild
-
getLastChild
-
updateTopmostChildren
public final void updateTopmostChildren()Iterates all of theTElement
children in the list, and updates thetopmostElements
.
Automatically called when removing a child.
-