org.fest.swing.fixture
Interface ComponentContainerFixture

All Known Implementing Classes:
ContainerFixture, DialogFixture, FrameFixture, JInternalFrameFixture, JOptionPaneFixture, JPanelFixture, JToolBarFixture, WindowFixture

public interface ComponentContainerFixture

Understands lookup of Components contained in a Container.

Author:
Alex Ruiz

Field Summary
static Timeout DEFAULT_DIALOG_LOOKUP_TIMEOUT
          The timeout to use when looking for a dialog.
 
Method Summary
 JButtonFixture button()
          Returns a JButton found in this fixture's Container.
 JButtonFixture button(GenericTypeMatcher<? extends JButton> matcher)
          Finds a JButton in this fixture's Container, that matches the specified search criteria.
 JButtonFixture button(String name)
          Finds a JButton in this fixture's Container, which name matches the specified one.
 JCheckBoxFixture checkBox()
          Returns a JCheckBox found in this fixture's Container.
 JCheckBoxFixture checkBox(GenericTypeMatcher<? extends JCheckBox> matcher)
          Finds a JCheckBox in this fixture's Container, that matches the specified search criteria.
 JCheckBoxFixture checkBox(String name)
          Finds a JCheckBox in this fixture's Container, which name matches the specified one.
 JComboBoxFixture comboBox()
          Returns a JComboBox found in this fixture's Container.
 JComboBoxFixture comboBox(GenericTypeMatcher<? extends JComboBox> matcher)
          Finds a JComboBox in this fixture's Container, that matches the specified search criteria.
 JComboBoxFixture comboBox(String name)
          Finds a JComboBox in this fixture's Container, which name matches the specified one.
 DialogFixture dialog()
          Returns the only Dialog currently available (if any.) This method uses the value defined in DEFAULT_DIALOG_LOOKUP_TIMEOUT as the default lookup timeout.
 DialogFixture dialog(GenericTypeMatcher<? extends Dialog> matcher)
          Finds a Dialog that matches the specified search criteria.
 DialogFixture dialog(GenericTypeMatcher<? extends Dialog> matcher, Timeout timeout)
          Finds a Dialog that matches the specified search criteria.
 DialogFixture dialog(String name)
          Finds a Dialog with a name matching the specified one.
 DialogFixture dialog(String name, Timeout timeout)
          Finds a Dialog with a name matching the specified one.
 DialogFixture dialog(Timeout timeout)
          Returns the only Dialog currently available (if any.)
 JFileChooserFixture fileChooser()
          Returns the only JFileChooser currently available (if any.) This method uses the value defined in DEFAULT_DIALOG_LOOKUP_TIMEOUT as the default lookup timeout.
 JFileChooserFixture fileChooser(GenericTypeMatcher<? extends JFileChooser> matcher)
          Finds a JFileChooser that matches the specified search criteria.
 JFileChooserFixture fileChooser(GenericTypeMatcher<? extends JFileChooser> matcher, Timeout timeout)
          Finds a JFileChooser that matches the specified search criteria.
 JFileChooserFixture fileChooser(String name)
          Finds a JFileChooser with a name matching the specified one.
 JFileChooserFixture fileChooser(String name, Timeout timeout)
          Finds a JFileChooser with a name matching the specified one.
 JFileChooserFixture fileChooser(Timeout timeout)
          Returns the only JFileChooser currently available (if any.)
 JLabelFixture label()
          Returns a JLabel found in this fixture's Container.
 JLabelFixture label(GenericTypeMatcher<? extends JLabel> matcher)
          Finds a JLabel in this fixture's Container, that matches the specified search criteria.
 JLabelFixture label(String name)
          Finds a JLabel in this fixture's Container, which name matches the specified one.
 JListFixture list()
          Returns a JList found in this fixture's Container.
 JListFixture list(GenericTypeMatcher<? extends JList> matcher)
          Finds a JList in this fixture's Container, that matches the specified search criteria.
 JListFixture list(String name)
          Finds a JList in this fixture's Container, which name matches the specified one.
 JMenuItemFixture menuItem(GenericTypeMatcher<? extends JMenuItem> matcher)
          Finds a JMenuItem, contained in this fixture's Container, that matches the specified search criteria.
 JMenuItemFixture menuItem(String name)
          Finds a JMenuItem, contained in this fixture's Container, which name matches the specified one.
 JMenuItemFixture menuItemWithPath(String... path)
          Finds a JMenuItem in this fixture's Container, which path matches the given one.
 JOptionPaneFixture optionPane()
          Returns the only JOptionPane currently available (if any.) This method uses the value defined in DEFAULT_DIALOG_LOOKUP_TIMEOUT as the default lookup timeout.
 JOptionPaneFixture optionPane(Timeout timeout)
          Returns the only JOptionPane currently available (if any.)
 JPanelFixture panel()
          Returns a JPanel found in this fixture's Container.
 JPanelFixture panel(GenericTypeMatcher<? extends JPanel> matcher)
          Finds a JPanel in this fixture's Container, that matches the specified search criteria.
 JPanelFixture panel(String name)
          Finds a JPanel in this fixture's Container, which name matches the specified one.
 JProgressBarFixture progressBar()
          Returns a JProgressBar found in this fixture's Container.
 JProgressBarFixture progressBar(GenericTypeMatcher<? extends JProgressBar> matcher)
          Finds a JProgressBar in this fixture's Container, that matches the specified search criteria.
 JProgressBarFixture progressBar(String name)
          Finds a JProgressBar in this fixture's Container, which name matches the specified one.
 JRadioButtonFixture radioButton()
          Returns a JRadioButton found in this fixture's Container.
 JRadioButtonFixture radioButton(GenericTypeMatcher<? extends JRadioButton> matcher)
          Finds a JRadioButton in this fixture's Container, that matches the specified search criteria.
 JRadioButtonFixture radioButton(String name)
          Finds a JRadioButton in this fixture's Container, which name matches the specified one.
 JScrollBarFixture scrollBar()
          Returns a JScrollBar found in this fixture's Container.
 JScrollBarFixture scrollBar(GenericTypeMatcher<? extends JScrollBar> matcher)
          Finds a JScrollBar in this fixture's Container, that matches the specified search criteria.
 JScrollBarFixture scrollBar(String name)
          Finds a JScrollBar in this fixture's Container, which name matches the specified one.
 JScrollPaneFixture scrollPane()
          Returns a JScrollPane found in this fixture's Container.
 JScrollPaneFixture scrollPane(GenericTypeMatcher<? extends JScrollPane> matcher)
          Finds a JScrollPane in this fixture's Container, that matches the specified search criteria.
 JScrollPaneFixture scrollPane(String name)
          Finds a JScrollPane in this fixture's Container, which name matches the specified one.
 JSliderFixture slider()
          Returns a JSlider found in this fixture's Container.
 JSliderFixture slider(GenericTypeMatcher<? extends JSlider> matcher)
          Finds a JSlider in this fixture's Container, that matches the specified search criteria.
 JSliderFixture slider(String name)
          Finds a JSlider in this fixture's Container, which name matches the specified one.
 JSpinnerFixture spinner()
          Returns a JSpinner found in this fixture's Container.
 JSpinnerFixture spinner(GenericTypeMatcher<? extends JSpinner> matcher)
          Finds a JSpinner in this fixture's Container, that matches the specified search criteria.
 JSpinnerFixture spinner(String name)
          Finds a JSpinner in this fixture's Container, which name matches the specified one.
 JSplitPaneFixture splitPane()
          Returns the JSplitPane found in this fixture's Container.
 JSplitPaneFixture splitPane(GenericTypeMatcher<? extends JSplitPane> matcher)
          Finds a JSplitPane in this fixture's Container, that matches the specified search criteria.
 JSplitPaneFixture splitPane(String name)
          Finds a JSplitPane in this fixture's Container, which name matches the specified one.
 JTabbedPaneFixture tabbedPane()
          Returns a JTabbedPane found in this fixture's Container.
 JTabbedPaneFixture tabbedPane(GenericTypeMatcher<? extends JTabbedPane> matcher)
          Finds a JTabbedPane in this fixture's Container, that matches the specified search criteria.
 JTabbedPaneFixture tabbedPane(String name)
          Finds a JTabbedPane in this fixture's Container, which name matches the specified one.
 JTableFixture table()
          Returns a JTable found in this fixture's Container.
 JTableFixture table(GenericTypeMatcher<? extends JTable> matcher)
          Finds a JTable in this fixture's Container, that matches the specified search criteria.
 JTableFixture table(String name)
          Finds a JTable in this fixture's Container, which name matches the specified one.
 JTextComponentFixture textBox()
          Returns a JTextComponent found in this fixture's Container.
 JTextComponentFixture textBox(GenericTypeMatcher<? extends JTextComponent> matcher)
          Finds a JTextComponent in this fixture's Container managed by this fixture, that matches the specified search criteria.
 JTextComponentFixture textBox(String name)
          Finds a JTextComponent in this fixture's Container managed by this fixture, which name matches the specified one.
 JToggleButtonFixture toggleButton()
          Returns a JToggleButton found in this fixture's Container.
 JToggleButtonFixture toggleButton(GenericTypeMatcher<? extends JToggleButton> matcher)
          Finds a JToggleButton in this fixture's Container, that matches the specified search criteria.
 JToggleButtonFixture toggleButton(String name)
          Finds a JToggleButton in this fixture's Container, which name matches the specified one.
 JToolBarFixture toolBar()
          Returns a JToolBar found in this fixture's Container.
 JToolBarFixture toolBar(GenericTypeMatcher<? extends JToolBar> matcher)
          Finds a JToolBar in this fixture's Container, that matches the specified search criteria.
 JToolBarFixture toolBar(String name)
          Finds a JToolBar in this fixture's Container, which name matches the specified one.
 JTreeFixture tree()
          Returns a JTree found in this fixture's Container.
 JTreeFixture tree(GenericTypeMatcher<? extends JTree> matcher)
          Finds a JTree in this fixture's Container, that matches the specified search criteria.
 JTreeFixture tree(String name)
          Finds a JTree in this fixture's Container, which name matches the specified one.
<C extends Component,F extends ComponentFixture<C>>
F
with(ComponentFixtureExtension<C,F> extension)
          Returns a ComponentFixture managing a component inside this fixture's Container.
 

Field Detail

DEFAULT_DIALOG_LOOKUP_TIMEOUT

static final Timeout DEFAULT_DIALOG_LOOKUP_TIMEOUT
The timeout to use when looking for a dialog. It's value is 100 ms.

Method Detail

button

JButtonFixture button()
Returns a JButton found in this fixture's Container.

Returns:
a fixture that manages the JButton found.
Throws:
ComponentLookupException - if a JButton could not be found.
ComponentLookupException - if more than one JButton is found.

button

JButtonFixture button(GenericTypeMatcher<? extends JButton> matcher)
Finds a JButton in this fixture's Container, that matches the specified search criteria.

Parameters:
matcher - contains the search criteria for finding a JButton.
Returns:
a fixture that manages the JButton found.
Throws:
ComponentLookupException - if a JButton that matches the given search criteria could not be found.
ComponentLookupException - if more than one JButton that matches the given search criteria is found.

button

JButtonFixture button(String name)
Finds a JButton in this fixture's Container, which name matches the specified one.

Parameters:
name - the name to match.
Returns:
a fixture that manages the JButton found.
Throws:
ComponentLookupException - if a JButton having a matching name could not be found.
ComponentLookupException - if more than one JButton having a matching name is found.

checkBox

JCheckBoxFixture checkBox()
Returns a JCheckBox found in this fixture's Container.

Returns:
a fixture that manages the JCheckBox found.
Throws:
ComponentLookupException - if a JCheckBox could not be found.
ComponentLookupException - if more than one JCheckBox is found.

checkBox

JCheckBoxFixture checkBox(GenericTypeMatcher<? extends JCheckBox> matcher)
Finds a JCheckBox in this fixture's Container, that matches the specified search criteria.

Parameters:
matcher - contains the search criteria for finding a JCheckBox.
Returns:
a fixture that manages the JCheckBox found.
Throws:
ComponentLookupException - if a JCheckBox that matches the given search criteria could not be found.
ComponentLookupException - if more than one JCheckBox that matches the given search criteria is found.

checkBox

JCheckBoxFixture checkBox(String name)
Finds a JCheckBox in this fixture's Container, which name matches the specified one.

Parameters:
name - the name to match.
Returns:
a fixture that manages the JCheckBox found.
Throws:
ComponentLookupException - if a JCheckBox having a matching name could not be found.

comboBox

JComboBoxFixture comboBox()
Returns a JComboBox found in this fixture's Container.

Returns:
a fixture that manages the JComboBox found.
Throws:
ComponentLookupException - if a JComboBox could not be found.
ComponentLookupException - if more than one JComboBox is found.

comboBox

JComboBoxFixture comboBox(GenericTypeMatcher<? extends JComboBox> matcher)
Finds a JComboBox in this fixture's Container, that matches the specified search criteria.

Parameters:
matcher - contains the search criteria for finding a JComboBox.
Returns:
a fixture that manages the JComboBox found.
Throws:
ComponentLookupException - if a JComboBox that matches the given search criteria could not be found.
ComponentLookupException - if more than one JComboBox that matches the given search criteria is found.

comboBox

JComboBoxFixture comboBox(String name)
Finds a JComboBox in this fixture's Container, which name matches the specified one.

Parameters:
name - the name to match.
Returns:
a fixture that manages the JComboBox found.
Throws:
ComponentLookupException - if a JComboBox having a matching name could not be found.
ComponentLookupException - if more than one JComboBox having a matching name is found.

dialog

DialogFixture dialog()
Returns the only Dialog currently available (if any.) This method uses the value defined in DEFAULT_DIALOG_LOOKUP_TIMEOUT as the default lookup timeout.

Returns:
a fixture that manages the Dialog found.
Throws:
WaitTimedOutError - if a Dialog could not be found.
See Also:
dialog(Timeout)

dialog

DialogFixture dialog(Timeout timeout)
Returns the only Dialog currently available (if any.)

Parameters:
timeout - the amount of time to wait for a Dialog to be found.
Returns:
a fixture that manages the Dialog found.
Throws:
WaitTimedOutError - if a Dialog could not be found.
Since:
1.2

dialog

DialogFixture dialog(GenericTypeMatcher<? extends Dialog> matcher)
Finds a Dialog that matches the specified search criteria. This method uses the value defined in DEFAULT_DIALOG_LOOKUP_TIMEOUT as the default lookup timeout.

Parameters:
matcher - contains the search criteria for finding a Dialog.
Returns:
a fixture that manages the Dialog found.
Throws:
WaitTimedOutError - if a Dialog that matches the given search criteria could not be found.
See Also:
dialog(GenericTypeMatcher, Timeout)

dialog

DialogFixture dialog(GenericTypeMatcher<? extends Dialog> matcher,
                     Timeout timeout)
Finds a Dialog that matches the specified search criteria.

Parameters:
matcher - contains the search criteria for finding a Dialog.
timeout - the amount of time to wait for a Dialog to be found.
Returns:
a fixture that manages the Dialog found.
Throws:
WaitTimedOutError - if a Dialog that matches the given search criteria could not be found.
Since:
1.2

dialog

DialogFixture dialog(String name)
Finds a Dialog with a name matching the specified one. This method uses the value defined in DEFAULT_DIALOG_LOOKUP_TIMEOUT as the default lookup timeout.

Parameters:
name - the name to match.
Returns:
a fixture that manages the Dialog found.
Throws:
WaitTimedOutError - if a Dialog that a matching name could not be found.
See Also:
dialog(String, Timeout)

dialog

DialogFixture dialog(String name,
                     Timeout timeout)
Finds a Dialog with a name matching the specified one.

Parameters:
name - the name to match.
timeout - the amount of time to wait for a Dialog to be found.
Returns:
a fixture that manages the Dialog found.
Throws:
WaitTimedOutError - if a Dialog that a matching name could not be found.
Since:
1.2

fileChooser

JFileChooserFixture fileChooser()
Returns the only JFileChooser currently available (if any.) This method uses the value defined in DEFAULT_DIALOG_LOOKUP_TIMEOUT as the default lookup timeout.

Returns:
a fixture that manages the JFileChooser found.
Throws:
WaitTimedOutError - if a JFileChooser could not be found.
See Also:
fileChooser(Timeout)

fileChooser

JFileChooserFixture fileChooser(Timeout timeout)
Returns the only JFileChooser currently available (if any.)

Parameters:
timeout - the amount of time to wait for a JFileChooser to be found.
Returns:
a fixture that manages the JFileChooser found.
Throws:
WaitTimedOutError - if a JFileChooser could not be found.

fileChooser

JFileChooserFixture fileChooser(GenericTypeMatcher<? extends JFileChooser> matcher)
Finds a JFileChooser that matches the specified search criteria. This method uses the value defined in DEFAULT_DIALOG_LOOKUP_TIMEOUT as the default lookup timeout.

Parameters:
matcher - contains the search criteria for finding a JFileChooser.
Returns:
a fixture that manages the JFileChooser found.
Throws:
WaitTimedOutError - if a JFileChooser could not be found.
See Also:
fileChooser(GenericTypeMatcher, Timeout)

fileChooser

JFileChooserFixture fileChooser(GenericTypeMatcher<? extends JFileChooser> matcher,
                                Timeout timeout)
Finds a JFileChooser that matches the specified search criteria.

Parameters:
matcher - contains the search criteria for finding a JFileChooser.
timeout - the amount of time to wait for a JFileChooser to be found.
Returns:
a fixture that manages the JFileChooser found.
Throws:
WaitTimedOutError - if a JFileChooser could not be found.

fileChooser

JFileChooserFixture fileChooser(String name)
Finds a JFileChooser with a name matching the specified one. This method uses the value defined in DEFAULT_DIALOG_LOOKUP_TIMEOUT as the default lookup timeout.

Parameters:
name - the name to match.
Returns:
a fixture that manages the JFileChooser found.
Throws:
WaitTimedOutError - if a JFileChooser could not be found.
See Also:
fileChooser(String, Timeout)

fileChooser

JFileChooserFixture fileChooser(String name,
                                Timeout timeout)
Finds a JFileChooser with a name matching the specified one.

Parameters:
name - the name to match.
timeout - the amount of time to wait for a JFileChooser to be found.
Returns:
a fixture that manages the JFileChooser found.
Throws:
WaitTimedOutError - if a JFileChooser could not be found.

label

JLabelFixture label()
Returns a JLabel found in this fixture's Container.

Returns:
a fixture that manages the JLabel found.
Throws:
ComponentLookupException - if a JLabel could not be found.
ComponentLookupException - if more than one JLabel is found.

label

JLabelFixture label(GenericTypeMatcher<? extends JLabel> matcher)
Finds a JLabel in this fixture's Container, that matches the specified search criteria.

Parameters:
matcher - contains the search criteria for finding a JLabel.
Returns:
a fixture that manages the JLabel found.
Throws:
ComponentLookupException - if a JLabel that matches the given search criteria could not be found.
ComponentLookupException - if more than one JLabel that matches the given search criteria is found.

label

JLabelFixture label(String name)
Finds a JLabel in this fixture's Container, which name matches the specified one.

Parameters:
name - the name to match.
Returns:
a fixture that manages the JLabel found.
Throws:
ComponentLookupException - if a JLabel having a matching name could not be found.
ComponentLookupException - if more than one JLabel having a matching name could is found.

list

JListFixture list()
Returns a JList found in this fixture's Container.

Returns:
a fixture that manages the JList found.
Throws:
ComponentLookupException - if a JList could not be found.
ComponentLookupException - if more than one JList is found.

list

JListFixture list(GenericTypeMatcher<? extends JList> matcher)
Finds a JList in this fixture's Container, that matches the specified search criteria.

Parameters:
matcher - contains the search criteria for finding a JList.
Returns:
a fixture that manages the JList found.
Throws:
ComponentLookupException - if a JList that matches the given search criteria could not be found.
ComponentLookupException - if more than one JList that matches the given search criteria is found.

list

JListFixture list(String name)
Finds a JList in this fixture's Container, which name matches the specified one.

Parameters:
name - the name to match.
Returns:
a fixture that manages the JList found.
Throws:
ComponentLookupException - if a JList having a matching name could not be found.
ComponentLookupException - if more than one JList having a matching name is found.

menuItemWithPath

JMenuItemFixture menuItemWithPath(String... path)
Finds a 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");
 

Parameters:
path - the path of the menu to find.
Returns:
a fixture that manages the JMenuItem found.
Throws:
ComponentLookupException - if a JMenuItem under the given path could not be found.
AssertionError - if the Component found under the given path is not a JMenuItem.

menuItem

JMenuItemFixture menuItem(String name)
Finds a JMenuItem, contained in this fixture's Container, which name matches the specified one.

Parameters:
name - the name to match.
Returns:
a fixture that manages the JMenuItem found.
Throws:
ComponentLookupException - if a JMenuItem having a matching name could not be found.
ComponentLookupException - if more than one JMenuItem having a matching name is found.

menuItem

JMenuItemFixture menuItem(GenericTypeMatcher<? extends JMenuItem> matcher)
Finds a JMenuItem, contained in this fixture's Container, that matches the specified search criteria.

Parameters:
matcher - contains the search criteria for finding a JMenuItem.
Returns:
a fixture that manages the JMenuItem found.
Throws:
ComponentLookupException - if a JMenuItem that matches the given search criteria could not be found.
ComponentLookupException - if more than one JMenuItem that matches the given search criteria is found.

optionPane

JOptionPaneFixture optionPane()
Returns the only JOptionPane currently available (if any.) This method uses the value defined in DEFAULT_DIALOG_LOOKUP_TIMEOUT as the default lookup timeout.

Returns:
a fixture that manages the JOptionPane found.
Throws:
WaitTimedOutError - if a JOptionPane could not be found.
See Also:
optionPane(Timeout)

optionPane

JOptionPaneFixture optionPane(Timeout timeout)
Returns the only JOptionPane currently available (if any.)

Parameters:
timeout - the amount of time to wait for a JOptionPane to be found.
Returns:
a fixture that manages the JOptionPane found.
Throws:
WaitTimedOutError - if a JOptionPane could not be found.

panel

JPanelFixture panel()
Returns a JPanel found in this fixture's Container.

Returns:
a fixture that manages the JPanel found.
Throws:
ComponentLookupException - if a JPanel could not be found.
ComponentLookupException - if more than one JPanel is found.

panel

JPanelFixture panel(GenericTypeMatcher<? extends JPanel> matcher)
Finds a JPanel in this fixture's Container, that matches the specified search criteria.

Parameters:
matcher - contains the search criteria for finding a JPanel.
Returns:
a fixture that manages the JPanel found.
Throws:
ComponentLookupException - if a JPanel that matches the given search criteria could not be found.
ComponentLookupException - if more than one JPanel that matches the given search criteria is found.

panel

JPanelFixture panel(String name)
Finds a JPanel in this fixture's Container, which name matches the specified one.

Parameters:
name - the name to match.
Returns:
a fixture that manages the JPanel found.
Throws:
ComponentLookupException - if a JPanel having a matching name could not be found.

progressBar

JProgressBarFixture progressBar()
Returns a JProgressBar found in this fixture's Container.

Returns:
a fixture that manages the JProgressBar found.
Throws:
ComponentLookupException - if a JProgressBar could not be found.
ComponentLookupException - if more than one JProgressBar is found.

progressBar

JProgressBarFixture progressBar(GenericTypeMatcher<? extends JProgressBar> matcher)
Finds a JProgressBar in this fixture's Container, that matches the specified search criteria.

Parameters:
matcher - contains the search criteria for finding a JProgressBar.
Returns:
a fixture that manages the JProgressBar found.
Throws:
ComponentLookupException - if a JProgressBar that matches the given search criteria could not be found.
ComponentLookupException - if more than one JProgressBar that matches the given search criteria is found.

progressBar

JProgressBarFixture progressBar(String name)
Finds a JProgressBar in this fixture's Container, which name matches the specified one.

Parameters:
name - the name to match.
Returns:
a fixture that manages the JProgressBar found.
Throws:
ComponentLookupException - if a JProgressBar having a matching name could not be found.

radioButton

JRadioButtonFixture radioButton()
Returns a JRadioButton found in this fixture's Container.

Returns:
a fixture that manages the JRadioButton found.
Throws:
ComponentLookupException - if a JRadioButton could not be found.
ComponentLookupException - if more than one JRadioButton is found.

radioButton

JRadioButtonFixture radioButton(GenericTypeMatcher<? extends JRadioButton> matcher)
Finds a JRadioButton in this fixture's Container, that matches the specified search criteria.

Parameters:
matcher - contains the search criteria for finding a JRadioButton.
Returns:
a fixture that manages the JRadioButton found.
Throws:
ComponentLookupException - if a JRadioButton that matches the given search criteria could not be found.
ComponentLookupException - if more than one JRadioButton that matches the given search criteria is found.

radioButton

JRadioButtonFixture radioButton(String name)
Finds a JRadioButton in this fixture's Container, which name matches the specified one.

Parameters:
name - the name to match.
Returns:
a fixture that manages the JRadioButton found.
Throws:
ComponentLookupException - if a JRadioButton having a matching name could not be found.
ComponentLookupException - if more than one JRadioButton having a matching name is found.

scrollBar

JScrollBarFixture scrollBar()
Returns a JScrollBar found in this fixture's Container.

Returns:
a fixture that manages the JScrollBar found.
Throws:
ComponentLookupException - if a JScrollBar could not be found.
ComponentLookupException - if more than one JScrollBar is found.

scrollBar

JScrollBarFixture scrollBar(GenericTypeMatcher<? extends JScrollBar> matcher)
Finds a JScrollBar in this fixture's Container, that matches the specified search criteria.

Parameters:
matcher - contains the search criteria for finding a JScrollBar.
Returns:
a fixture that manages the JScrollBar found.
Throws:
ComponentLookupException - if a JScrollBar that matches the given search criteria could not be found.
ComponentLookupException - if more than one JScrollBar that matches the given search criteria is found.

scrollBar

JScrollBarFixture scrollBar(String name)
Finds a JScrollBar in this fixture's Container, which name matches the specified one.

Parameters:
name - the name to match.
Returns:
a fixture that manages the JScrollBar found.
Throws:
ComponentLookupException - if a JScrollBar having a matching name could not be found.
ComponentLookupException - if more than one JScrollBar having a matching name is found.

scrollPane

JScrollPaneFixture scrollPane()
Returns a JScrollPane found in this fixture's Container.

Returns:
a fixture that manages the JScrollPane found.
Throws:
ComponentLookupException - if a JScrollPane could not be found.
ComponentLookupException - if more than one JScrollPane is found.

scrollPane

JScrollPaneFixture scrollPane(GenericTypeMatcher<? extends JScrollPane> matcher)
Finds a JScrollPane in this fixture's Container, that matches the specified search criteria.

Parameters:
matcher - contains the search criteria for finding a JScrollPane.
Returns:
a fixture that manages the JScrollPane found.
Throws:
ComponentLookupException - if a JScrollPane that matches the given search criteria could not be found.
ComponentLookupException - if more than one JScrollPane that matches the given search criteria is found.

scrollPane

JScrollPaneFixture scrollPane(String name)
Finds a JScrollPane in this fixture's Container, which name matches the specified one.

Parameters:
name - the name to match.
Returns:
a fixture that manages the JScrollPane found.
Throws:
ComponentLookupException - if a JScrollPane having a matching name could not be found.
ComponentLookupException - if more than one JScrollPane having a matching name is found.

slider

JSliderFixture slider()
Returns a JSlider found in this fixture's Container.

Returns:
a fixture that manages the JSlider found.
Throws:
ComponentLookupException - if a JSlider could not be found.
ComponentLookupException - if more than one JSlider is found.

slider

JSliderFixture slider(GenericTypeMatcher<? extends JSlider> matcher)
Finds a JSlider in this fixture's Container, that matches the specified search criteria.

Parameters:
matcher - contains the search criteria for finding a JSlider.
Returns:
a fixture that manages the JSlider found.
Throws:
ComponentLookupException - if a JSlider that matches the given search criteria could not be found.
ComponentLookupException - if more than one JSlider that matches the given search criteria is found.

slider

JSliderFixture slider(String name)
Finds a JSlider in this fixture's Container, which name matches the specified one.

Parameters:
name - the name to match.
Returns:
a fixture that manages the JSlider found.
Throws:
ComponentLookupException - if a JSlider having a matching name could not be found.
ComponentLookupException - if more than one JSlider having a matching name is found.

spinner

JSpinnerFixture spinner()
Returns a JSpinner found in this fixture's Container.

Returns:
a fixture that manages the JSpinner found.
Throws:
ComponentLookupException - if a JSpinner could not be found.
ComponentLookupException - if more than one JSpinner is found.

spinner

JSpinnerFixture spinner(GenericTypeMatcher<? extends JSpinner> matcher)
Finds a JSpinner in this fixture's Container, that matches the specified search criteria.

Parameters:
matcher - contains the search criteria for finding a JSpinner.
Returns:
a fixture that manages the JSpinner found.
Throws:
ComponentLookupException - if a JSpinner that matches the given search criteria could not be found.
ComponentLookupException - if more than one JSpinner that matches the given search criteria is found.

spinner

JSpinnerFixture spinner(String name)
Finds a JSpinner in this fixture's Container, which name matches the specified one.

Parameters:
name - the name to match.
Returns:
a fixture that manages the JSpinner found.
Throws:
ComponentLookupException - if a JSpinner having a matching name could not be found.
ComponentLookupException - if more than one JSpinner having a matching name is found.

splitPane

JSplitPaneFixture splitPane()
Returns the JSplitPane found in this fixture's Container.

Returns:
a fixture that manages the JSplitPane found.
Throws:
ComponentLookupException - if a JSplitPane could not be found.
ComponentLookupException - if more than one JSplitPane is found.

splitPane

JSplitPaneFixture splitPane(GenericTypeMatcher<? extends JSplitPane> matcher)
Finds a JSplitPane in this fixture's Container, that matches the specified search criteria.

Parameters:
matcher - contains the search criteria for finding a JSplitPane.
Returns:
a fixture that manages the JSplitPane found.
Throws:
ComponentLookupException - if a JSplitPane that matches the given search criteria could not be found.
ComponentLookupException - if more than one JSplitPane that matches the given search criteria is found.

splitPane

JSplitPaneFixture splitPane(String name)
Finds a JSplitPane in this fixture's Container, which name matches the specified one.

Parameters:
name - the name to match.
Returns:
a fixture that manages the JSplitPane found.
Throws:
ComponentLookupException - if a JSplitPane having a matching name could not be found.
ComponentLookupException - if more than one JSplitPane having a matching name is found.

tabbedPane

JTabbedPaneFixture tabbedPane()
Returns a JTabbedPane found in this fixture's Container.

Returns:
a fixture that manages the JTabbedPane found.
Throws:
ComponentLookupException - if a JTabbedPane could not be found.
ComponentLookupException - if more than one JTabbedPane is found.

tabbedPane

JTabbedPaneFixture tabbedPane(GenericTypeMatcher<? extends JTabbedPane> matcher)
Finds a JTabbedPane in this fixture's Container, that matches the specified search criteria.

Parameters:
matcher - contains the search criteria for finding a JTabbedPane.
Returns:
a fixture that manages the JTabbedPane found.
Throws:
ComponentLookupException - if a JTabbedPane that matches the given search criteria could not be found.
ComponentLookupException - if more than one JTabbedPane that matches the given search criteria is found.

tabbedPane

JTabbedPaneFixture tabbedPane(String name)
Finds a JTabbedPane in this fixture's Container, which name matches the specified one.

Parameters:
name - the name to match.
Returns:
a fixture that manages the JTabbedPane found.
Throws:
ComponentLookupException - if a JTabbedPane having a matching name could not be found.
ComponentLookupException - if more than one JTabbedPane having a matching name is found.

table

JTableFixture table()
Returns a JTable found in this fixture's Container.

Returns:
a fixture that manages the JTable found.
Throws:
ComponentLookupException - if a JTable having a matching name could not be found.
ComponentLookupException - if more than one JTable having a matching name is found.

table

JTableFixture table(GenericTypeMatcher<? extends JTable> matcher)
Finds a JTable in this fixture's Container, that matches the specified search criteria.

Parameters:
matcher - contains the search criteria for finding a JTable.
Returns:
a fixture that manages the JTable found.
Throws:
ComponentLookupException - if a JTable that matches the given search criteria could not be found.
ComponentLookupException - if more than one JTable that matches the given search criteria is found.

table

JTableFixture table(String name)
Finds a JTable in this fixture's Container, which name matches the specified one.

Parameters:
name - the name to match.
Returns:
a fixture that manages the JTable found.
Throws:
ComponentLookupException - if a JTable having a matching name could not be found.
ComponentLookupException - if more than one JTable having a matching name is found.

textBox

JTextComponentFixture textBox()
Returns a JTextComponent found in this fixture's Container.

Returns:
a fixture that manages the JTextComponent found.
Throws:
ComponentLookupException - if a JTextComponent having a matching name could not be found.
ComponentLookupException - if more than one JTextComponent having a matching name is found.

textBox

JTextComponentFixture textBox(GenericTypeMatcher<? extends JTextComponent> matcher)
Finds a JTextComponent in this fixture's Container managed by this fixture, that matches the specified search criteria.

Parameters:
matcher - contains the search criteria for finding a JTextComponent.
Returns:
a fixture that manages the JTextComponent found.
Throws:
ComponentLookupException - if a JTextComponent that matches the given search criteria could not be found.
ComponentLookupException - if more than one JTextComponent that matches the given search criteria is found.

textBox

JTextComponentFixture textBox(String name)
Finds a JTextComponent in this fixture's Container managed by this fixture, which name matches the specified one.

Parameters:
name - the name to match.
Returns:
a fixture that manages the JTextComponent found.
Throws:
ComponentLookupException - if a JTextComponent having a matching name could not be found.
ComponentLookupException - if more than one JTextComponent having a matching name is found.

toggleButton

JToggleButtonFixture toggleButton()
Returns a JToggleButton found in this fixture's Container.

Returns:
a fixture that manages the JToggleButton found.
Throws:
ComponentLookupException - if a JToggleButton could not be found.
ComponentLookupException - if more than one JToggleButton is found.

toggleButton

JToggleButtonFixture toggleButton(GenericTypeMatcher<? extends JToggleButton> matcher)
Finds a JToggleButton in this fixture's Container, that matches the specified search criteria.

Parameters:
matcher - contains the search criteria for finding a JToggleButton.
Returns:
a fixture that manages the JToggleButton found.
Throws:
ComponentLookupException - if a JToggleButton that matches the given search criteria could not be found.
ComponentLookupException - if more than one JToggleButton that matches the given search criteria is found.

toggleButton

JToggleButtonFixture toggleButton(String name)
Finds a JToggleButton in this fixture's Container, which name matches the specified one.

Parameters:
name - the name to match.
Returns:
a fixture that manages the JToggleButton found.
Throws:
ComponentLookupException - if a JToggleButton having a matching name could not be found.
ComponentLookupException - if more than one JToggleButton having a matching name is found.

toolBar

JToolBarFixture toolBar()
Returns a JToolBar found in this fixture's Container.

Returns:
a fixture that manages the JToolBar found.
Throws:
ComponentLookupException - if a JToolBar having a matching name could not be found.
ComponentLookupException - if more than one JToolBar having a matching name could is found.

toolBar

JToolBarFixture toolBar(GenericTypeMatcher<? extends JToolBar> matcher)
Finds a JToolBar in this fixture's Container, that matches the specified search criteria.

Parameters:
matcher - contains the search criteria for finding a JToolBar.
Returns:
a fixture that manages the JToolBar found.
Throws:
ComponentLookupException - if a JToolBar that matches the given search criteria could not be found.
ComponentLookupException - if more than one JToolBar that matches the given search criteria is found.

toolBar

JToolBarFixture toolBar(String name)
Finds a JToolBar in this fixture's Container, which name matches the specified one.

Parameters:
name - the name to match.
Returns:
a fixture that manages the JToolBar found.
Throws:
ComponentLookupException - if a JToolBar having a matching name could not be found.
ComponentLookupException - if more than one JToolBar having a matching name is found.

tree

JTreeFixture tree()
Returns a JTree found in this fixture's Container.

Returns:
a fixture that manages the JTree found.
Throws:
ComponentLookupException - if a JTree having a matching name could not be found.
ComponentLookupException - if more than one JTree having a matching name is found.

tree

JTreeFixture tree(GenericTypeMatcher<? extends JTree> matcher)
Finds a JTree in this fixture's Container, that matches the specified search criteria.

Parameters:
matcher - contains the search criteria for finding a JTree.
Returns:
a fixture that manages the JTree found.
Throws:
ComponentLookupException - if a JTree that matches the given search criteria could not be found.
ComponentLookupException - if more than one JTree that matches the given search criteria is found.

tree

JTreeFixture tree(String name)
Finds a JTree in this fixture's Container, which name matches the specified one.

Parameters:
name - the name to match.
Returns:
a fixture that manages the JTree found.
Throws:
ComponentLookupException - if a JTree having a matching name could not be found.
ComponentLookupException - if more than one JTree having a matching name is found.

with

<C extends Component,F extends ComponentFixture<C>> F with(ComponentFixtureExtension<C,F> extension)
Returns a ComponentFixture managing a component inside this fixture's Container. This is an extension method, to allow implementations of ContainerFixture handle custom GUI components.

Type Parameters:
C - the type of Component the fixture to return can handle.
F - the type of ComponentFixture to return.
Parameters:
extension - the ComponentFixtureExtension that creates the ComponentFixture to return.
Returns:
a ComponentFixture managing a component inside this fixture's Container.


Copyright © 2007-2011 FEST (Fixtures for Easy Software Testing). All Rights Reserved.