Class Interaction

java.lang.Object
is.codion.tools.swing.robot.Interaction

public final class Interaction extends Object
The result of a verified keyboard interaction: what was requested, and what the JVM's key event stream shows actually happened. Observed via a KeyEventPostProcessor, so Interaction.Delivery reflects whether a component actually consumed the event.
  • Constructor Details

    • Interaction

      public Interaction(String keyStroke, Interaction.Delivery delivery, @Nullable String component, @Nullable String action)
      Parameters:
      keyStroke - the requested keystroke, or the typed text
      delivery - whether the interaction was observed and consumed
      component - the component that received the event, if observed
      action - the action the keystroke resolves to in the receiving component's input maps, null if none
  • Method Details

    • keyStroke

      public String keyStroke()
      Returns:
      the requested keystroke, or the typed text
    • delivery

      public Interaction.Delivery delivery()
      Returns:
      whether the interaction was observed and consumed
    • component

      public @Nullable String component()
      Returns:
      the component that received the event, if observed
    • action

      public @Nullable String action()
      Returns:
      the action the keystroke resolves to in the receiving component's input maps, null if none