Package de.bytestore.hostinger.entity
Enum Class KeySym
- All Implemented Interfaces:
io.jmix.core.metamodel.datatype.EnumClass<String>,Serializable,Comparable<KeySym>,Constable
public enum KeySym
extends Enum<KeySym>
implements io.jmix.core.metamodel.datatype.EnumClass<String>
The KeySym enum defines symbolic names for keyboard keys along with their
corresponding escape sequences and Java KeyEvent constants. It provides an
abstraction to map symbolic key identifiers to their respective KeyEvent
values or escape sequences, enabling easier handling of keyboard input
events in applications.
Characteristics:
- Each enum constant represents a specific key, including function keys,
control keys, and arrow keys.
- Encapsulates an escape sequence (used for identifying keys during
terminal interaction) and a KeyEvent constant (used in Java's AWT/Swing
for keyboard event representation).
Methods:
- getId: Returns the escape sequence associated with the key.
- getKeyEvent: Retrieves the KeyEvent constant for the key.
- fromId: Retrieves the associated KeySym enum value based on a given
escape sequence.
- fromKeyEvent: Retrieves the associated KeySym enum value based on a given
KeyEvent constant.
Usage Scenarios:
- Facilitates the mapping and recognition of input from both terminal-based
and graphical interface environments.
- Provides utilities to translate between escape sequences and KeyEvent
constants programmatically.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic KeySymstatic KeySymfromKeyEvent(int keyEvent) getId()intstatic KeySymReturns the enum constant of this class with the specified name.static KeySym[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
F1
-
F2
-
F3
-
F4
-
F5
-
F6
-
F7
-
F8
-
F9
-
F10
-
F11
-
F12
-
CTRL
-
ENTER
-
ESCAPE
-
ARROW_UP
-
ARROW_DOWN
-
ARROW_RIGHT
-
ARROW_LEFT
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getId
- Specified by:
getIdin interfaceio.jmix.core.metamodel.datatype.EnumClass<String>
-
getKeyEvent
public int getKeyEvent() -
fromId
-
fromKeyEvent
-