You're viewing an older version of Vaadin JavaDoc. Please see version 24.7.0 for the latest.
com.vaadin.flow.component.

Enum KeyLocation

  • All Implemented Interfaces:

    Serializable, Comparable<KeyLocation>

    public enum KeyLocation
    extends Enum<KeyLocation>

    Possible keyboard key locations. The location attribute can be used to disambiguate between key values that can be generated by different physical keys on the keyboard, for example, the left and right Shift key.

    Since:

    1.0

    • Enum Constant Detail

      • STANDARD

        public static final KeyLocation STANDARD

        Standard key location.

      • LEFT

        public static final KeyLocation LEFT

        Left key location.

      • RIGHT

        public static final KeyLocation RIGHT

        Right key location.

      • NUMPAD

        public static final KeyLocation NUMPAD

        Numeric pad key location.

    • Method Detail

      • values

        public static 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 (KeyLocation c : 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 KeyLocation valueOf​(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:

        IllegalArgumentException - if this enum type has no constant with the specified name

        NullPointerException - if the argument is null

      • getLocation

        public int getLocation()

        Gets the key location integer value.

        Returns:

        the key location integer value

      • of

        public static KeyLocation of​(int location)

        Returns the KeyLocation for location.

        Parameters:

        location - the location integer value

        Returns:

        the KeyLocation