hasAnyAncestor

Matches a component with at least one ancestor satisfying matcher. The whole parent chain is considered, so this scopes a query to a subtree: it keeps the components that sit anywhere below the container matcher describes.

onAllNodesOfType<JLabel>().filter(SwingMatcher.hasAnyAncestor(SwingMatcher.hasTestTag("editor")))

Return

a matcher whose description names this condition.

Parameters

matcher

applied to each ancestor in turn, nearest first.