Class MultiMask<T>
java.lang.Object
io.github.projectunified.craftux.mask.MultiMask<T>
- Type Parameters:
T
- the type of the child element
- Direct Known Subclasses:
AnimatedMask
,HybridMask
,ListMask
,MultiPositionMask
,OneTimeAnimatedMask
A base mask that handles multiple child elements
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<R extends T>
voidadd
(Collection<R> elements) Add child elementsfinal void
Add child elementsGet the child elementsvoid
init()
Initialize the element.protected boolean
Whether this mask requires child elementsvoid
stop()
Stop the element.
-
Field Details
-
elements
-
-
Constructor Details
-
MultiMask
public MultiMask()
-
-
Method Details
-
requireChildElements
protected boolean requireChildElements()Whether this mask requires child elements- Returns:
- true if it requires child elements
-
add
Add child elements- Type Parameters:
R
- the type of the child elements- Parameters:
elements
- the child elements
-
add
Add child elements- Parameters:
elements
- the child elements
-
getElements
Get the child elements- Returns:
- the child elements
-
init
public void init()Description copied from interface:Element
Initialize the element. Should be called before adding to the GUI. -
stop
public void stop()Description copied from interface:Element
Stop the element. Should be called after removing from the GUI.
-