Class Popup.BehaviorMultiplexer
java.lang.Object
net.dermetfan.gdx.Multiplexer<Popup.Behavior>
net.dermetfan.gdx.scenes.scene2d.ui.Popup.BehaviorMultiplexer
- All Implemented Interfaces:
Popup.Behavior
public static class Popup.BehaviorMultiplexer extends Multiplexer<Popup.Behavior> implements Popup.Behavior
a Multiplexer for Behaviors
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.dermetfan.gdx.scenes.scene2d.ui.Popup.Behavior
Popup.Behavior.Adapter -
Field Summary
Fields inherited from class net.dermetfan.gdx.Multiplexer
receivers -
Constructor Summary
Constructors Constructor Description BehaviorMultiplexer()BehaviorMultiplexer(int size)BehaviorMultiplexer(com.badlogic.gdx.utils.Array<Popup.Behavior> receivers)BehaviorMultiplexer(Popup.Behavior... receivers) -
Method Summary
Modifier and Type Method Description Popup.Reactionhandle(com.badlogic.gdx.scenes.scene2d.Event event, Popup popup)CallsPopup.Behavior.handle(Event, Popup)on all Behaviors in order and returns the first returned non-null Reaction if ithandlesthe event.booleanhide(com.badlogic.gdx.scenes.scene2d.Event event, Popup popup)booleanshow(com.badlogic.gdx.scenes.scene2d.Event event, Popup popup)Methods inherited from class net.dermetfan.gdx.Multiplexer
add, clear, getReceivers, remove, setReceivers, setReceivers, sizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
BehaviorMultiplexer
public BehaviorMultiplexer() -
BehaviorMultiplexer
public BehaviorMultiplexer(int size) -
BehaviorMultiplexer
-
BehaviorMultiplexer
-
-
Method Details
-
show
- Specified by:
showin interfacePopup.Behavior- Parameters:
event- the Event to handlepopup- the Popup this Behavior is attached to- Returns:
- whether any of the Behaviors handled the event
-
hide
- Specified by:
hidein interfacePopup.Behavior- Parameters:
event- the Event to handlepopup- the Popup this Behavior is attached to- Returns:
- whether any of the Behaviors handled the event
-
handle
CallsPopup.Behavior.handle(Event, Popup)on all Behaviors in order and returns the first returned non-null Reaction if ithandlesthe event. If it does not handle the event but another Reaction does, the handling version of the Reaction is returned:non-handling handling Show ShowHandle Hide HideHandle None Handle - Specified by:
handlein interfacePopup.Behavior- Parameters:
event- the Event to handlepopup- the Popup this Behavior is attached to- Returns:
- the first Reaction or its
handlingversion if any Behavior handles the event, or null
-