performFocusGained

Delivers a focus-gained notification to the matched node and settles the composition.

The node processes a real FocusEvent of id FocusEvent.FOCUS_GAINED: its own processFocusEvent runs, and every registered java.awt.event.FocusListener is notified. That is what makes widget behavior driven by focus observable - a formatted text field reformats its value from processFocusEvent, not from a listener, so a test that fired the listeners itself would never see it.

This does not transfer focus: the node does not become the focus owner, and SwingNodeInteraction.assertIsFocusOwner still fails afterwards. Ownership is a windowing-system fact that needs a realized, focused window, which the harness root never has; the notification is delivered to the node regardless of that, which is precisely why focus-driven behavior can be tested off-screen.

A temporary notification is one the widget may treat as a focus change it should not act on.

Return

this interaction, for chaining a further gesture or assertion.

Parameters

temporary

marks the notification temporary; false by default, which is the permanent notification a widget treats as really having the focus.