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
Enclosing class:
Popup<T extends com.badlogic.gdx.scenes.scene2d.Actor>

public static class Popup.BehaviorMultiplexer
extends Multiplexer<Popup.Behavior>
implements Popup.Behavior
a Multiplexer for Behaviors
  • Constructor Details

    • BehaviorMultiplexer

      public BehaviorMultiplexer()
    • BehaviorMultiplexer

      public BehaviorMultiplexer​(int size)
    • BehaviorMultiplexer

      public BehaviorMultiplexer​(Popup.Behavior... receivers)
    • BehaviorMultiplexer

      public BehaviorMultiplexer​(com.badlogic.gdx.utils.Array<Popup.Behavior> receivers)
  • Method Details

    • show

      public boolean show​(com.badlogic.gdx.scenes.scene2d.Event event, Popup popup)
      Specified by:
      show in interface Popup.Behavior
      Parameters:
      event - the Event to handle
      popup - the Popup this Behavior is attached to
      Returns:
      whether any of the Behaviors handled the event
    • hide

      public boolean hide​(com.badlogic.gdx.scenes.scene2d.Event event, Popup popup)
      Specified by:
      hide in interface Popup.Behavior
      Parameters:
      event - the Event to handle
      popup - the Popup this Behavior is attached to
      Returns:
      whether any of the Behaviors handled the event
    • handle

      public Popup.Reaction handle​(com.badlogic.gdx.scenes.scene2d.Event event, Popup popup)
      Calls Popup.Behavior.handle(Event, Popup) on all Behaviors in order and returns the first returned non-null Reaction if it handles 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 interface Popup.Behavior
      Parameters:
      event - the Event to handle
      popup - the Popup this Behavior is attached to
      Returns:
      the first Reaction or its handling version if any Behavior handles the event, or null