Package me.hsgamer.hscore.ui
Interface Holder<D extends Display>
- Type Parameters:
D- the type of the display
- All Superinterfaces:
Initializable,Updatable
- All Known Implementing Classes:
BaseHolder
The holder for all displays
-
Method Summary
Modifier and TypeMethodDescription<T> voidaddEventConsumer(Class<T> eventClass, Consumer<T> eventConsumer) Add an event consumervoidClear all event consumers of all eventsvoidclearEventConsumer(Class<?> eventClass) Clear all event consumerscreateDisplay(UUID uuid) Create a display with the unique idgetDisplay(UUID uuid) Get the display for the unique idvoidhandleEvent(Object event) Handle the eventvoidRemove all displaysvoidremoveDisplay(UUID uuid) Remove a display with the unique idMethods inherited from interface me.hsgamer.hscore.ui.property.Initializable
init, stop
-
Method Details
-
createDisplay
Create a display with the unique id- Parameters:
uuid- the unique id- Returns:
- the display
-
removeDisplay
Remove a display with the unique id- Parameters:
uuid- the unique id
-
getDisplay
Get the display for the unique id- Parameters:
uuid- the unique id- Returns:
- the display
-
addEventConsumer
Add an event consumer- Type Parameters:
T- the type of the event- Parameters:
eventClass- the event classeventConsumer- the event consumer
-
clearEventConsumer
Clear all event consumers- Parameters:
eventClass- the event class
-
clearAllEventConsumer
void clearAllEventConsumer()Clear all event consumers of all events -
removeAllDisplay
void removeAllDisplay()Remove all displays -
handleEvent
Handle the event- Parameters:
event- the event
-