org.eclipse.swtbot.swt.finder.finders
Class ChildrenControlFinder

java.lang.Object
  extended by org.eclipse.swtbot.swt.finder.finders.ControlFinder
      extended by org.eclipse.swtbot.swt.finder.finders.ChildrenControlFinder

public class ChildrenControlFinder
extends ControlFinder

Finds controls matching a particular matcher in the given parent widget.

Since:
1.0
Version:
$Id$
Author:
Cedric Chabanois <cchabanois [at] no-log [dot] org>

Field Summary
protected  Widget parentWidget
          The parent widget to begin searching for children.
 
Fields inherited from class org.eclipse.swtbot.swt.finder.finders.ControlFinder
childrenResolver, display, parentResolver, shouldFindInVisibleControls
 
Constructor Summary
ChildrenControlFinder(Widget parentWidget)
          Constructs a child control finder widget using the given parent widget as its starting point.
ChildrenControlFinder(Widget parentWidget, IChildrenResolver childrenResolver, IParentResolver parentResolver)
          Constructs the child control finder with the given parent widget as it's starting point and the set resolvers.
 
Method Summary
<T extends Widget>
List<T>
findControls(Matcher<T> matcher)
          Attempts to find the controls using the given matcher starting with the given parent widget.
 
Methods inherited from class org.eclipse.swtbot.swt.finder.finders.ControlFinder
activeShell, findControls, findControls, findShells, getChildrenResolver, getParentResolver, getPath, getShells, visible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parentWidget

protected final Widget parentWidget
The parent widget to begin searching for children.

Since:
1.1
Constructor Detail

ChildrenControlFinder

public ChildrenControlFinder(Widget parentWidget)
Constructs a child control finder widget using the given parent widget as its starting point.

Parameters:
parentWidget - the parent widget in which controls should be found.

ChildrenControlFinder

public ChildrenControlFinder(Widget parentWidget,
                             IChildrenResolver childrenResolver,
                             IParentResolver parentResolver)
Constructs the child control finder with the given parent widget as it's starting point and the set resolvers.

Parameters:
parentWidget - the parent widget in which controls should be found.
childrenResolver - the resolver used to resolve children of a control.
parentResolver - the resolver used to resolve parent of a control.
Method Detail

findControls

public <T extends Widget> List<T> findControls(Matcher<T> matcher)
Attempts to find the controls using the given matcher starting with the given parent widget. This will search recursively.

Overrides:
findControls in class ControlFinder
Parameters:
matcher - the matcher used to find controls in the parentWidget.
Returns:
all controls in the parent widget that the matcher matches.
See Also:
Display.getActiveShell()