Package com.teamdev.jxbrowser.ui.event
Class KeyPressed.Builder
java.lang.Object
com.teamdev.jxbrowser.ui.event.KeyPressed.Builder
- Enclosing interface:
- KeyPressed
A builder of
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.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns a newKeyPressed
instance built from the current state of this builder.keyChar
(char keyChar) Sets the key character corresponding to the pressed key.keyLocation
(KeyLocation keyLocation) Sets the location of the key on the keyboard.keyModifiers
(KeyModifiers keyModifiers) Sets the keyboard modifiers applied.
-
Method Details
-
keyModifiers
Sets the keyboard modifiers applied.- Parameters:
keyModifiers
- the keyboard modifiers- Returns:
- this builder
-
keyLocation
Sets the location of the key on the keyboard.- Parameters:
keyLocation
- the location of the key on the keyboard.- Returns:
- this builder
-
keyChar
Sets the key character corresponding to the pressed key.- Parameters:
keyChar
- the key character- Returns:
- this builder
-
build
Returns a newKeyPressed
instance built from the current state of this builder.- Returns:
- a new
KeyPressed
instance
-