T - the type of container handled by this fixture.public abstract class ContainerFixture<T extends Container> extends ComponentFixture<T> implements ComponentContainerFixture
BACKGROUND_PROPERTY, FONT_PROPERTY, FOREGROUND_PROPERTY, robot, targetDEFAULT_DIALOG_LOOKUP_TIMEOUT| Constructor and Description |
|---|
ContainerFixture(Robot robot,
Class<? extends T> type)
Creates a new
. |
ContainerFixture(Robot robot,
String name,
Class<? extends T> type)
Creates a new
. |
ContainerFixture(Robot robot,
T target)
Creates a new
. |
| Modifier and Type | Method and Description |
|---|---|
JButtonFixture |
button()
|
JButtonFixture |
button(GenericTypeMatcher<? extends JButton> matcher)
|
JButtonFixture |
button(String name)
|
JCheckBoxFixture |
checkBox()
|
JCheckBoxFixture |
checkBox(GenericTypeMatcher<? extends JCheckBox> matcher)
|
JCheckBoxFixture |
checkBox(String name)
|
JComboBoxFixture |
comboBox()
|
JComboBoxFixture |
comboBox(GenericTypeMatcher<? extends JComboBox> matcher)
|
JComboBoxFixture |
comboBox(String name)
|
DialogFixture |
dialog()
Returns the only
currently available (if any.) This method uses the value defined in
as the default lookup timeout. |
DialogFixture |
dialog(GenericTypeMatcher<? extends Dialog> matcher)
Finds a
that matches the specified search criteria. |
DialogFixture |
dialog(GenericTypeMatcher<? extends Dialog> matcher,
Timeout timeout)
Finds a
that matches the specified search criteria. |
DialogFixture |
dialog(String name)
Finds a
with a name matching the specified one. |
DialogFixture |
dialog(String name,
Timeout timeout)
Finds a
with a name matching the specified one. |
DialogFixture |
dialog(Timeout timeout)
Returns the only
currently available (if any.) |
JFileChooserFixture |
fileChooser()
Returns the only
currently available (if any.) This method uses the value
defined in as the default lookup timeout. |
JFileChooserFixture |
fileChooser(GenericTypeMatcher<? extends JFileChooser> matcher)
Finds a
that matches the specified search criteria. |
JFileChooserFixture |
fileChooser(GenericTypeMatcher<? extends JFileChooser> matcher,
Timeout timeout)
Finds a
that matches the specified search criteria. |
JFileChooserFixture |
fileChooser(String name)
Finds a
with a name matching the specified one. |
JFileChooserFixture |
fileChooser(String name,
Timeout timeout)
Finds a
with a name matching the specified one. |
JFileChooserFixture |
fileChooser(Timeout timeout)
Returns the only
currently available (if any.) |
protected <C extends Component> |
find(GenericTypeMatcher<? extends C> matcher)
|
protected <C extends Component> |
findByName(String name,
Class<C> type)
Finds a component by name and type, contained in this fixture's
. |
protected <C extends Component> |
findByType(Class<C> type)
Finds a component by type, contained in this fixture's
. |
protected ComponentFinder |
finder()
Returns the
contained in this fixture's . |
JLabelFixture |
label()
|
JLabelFixture |
label(GenericTypeMatcher<? extends JLabel> matcher)
|
JLabelFixture |
label(String name)
|
JListFixture |
list()
|
JListFixture |
list(GenericTypeMatcher<? extends JList> matcher)
|
JListFixture |
list(String name)
|
JMenuItemFixture |
menuItem(GenericTypeMatcher<? extends JMenuItem> matcher)
|
JMenuItemFixture |
menuItem(String name)
|
JMenuItemFixture |
menuItemWithPath(String... path)
|
JOptionPaneFixture |
optionPane()
Returns the only
currently available (if any.) This method uses the value defined
in as the default lookup timeout. |
JOptionPaneFixture |
optionPane(Timeout timeout)
Returns the only
currently available (if any.) |
JPanelFixture |
panel()
|
JPanelFixture |
panel(GenericTypeMatcher<? extends JPanel> matcher)
|
JPanelFixture |
panel(String name)
|
JProgressBarFixture |
progressBar()
Returns a
found in this fixture's . |
JProgressBarFixture |
progressBar(GenericTypeMatcher<? extends JProgressBar> matcher)
Finds a
in this fixture's , that matches the
specified search criteria. |
JProgressBarFixture |
progressBar(String name)
Finds a
in this fixture's , which name matches
the specified one. |
JRadioButtonFixture |
radioButton()
Returns a
found in this fixture's . |
JRadioButtonFixture |
radioButton(GenericTypeMatcher<? extends JRadioButton> matcher)
Finds a
in this fixture's , that matches the
specified search criteria. |
JRadioButtonFixture |
radioButton(String name)
Finds a
in this fixture's , which name matches
the specified one. |
JScrollBarFixture |
scrollBar()
Returns a
found in this fixture's . |
JScrollBarFixture |
scrollBar(GenericTypeMatcher<? extends JScrollBar> matcher)
Finds a
in this fixture's , that matches the
specified search criteria. |
JScrollBarFixture |
scrollBar(String name)
Finds a
in this fixture's , which name matches the
specified one. |
JScrollPaneFixture |
scrollPane()
Returns a
found in this fixture's . |
JScrollPaneFixture |
scrollPane(GenericTypeMatcher<? extends JScrollPane> matcher)
Finds a
in this fixture's , that matches the
specified search criteria. |
JScrollPaneFixture |
scrollPane(String name)
Finds a
in this fixture's , which name matches the
specified one. |
JSliderFixture |
slider()
|
JSliderFixture |
slider(GenericTypeMatcher<? extends JSlider> matcher)
|
JSliderFixture |
slider(String name)
|
JSpinnerFixture |
spinner()
|
JSpinnerFixture |
spinner(GenericTypeMatcher<? extends JSpinner> matcher)
|
JSpinnerFixture |
spinner(String name)
|
JSplitPaneFixture |
splitPane()
Returns the
found in this fixture's . |
JSplitPaneFixture |
splitPane(GenericTypeMatcher<? extends JSplitPane> matcher)
Finds a
in this fixture's , that matches the
specified search criteria. |
JSplitPaneFixture |
splitPane(String name)
Finds a
in this fixture's , which name matches
the specified one. |
JTabbedPaneFixture |
tabbedPane()
Returns a
found in this fixture's . |
JTabbedPaneFixture |
tabbedPane(GenericTypeMatcher<? extends JTabbedPane> matcher)
Finds a
in this fixture's , that matches the
specified search criteria. |
JTabbedPaneFixture |
tabbedPane(String name)
Finds a
in this fixture's , which name matches
the specified one. |
JTableFixture |
table()
|
JTableFixture |
table(GenericTypeMatcher<? extends JTable> matcher)
|
JTableFixture |
table(String name)
|
JTextComponentFixture |
textBox()
Returns a
found in this fixture's . |
JTextComponentFixture |
textBox(GenericTypeMatcher<? extends JTextComponent> matcher)
Finds a
in this fixture's managed by this
fixture, that matches the specified search criteria. |
JTextComponentFixture |
textBox(String name)
Finds a
in this fixture's managed by this
fixture, which name matches the specified one. |
JToggleButtonFixture |
toggleButton()
Returns a
found in this fixture's . |
JToggleButtonFixture |
toggleButton(GenericTypeMatcher<? extends JToggleButton> matcher)
Finds a
in this fixture's , that matches the
specified search criteria. |
JToggleButtonFixture |
toggleButton(String name)
Finds a
in this fixture's , which name matches
the specified one. |
JToolBarFixture |
toolBar()
|
JToolBarFixture |
toolBar(GenericTypeMatcher<? extends JToolBar> matcher)
|
JToolBarFixture |
toolBar(String name)
|
JTreeFixture |
tree()
|
JTreeFixture |
tree(GenericTypeMatcher<? extends JTree> matcher)
|
JTreeFixture |
tree(String name)
|
<C extends Component,F extends ComponentFixture<C>> |
with(ComponentFixtureExtension<C,F> extension)
Returns a
managing a component inside this fixture's
. |
background, component, font, foreground, requireShowing, targetCastedTo, validateNotNullpublic ContainerFixture(Robot robot, Class<? extends T> type)
ContainerFixture.robot - performs simulation of user events on a Container.type - the type of the Container to find using the given Robot.NullPointerException - if robot is null.NullPointerException - if type is null.ComponentLookupException - if a matching component could not be found.ComponentLookupException - if more than one matching component is found.ComponentFinder.findByType(Class)public ContainerFixture(Robot robot, String name, Class<? extends T> type)
ContainerFixture.robot - performs simulation of user events on a Container.name - the name of the Container to find using the given Robot.type - the type of the Container to find using the given Robot.NullPointerException - if robot is null.NullPointerException - if type is null.ComponentLookupException - if a matching component could not be found.ComponentLookupException - if more than one matching component is found.ComponentFinder.findByName(String, Class)public ContainerFixture(Robot robot, T target)
ContainerFixture.robot - performs simulation of user events on the given Container.target - the Container to be.NullPointerException - if robot is null.NullPointerException - if target is null.public JButtonFixture button()
button in interface ComponentContainerFixtureJButton found.public JButtonFixture button(GenericTypeMatcher<? extends JButton> matcher)
button in interface ComponentContainerFixturematcher - contains the search criteria for finding a JButton.JButton found.public JButtonFixture button(String name)
button in interface ComponentContainerFixturename - the name to match.JButton found.public JCheckBoxFixture checkBox()
checkBox in interface ComponentContainerFixtureJCheckBox found.public JCheckBoxFixture checkBox(GenericTypeMatcher<? extends JCheckBox> matcher)
checkBox in interface ComponentContainerFixturematcher - contains the search criteria for finding a JCheckBox.JCheckBox found.public JCheckBoxFixture checkBox(String name)
checkBox in interface ComponentContainerFixturename - the name to match.JCheckBox found.public JComboBoxFixture comboBox()
comboBox in interface ComponentContainerFixtureJComboBox found.public JComboBoxFixture comboBox(GenericTypeMatcher<? extends JComboBox> matcher)
comboBox in interface ComponentContainerFixturematcher - contains the search criteria for finding a JComboBox.JComboBox found.public JComboBoxFixture comboBox(String name)
comboBox in interface ComponentContainerFixturename - the name to match.JComboBox found.public DialogFixture dialog()
Dialog currently available (if any.) This method uses the value defined in
ComponentContainerFixture.DEFAULT_DIALOG_LOOKUP_TIMEOUT as the default lookup timeout.dialog in interface ComponentContainerFixtureDialog found.ComponentContainerFixture.dialog(Timeout)public DialogFixture dialog(Timeout timeout)
Dialog currently available (if any.)dialog in interface ComponentContainerFixturetimeout - the amount of time to wait for a Dialog to be found.Dialog found.public DialogFixture dialog(GenericTypeMatcher<? extends Dialog> matcher)
Dialog that matches the specified search criteria. This method uses the value defined
in ComponentContainerFixture.DEFAULT_DIALOG_LOOKUP_TIMEOUT as the default lookup timeout.dialog in interface ComponentContainerFixturematcher - contains the search criteria for finding a Dialog.Dialog found.ComponentContainerFixture.dialog(GenericTypeMatcher, Timeout)public DialogFixture dialog(GenericTypeMatcher<? extends Dialog> matcher, Timeout timeout)
Dialog that matches the specified search criteria.dialog in interface ComponentContainerFixturematcher - contains the search criteria for finding a Dialog.timeout - the amount of time to wait for a Dialog to be found.Dialog found.public DialogFixture dialog(String name)
Dialog with a name matching the specified one. This method uses the value defined in
ComponentContainerFixture.DEFAULT_DIALOG_LOOKUP_TIMEOUT as the default lookup timeout.dialog in interface ComponentContainerFixturename - the name to match.Dialog found.ComponentContainerFixture.dialog(String, Timeout)public DialogFixture dialog(String name, Timeout timeout)
Dialog with a name matching the specified one.dialog in interface ComponentContainerFixturename - the name to match.timeout - the amount of time to wait for a Dialog to be found.Dialog found.public JFileChooserFixture fileChooser()
JFileChooser currently available (if any.) This method uses the value
defined in ComponentContainerFixture.DEFAULT_DIALOG_LOOKUP_TIMEOUT as the default lookup timeout.fileChooser in interface ComponentContainerFixtureJFileChooser found.ComponentContainerFixture.fileChooser(Timeout)public JFileChooserFixture fileChooser(Timeout timeout)
JFileChooser currently available (if any.)fileChooser in interface ComponentContainerFixturetimeout - the amount of time to wait for a JFileChooser to be found.JFileChooser found.public JFileChooserFixture fileChooser(GenericTypeMatcher<? extends JFileChooser> matcher)
JFileChooser that matches the specified search criteria. This method uses the value
defined in ComponentContainerFixture.DEFAULT_DIALOG_LOOKUP_TIMEOUT as the default lookup timeout.fileChooser in interface ComponentContainerFixturematcher - contains the search criteria for finding a JFileChooser.JFileChooser found.ComponentContainerFixture.fileChooser(GenericTypeMatcher, Timeout)public JFileChooserFixture fileChooser(GenericTypeMatcher<? extends JFileChooser> matcher, Timeout timeout)
JFileChooser that matches the specified search criteria.fileChooser in interface ComponentContainerFixturematcher - contains the search criteria for finding a JFileChooser.timeout - the amount of time to wait for a JFileChooser to be found.JFileChooser found.public JFileChooserFixture fileChooser(String name)
JFileChooser with a name matching the specified one. This method uses the value
defined in ComponentContainerFixture.DEFAULT_DIALOG_LOOKUP_TIMEOUT as the default lookup timeout.fileChooser in interface ComponentContainerFixturename - the name to match.JFileChooser found.ComponentContainerFixture.fileChooser(String, Timeout)public JFileChooserFixture fileChooser(String name, Timeout timeout)
JFileChooser with a name matching the specified one.fileChooser in interface ComponentContainerFixturename - the name to match.timeout - the amount of time to wait for a JFileChooser to be found.JFileChooser found.public JLabelFixture label()
label in interface ComponentContainerFixtureJLabel found.public JLabelFixture label(GenericTypeMatcher<? extends JLabel> matcher)
label in interface ComponentContainerFixturematcher - contains the search criteria for finding a JLabel.JLabel found.public JLabelFixture label(String name)
label in interface ComponentContainerFixturename - the name to match.JLabel found.public JListFixture list()
list in interface ComponentContainerFixtureJList found.public JListFixture list(GenericTypeMatcher<? extends JList> matcher)
list in interface ComponentContainerFixturematcher - contains the search criteria for finding a JList.JList found.public JListFixture list(String name)
list in interface ComponentContainerFixturename - the name to match.JList found.public JMenuItemFixture menuItemWithPath(String... path)
JMenuItem in this fixture's Container, which path matches
the given one.
For example, if we are looking for the menu with text "New" contained under the menu with text "File", we can simply call
JMenuItemFixture menuItem = container.menuItemWithPath("File", "Menu");
menuItemWithPath in interface ComponentContainerFixturepath - the path of the menu to find.JMenuItem found.public JMenuItemFixture menuItem(String name)
menuItem in interface ComponentContainerFixturename - the name to match.JMenuItem found.public JMenuItemFixture menuItem(GenericTypeMatcher<? extends JMenuItem> matcher)
JMenuItem, contained in this fixture's Container,
that matches the specified search criteria.menuItem in interface ComponentContainerFixturematcher - contains the search criteria for finding a JMenuItem.JMenuItem found.public JOptionPaneFixture optionPane()
JOptionPane currently available (if any.) This method uses the value defined
in ComponentContainerFixture.DEFAULT_DIALOG_LOOKUP_TIMEOUT as the default lookup timeout.optionPane in interface ComponentContainerFixtureJOptionPane found.ComponentContainerFixture.optionPane(Timeout)public JOptionPaneFixture optionPane(Timeout timeout)
JOptionPane currently available (if any.)optionPane in interface ComponentContainerFixturetimeout - the amount of time to wait for a JOptionPane to be found.JOptionPane found.public JPanelFixture panel()
panel in interface ComponentContainerFixtureJPanel found.public JPanelFixture panel(GenericTypeMatcher<? extends JPanel> matcher)
panel in interface ComponentContainerFixturematcher - contains the search criteria for finding a JPanel.JPanel found.public JPanelFixture panel(String name)
panel in interface ComponentContainerFixturename - the name to match.JPanel found.public JProgressBarFixture progressBar()
JProgressBar found in this fixture's Container.progressBar in interface ComponentContainerFixtureJProgressBar found.public JProgressBarFixture progressBar(GenericTypeMatcher<? extends JProgressBar> matcher)
JProgressBar in this fixture's Container, that matches the
specified search criteria.progressBar in interface ComponentContainerFixturematcher - contains the search criteria for finding a JProgressBar.JProgressBar found.public JProgressBarFixture progressBar(String name)
JProgressBar in this fixture's Container, which name matches
the specified one.progressBar in interface ComponentContainerFixturename - the name to match.JProgressBar found.public JRadioButtonFixture radioButton()
JRadioButton found in this fixture's Container.radioButton in interface ComponentContainerFixtureJRadioButton found.public JRadioButtonFixture radioButton(GenericTypeMatcher<? extends JRadioButton> matcher)
JRadioButton in this fixture's Container, that matches the
specified search criteria.radioButton in interface ComponentContainerFixturematcher - contains the search criteria for finding a JRadioButton.JRadioButton found.public JRadioButtonFixture radioButton(String name)
JRadioButton in this fixture's Container, which name matches
the specified one.radioButton in interface ComponentContainerFixturename - the name to match.JRadioButton found.public JScrollBarFixture scrollBar()
JScrollBar found in this fixture's Container.scrollBar in interface ComponentContainerFixtureJScrollBar found.public JScrollBarFixture scrollBar(GenericTypeMatcher<? extends JScrollBar> matcher)
JScrollBar in this fixture's Container, that matches the
specified search criteria.scrollBar in interface ComponentContainerFixturematcher - contains the search criteria for finding a JScrollBar.JScrollBar found.public JScrollBarFixture scrollBar(String name)
JScrollBar in this fixture's Container, which name matches the
specified one.scrollBar in interface ComponentContainerFixturename - the name to match.JScrollBar found.public JScrollPaneFixture scrollPane()
JScrollPane found in this fixture's Container.scrollPane in interface ComponentContainerFixtureJScrollPane found.public JScrollPaneFixture scrollPane(GenericTypeMatcher<? extends JScrollPane> matcher)
JScrollPane in this fixture's Container, that matches the
specified search criteria.scrollPane in interface ComponentContainerFixturematcher - contains the search criteria for finding a JScrollPane.JScrollPane found.public JScrollPaneFixture scrollPane(String name)
JScrollPane in this fixture's Container, which name matches the
specified one.scrollPane in interface ComponentContainerFixturename - the name to match.JScrollPane found.public JSliderFixture slider()
slider in interface ComponentContainerFixtureJSlider found.public JSliderFixture slider(GenericTypeMatcher<? extends JSlider> matcher)
slider in interface ComponentContainerFixturematcher - contains the search criteria for finding a JSlider.JSlider found.public JSliderFixture slider(String name)
slider in interface ComponentContainerFixturename - the name to match.JSlider found.public JSpinnerFixture spinner()
spinner in interface ComponentContainerFixtureJSpinner found.public JSpinnerFixture spinner(GenericTypeMatcher<? extends JSpinner> matcher)
spinner in interface ComponentContainerFixturematcher - contains the search criteria for finding a JSpinner.JSpinner found.public JSpinnerFixture spinner(String name)
spinner in interface ComponentContainerFixturename - the name to match.JSpinner found.public JSplitPaneFixture splitPane()
JSplitPane found in this fixture's Container.splitPane in interface ComponentContainerFixtureJSplitPane found.public JSplitPaneFixture splitPane(GenericTypeMatcher<? extends JSplitPane> matcher)
JSplitPane in this fixture's Container, that matches the
specified search criteria.splitPane in interface ComponentContainerFixturematcher - contains the search criteria for finding a JSplitPane.JSplitPane found.public JSplitPaneFixture splitPane(String name)
JSplitPane in this fixture's Container, which name matches
the specified one.splitPane in interface ComponentContainerFixturename - the name to match.JSplitPane found.public JTabbedPaneFixture tabbedPane()
JTabbedPane found in this fixture's Container.tabbedPane in interface ComponentContainerFixtureJTabbedPane found.public JTabbedPaneFixture tabbedPane(GenericTypeMatcher<? extends JTabbedPane> matcher)
JTabbedPane in this fixture's Container, that matches the
specified search criteria.tabbedPane in interface ComponentContainerFixturematcher - contains the search criteria for finding a JTabbedPane.JTabbedPane found.public JTabbedPaneFixture tabbedPane(String name)
JTabbedPane in this fixture's Container, which name matches
the specified one.tabbedPane in interface ComponentContainerFixturename - the name to match.JTabbedPane found.public JTableFixture table()
table in interface ComponentContainerFixtureJTable found.public JTableFixture table(GenericTypeMatcher<? extends JTable> matcher)
table in interface ComponentContainerFixturematcher - contains the search criteria for finding a JTable.JTable found.public JTableFixture table(String name)
table in interface ComponentContainerFixturename - the name to match.JTable found.public JTextComponentFixture textBox()
JTextComponent found in this fixture's Container.textBox in interface ComponentContainerFixtureJTextComponent found.public JTextComponentFixture textBox(GenericTypeMatcher<? extends JTextComponent> matcher)
JTextComponent in this fixture's Container managed by this
fixture, that matches the specified search criteria.textBox in interface ComponentContainerFixturematcher - contains the search criteria for finding a JTextComponent.JTextComponent found.public JTextComponentFixture textBox(String name)
JTextComponent in this fixture's Container managed by this
fixture, which name matches the specified one.textBox in interface ComponentContainerFixturename - the name to match.JTextComponent found.public JToggleButtonFixture toggleButton()
JToggleButton found in this fixture's Container.toggleButton in interface ComponentContainerFixtureJToggleButton found.public JToggleButtonFixture toggleButton(GenericTypeMatcher<? extends JToggleButton> matcher)
JToggleButton in this fixture's Container, that matches the
specified search criteria.toggleButton in interface ComponentContainerFixturematcher - contains the search criteria for finding a JToggleButton.JToggleButton found.public JToggleButtonFixture toggleButton(String name)
JToggleButton in this fixture's Container, which name matches
the specified one.toggleButton in interface ComponentContainerFixturename - the name to match.JToggleButton found.public JToolBarFixture toolBar()
toolBar in interface ComponentContainerFixtureJToolBar found.public JToolBarFixture toolBar(GenericTypeMatcher<? extends JToolBar> matcher)
toolBar in interface ComponentContainerFixturematcher - contains the search criteria for finding a JToolBar.JToolBar found.public JToolBarFixture toolBar(String name)
toolBar in interface ComponentContainerFixturename - the name to match.JToolBar found.public JTreeFixture tree()
tree in interface ComponentContainerFixtureJTree found.public JTreeFixture tree(GenericTypeMatcher<? extends JTree> matcher)
tree in interface ComponentContainerFixturematcher - contains the search criteria for finding a JTree.JTree found.public JTreeFixture tree(String name)
tree in interface ComponentContainerFixturename - the name to match.JTree found.protected final <C extends Component> C findByType(Class<C> type)
Container.C - the generic type of the component to find.type - the type of component to find.ComponentLookupException - if a matching component could not be found.ComponentLookupException - if more than one matching component is found.protected final <C extends Component> C findByName(String name, Class<C> type)
Container.C - the generic type of the component to find.name - the name of the component to find.type - the type of component to find.ComponentLookupException - if a matching component could not be found.ComponentLookupException - if more than one matching component is found.protected final <C extends Component> C find(GenericTypeMatcher<? extends C> matcher)
C - the generic type of component the given matcher can handle.matcher - the matcher to use to find the component.ComponentLookupException - if a matching component could not be found.ComponentLookupException - if more than one matching component is found.public <C extends Component,F extends ComponentFixture<C>> F with(ComponentFixtureExtension<C,F> extension)
ComponentFixture managing a component inside this fixture's
Container. This is an extension method, to allow implementations of
ContainerFixture handle custom GUI components.with in interface ComponentContainerFixtureC - the type of Component the fixture to return can handle.F - the type of ComponentFixture to return.extension - the ComponentFixtureExtension that creates the ComponentFixture to
return.ComponentFixture managing a component inside this fixture's Container.protected final ComponentFinder finder()
ComponentFinder contained in this fixture's Robot.ComponentFinder contained in this fixture's Robot.Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.