Enum Keyboard.KeyLocation

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Keyboard.KeyLocation>
    Enclosing class:
    Keyboard

    public static enum Keyboard.KeyLocation
    extends java.lang.Enum<Keyboard.KeyLocation>
    Enumeration representing key locations.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      KEYPAD
      On the numeric keypad.
      LEFT
      On the left side of the keyboard.
      RIGHT
      On the right side of the keyboard.
      STANDARD
      The "standard" location; in the regular key location.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Keyboard.KeyLocation fromAWTLocation​(int awtKeyLocation)
      Translate the given native AWT key location constant into one of our values.
      static Keyboard.KeyLocation valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Keyboard.KeyLocation[] 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
    • Method Detail

      • values

        public static Keyboard.KeyLocation[] 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 (Keyboard.KeyLocation c : Keyboard.KeyLocation.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Keyboard.KeyLocation 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
      • fromAWTLocation

        public static Keyboard.KeyLocation fromAWTLocation​(int awtKeyLocation)
        Translate the given native AWT key location constant into one of our values.
        Parameters:
        awtKeyLocation - The native location.
        Returns:
        The corresponding one of our values.