Enum Class PopupState.ClickMode

java.lang.Object
java.lang.Enum<PopupState.ClickMode>
com.simsilica.lemur.event.PopupState.ClickMode
All Implemented Interfaces:
Serializable, Comparable<PopupState.ClickMode>, Constable
Enclosing class:
PopupState

public static enum PopupState.ClickMode extends Enum<PopupState.ClickMode>
Controls the behavior for clicks outside the specified popup.
  • Enum Constant Details

    • Consume

      public static final PopupState.ClickMode Consume
      All clicks outside of the current popup will be consumed and ignored. Use this if the user must specifically close the popup in another way (for example error or warning popups).
    • Close

      public static final PopupState.ClickMode Close
      A click outside of the current popup will close the current popup and the event will otherwise propagate to whatever was below. This is useful for things like popup menus or popup selectors where a click outside should simply pass through to the real UI. In this case the 'modal' behavior is only to catch the outside click so that the popup can be closed.
    • ConsumeAndClose

      public static final PopupState.ClickMode ConsumeAndClose
      A click outside of the current popup will be consumed but will also close the popup. This could be used for certain types of message popups where clicking outside of the message should close the window but not activate underlying UI components. Especially if the 'blocker' geometry has been tinted in some way indicating that the underlying UI is unclickable.
    • Ignore

      public static final PopupState.ClickMode Ignore
      Mouse events outside of the popup are ignored, the popup is not closed, and the events are not consumed. Use this when several popups will be active at the same time.
  • Method Details

    • values

      public static PopupState.ClickMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PopupState.ClickMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null