Class ListButton
java.lang.Object
me.hsgamer.hscore.minecraft.gui.button.impl.ListButton
- All Implemented Interfaces:
Button
,Initializable
The button with a list of child buttons
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T extends Button>
ListButtonaddButton
(@NotNull Collection<@NotNull T> buttons) Add button(s)Add button(s)Display the buttonGet the list of buttonsvoid
init()
Initialize some properties for the objectboolean
Should the button keep the current index for the unique id on everydisplay(UUID)
times?void
removeCurrentIndex
(UUID uuid) Remove the current index for the unique idsetKeepCurrentIndex
(boolean keepCurrentIndex) Should the button keep the current index for the unique id on everydisplay(UUID)
times?void
stop()
Stop the object
-
Constructor Details
-
ListButton
public ListButton()
-
-
Method Details
-
addButton
@Contract("_ -> this") public <T extends Button> ListButton addButton(@NotNull @NotNull Collection<@NotNull T> buttons) Add button(s)- Type Parameters:
T
- the type of the button- Parameters:
buttons
- the buttons- Returns:
- this instance
-
addButton
Add button(s)- Parameters:
button
- the button- Returns:
- this instance
-
isKeepCurrentIndex
public boolean isKeepCurrentIndex()Should the button keep the current index for the unique id on everydisplay(UUID)
times?- Returns:
- true if it should
-
setKeepCurrentIndex
Should the button keep the current index for the unique id on everydisplay(UUID)
times?- Parameters:
keepCurrentIndex
- true if it should- Returns:
- this instance
-
removeCurrentIndex
Remove the current index for the unique id- Parameters:
uuid
- the unique id
-
getButtons
Get the list of buttons- Returns:
- the buttons
-
init
public void init()Description copied from interface:Initializable
Initialize some properties for the object- Specified by:
init
in interfaceInitializable
-
stop
public void stop()Description copied from interface:Initializable
Stop the object- Specified by:
stop
in interfaceInitializable
-
display
Description copied from interface:Button
Display the button
-