Class Popup.VisibilityBehavior

java.lang.Object
net.dermetfan.gdx.scenes.scene2d.ui.Popup.Behavior.Adapter
net.dermetfan.gdx.scenes.scene2d.ui.Popup.VisibilityBehavior
All Implemented Interfaces:
Popup.Behavior
Enclosing class:
Popup<T extends com.badlogic.gdx.scenes.scene2d.Actor>

public static class Popup.VisibilityBehavior
extends Popup.Behavior.Adapter
shows and hides the popup by settings its visibility
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.dermetfan.gdx.scenes.scene2d.ui.Popup.Behavior

    Popup.Behavior.Adapter
  • Constructor Summary

    Constructors
    Constructor Description
    VisibilityBehavior()  
  • Method Summary

    Modifier and Type Method Description
    boolean hide​(com.badlogic.gdx.scenes.scene2d.Event event, Popup popup)
    calls setVisible(false) on the Popup.popup
    boolean show​(com.badlogic.gdx.scenes.scene2d.Event event, Popup popup)
    calls setVisible(true) and toFront() on the Popup.popup

    Methods inherited from class net.dermetfan.gdx.scenes.scene2d.ui.Popup.Behavior.Adapter

    handle

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • VisibilityBehavior

      public VisibilityBehavior()
  • Method Details

    • show

      public boolean show​(com.badlogic.gdx.scenes.scene2d.Event event, Popup popup)
      calls setVisible(true) and toFront() on the Popup.popup
      Specified by:
      show in interface Popup.Behavior
      Overrides:
      show in class Popup.Behavior.Adapter
      Parameters:
      event - the Event to handle
      popup - the Popup this Behavior is attached to
      Returns:
      true
    • hide

      public boolean hide​(com.badlogic.gdx.scenes.scene2d.Event event, Popup popup)
      calls setVisible(false) on the Popup.popup
      Specified by:
      hide in interface Popup.Behavior
      Overrides:
      hide in class Popup.Behavior.Adapter
      Parameters:
      event - the Event to handle
      popup - the Popup this Behavior is attached to
      Returns:
      false