com.vaadin.flow.component.
Enum KeyLocation
- java.lang.Object
-
- java.lang.Enum<KeyLocation>
-
- com.vaadin.flow.component.KeyLocation
-
All Implemented Interfaces:
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
-
-
Method Summary
All Methods Modifier and Type Method Description int
getLocation()
Gets the key location integer value.
static KeyLocation
of(int location)
Returns the
KeyLocation
forlocation
.static KeyLocation
valueOf(String name)
Returns the enum constant of this type with the specified name.
static KeyLocation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
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 nameNullPointerException
- 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
forlocation
.Parameters:
location
- the location integer valueReturns:
the
KeyLocation
-
-