SwingWindowInteractionCollection

A lazy handle to the set of realized windows matched by a window query. The match set is resolved against the current set of realized windows each time it is needed, so it reflects windows appearing and disappearing across recomposition.

All methods are intended to be called from a org.jetbrains.compose.swing.test.runComposeSwingTest body, which runs on the EDT.

Functions

Link copied to clipboard

Asserts that exactly expected realized windows match.

Link copied to clipboard
inline fun <T : Window> fetchAll(): List<T>

Resolves every matching window and returns them typed as T, in creation order. This is the last resort, for a call that requires the matched windows themselves or a subject that is the whole set. To read a value of one window, use SwingWindowInteraction.assertProperty or an assertion.

Link copied to clipboard
fun fetchSize(): Int

Returns the number of currently matching realized windows.