public static final class KeyTyped.Builder
extends java.lang.Object
KeyTyped
.
Builders are created by invoking KeyTyped.newBuilder(KeyCode)
. Each of the setter methods
modifies the state of the builder and returns the same instance. Builders are not thread-safe
and should not be used concurrently from multiple threads without external synchronization.
Modifier and Type | Method and Description |
---|---|
KeyTyped |
build()
Returns a new
KeyTyped instance built from the current state of this builder. |
KeyTyped.Builder |
keyChar(char keyChar)
Sets the key character corresponding to the typed key.
|
KeyTyped.Builder |
keyLocation(KeyLocation keyLocation)
Sets the location of the key on the keyboard.
|
KeyTyped.Builder |
keyModifiers(KeyModifiers keyModifiers)
Sets the keyboard modifiers applied.
|
public KeyTyped.Builder keyModifiers(KeyModifiers keyModifiers)
keyModifiers
- the keyboard modifierspublic KeyTyped.Builder keyLocation(KeyLocation keyLocation)
keyLocation
- the location of the key on the keyboard.public KeyTyped.Builder keyChar(char keyChar)
keyChar
- the key character