Class KeyTyped.Builder

java.lang.Object
com.teamdev.jxbrowser.ui.event.KeyTyped.Builder
Enclosing interface:
KeyTyped

public static final class KeyTyped.Builder extends Object
A builder of 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.

  • Method Details

    • keyModifiers

      public KeyTyped.Builder keyModifiers(KeyModifiers keyModifiers)
      Sets the keyboard modifiers applied.
      Parameters:
      keyModifiers - the keyboard modifiers
      Returns:
      this builder
    • keyLocation

      public KeyTyped.Builder keyLocation(KeyLocation keyLocation)
      Sets the location of the key on the keyboard.
      Parameters:
      keyLocation - the location of the key on the keyboard.
      Returns:
      this builder
    • keyChar

      public KeyTyped.Builder keyChar(char keyChar)
      Sets the key character corresponding to the typed key.
      Parameters:
      keyChar - the key character
      Returns:
      this builder
    • build

      public KeyTyped build()
      Returns a new KeyTyped instance built from the current state of this builder.
      Returns:
      a new KeyTyped instance