public static final class KeyPressed.Builder
extends java.lang.Object
KeyPressed.
Builders are created by invoking KeyPressed.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 |
|---|---|
KeyPressed |
build()
Returns a new
KeyPressed instance built from the current state of this builder. |
KeyPressed.Builder |
keyChar(char keyChar)
Sets the key character corresponding to the pressed key.
|
KeyPressed.Builder |
keyModifiers(KeyModifiers keyModifiers)
Sets the keyboard modifiers applied.
|
public KeyPressed.Builder keyModifiers(KeyModifiers keyModifiers)
keyModifiers - the keyboard modifierspublic KeyPressed.Builder keyChar(char keyChar)
keyChar - the key characterpublic KeyPressed build()
KeyPressed instance built from the current state of this builder.KeyPressed instance