Enum Interactable.Result

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Interactable.Result>
    Enclosing interface:
    Interactable

    public static enum Interactable.Result
    extends java.lang.Enum<Interactable.Result>
    Enum to represent the various results coming out of the handleKeyStroke method
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      HANDLED
      This component has handled the key-stroke and it should be considered consumed.
      MOVE_FOCUS_DOWN
      This component has handled the key-stroke and requests the GUI system to switch focus to next component in the general down direction.
      MOVE_FOCUS_LEFT
      This component has handled the key-stroke and requests the GUI system to switch focus to next component in the general left direction.
      MOVE_FOCUS_NEXT
      This component has handled the key-stroke and requests the GUI system to switch focus to next component in an ordered list of components.
      MOVE_FOCUS_PREVIOUS
      This component has handled the key-stroke and requests the GUI system to switch focus to previous component in an ordered list of components.
      MOVE_FOCUS_RIGHT
      This component has handled the key-stroke and requests the GUI system to switch focus to next component in the general right direction.
      MOVE_FOCUS_UP
      This component has handled the key-stroke and requests the GUI system to switch focus to next component in the general up direction.
      UNHANDLED
      This component didn't handle the key-stroke, either because it was not recognized or because it chose to ignore it.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Result()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Interactable.Result valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Interactable.Result[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • UNHANDLED

        public static final Interactable.Result UNHANDLED
        This component didn't handle the key-stroke, either because it was not recognized or because it chose to ignore it.
      • HANDLED

        public static final Interactable.Result HANDLED
        This component has handled the key-stroke and it should be considered consumed.
      • MOVE_FOCUS_NEXT

        public static final Interactable.Result MOVE_FOCUS_NEXT
        This component has handled the key-stroke and requests the GUI system to switch focus to next component in an ordered list of components. This should generally be returned if moving focus by using the tab key.
      • MOVE_FOCUS_PREVIOUS

        public static final Interactable.Result MOVE_FOCUS_PREVIOUS
        This component has handled the key-stroke and requests the GUI system to switch focus to previous component in an ordered list of components. This should generally be returned if moving focus by using the reverse tab key.
      • MOVE_FOCUS_LEFT

        public static final Interactable.Result MOVE_FOCUS_LEFT
        This component has handled the key-stroke and requests the GUI system to switch focus to next component in the general left direction. By convention in Lanterna, if there is no component to the left, it will move up instead. This should generally be returned if moving focus by using the left array key.
      • MOVE_FOCUS_RIGHT

        public static final Interactable.Result MOVE_FOCUS_RIGHT
        This component has handled the key-stroke and requests the GUI system to switch focus to next component in the general right direction. By convention in Lanterna, if there is no component to the right, it will move down instead. This should generally be returned if moving focus by using the right array key.
      • MOVE_FOCUS_UP

        public static final Interactable.Result MOVE_FOCUS_UP
        This component has handled the key-stroke and requests the GUI system to switch focus to next component in the general up direction. By convention in Lanterna, if there is no component above, it will move left instead. This should generally be returned if moving focus by using the up array key.
      • MOVE_FOCUS_DOWN

        public static final Interactable.Result MOVE_FOCUS_DOWN
        This component has handled the key-stroke and requests the GUI system to switch focus to next component in the general down direction. By convention in Lanterna, if there is no component below, it will move up instead. This should generally be returned if moving focus by using the down array key.
    • Constructor Detail

      • Result

        private Result()
    • Method Detail

      • values

        public static Interactable.Result[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Interactable.Result c : Interactable.Result.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Interactable.Result valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null