PointerCaptureComponentTester


public final class PointerCaptureComponentTester


A test-only accessor for PointerCaptureComponent that enables direct manipulation and inspection of its internal state.

Summary

Public methods

boolean
equals(Object other)
int
final void

Simulates an input event from the runtime.

final void

Simulates a pointer capture state change event.

Public methods

equals

public boolean equals(Object other)

hashCode

public int hashCode()

triggerOnInputEvent

Added in 1.0.0-alpha16
public final void triggerOnInputEvent(@NonNull InputEvent event)

Simulates an input event from the runtime.

This triggers the inputListener passed to PointerCaptureComponent.create on the java.util.concurrent.Executor specified there.

Parameters
@NonNull InputEvent event

The input event that occurred.

triggerOnStateChanged

Added in 1.0.0-alpha16
public final void triggerOnStateChanged(
    @NonNull PointerCaptureComponent.PointerCaptureState newState
)

Simulates a pointer capture state change event.

This triggers the stateListener passed to PointerCaptureComponent.create on the java.util.concurrent.Executor specified there.