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.Reaction
handle(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 ithandles
the event.boolean
hide(com.badlogic.gdx.scenes.scene2d.Event event, Popup popup)
boolean
show(com.badlogic.gdx.scenes.scene2d.Event event, Popup popup)
Methods inherited from class net.dermetfan.gdx.Multiplexer
add, clear, getReceivers, remove, setReceivers, setReceivers, size
Methods 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:
show
in 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:
hide
in 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 ithandles
the 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:
handle
in interfacePopup.Behavior
- Parameters:
event
- the Event to handlepopup
- the Popup this Behavior is attached to- Returns:
- the first Reaction or its
handling
version if any Behavior handles the event, or null
-