Companion
Functions
Matches a component whose accessible description equals description, read from its java.awt.Component.getAccessibleContext.
Matches a component whose accessible name equals name, read from its java.awt.Component.getAccessibleContext.
Matches a component whose accessible role equals role, read from its java.awt.Component.getAccessibleContext.
Matches a component with at least one direct child satisfying matcher.
Matches a component with at least one descendant, at any depth, satisfying matcher.
Matches a component with at least one sibling satisfying matcher. A sibling is any other child of the same parent.
Matches a component whose Component.getName equals name.
Matches a component whose parent satisfies matcher. A component with no parent never matches.
Matches a component tagged with tag via SwingModifier.testTag.
Matches a component whose textual content equals text, or contains it when substring is true. Text is read from javax.swing.JLabel.getText, AbstractButton.getText, or JTextComponent.getText depending on the component type. A password field carries no readable text and never matches.
Matches a component whose title equals title, read from Frame.getTitle, Dialog.getTitle or JInternalFrame.getTitle. Use it with ComposeSwingTest.onWindow to pick one window out of several, and with a node query to assert the title of a frame standing on a desktop.
Matches a component whose editable state equals editable, read from JTextComponent.isEditable for a text component and JComboBox.isEditable for a combo box. A component that carries no editable state never matches, in either direction; see isSelected for what that means for the negated form.
Matches a component whose enabled state equals enabled. A disabled component takes no user input and raises no events; components start out enabled.
Matches a component whose selected state equals selected, read from AbstractButton.isSelected - the state a check box, radio button, toggle button or checkable menu item carries. A component that carries no selected state never matches, in either direction, so isSelected(false) asserts "carries a selection and is off" while !isSelected() also admits a component that cannot be selected at all.