|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.swtbot.swt.finder.finders.ControlFinder
public class ControlFinder
Finds controls matching a particular matcher.
UIThreadRunnable
Field Summary | |
---|---|
protected IChildrenResolver |
childrenResolver
The childrenResolver |
protected Display |
display
The display |
protected IParentResolver |
parentResolver
The parentResolver |
boolean |
shouldFindInVisibleControls
Set to true if the control finder should find invisible controls. |
Constructor Summary | |
---|---|
ControlFinder()
Creates a Control finder using DefaultChildrenResolver and DefaultParentResolver . |
|
ControlFinder(IChildrenResolver childrenResolver,
IParentResolver parentResolver)
Creates a control finder using the given resolvers. |
Method Summary | ||
---|---|---|
Shell |
activeShell()
Return the active shell. |
|
|
findControls(List<Widget> widgets,
Matcher<T> matcher,
boolean recursive)
Finds the controls matching one of the widgets using the given matcher. |
|
|
findControls(Matcher<T> matcher)
Finds the controls in the active shell matching the given matcher. |
|
|
findControls(Widget parentWidget,
Matcher<T> matcher,
boolean recursive)
Finds the controls starting with the given parent widget and uses the given matcher. |
|
List<Shell> |
findShells(String text)
Finds the shell matching the given text (shell.getText()). |
|
IChildrenResolver |
getChildrenResolver()
Gets the registered children resolver. |
|
IParentResolver |
getParentResolver()
Gets the registered parent resolver. |
|
TreePath |
getPath(Widget w)
Gets the path to the widget. |
|
Shell[] |
getShells()
Gets the shells registered with the display. |
|
protected boolean |
visible(Widget w)
Returns true if the widget is a control and it is visible. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final IChildrenResolver childrenResolver
protected Display display
protected final IParentResolver parentResolver
public boolean shouldFindInVisibleControls
Constructor Detail |
---|
public ControlFinder()
DefaultChildrenResolver
and DefaultParentResolver
.
public ControlFinder(IChildrenResolver childrenResolver, IParentResolver parentResolver)
childrenResolver
- the resolver used to resolve children of a control.parentResolver
- the resolver used to resolve parent of a control.Method Detail |
---|
public <T extends Widget> List<T> findControls(Matcher<T> matcher)
Note: This method is thread safe.
matcher
- the matcher used to find controls in the active shell.
Display.getActiveShell()
public <T extends Widget> List<T> findControls(List<Widget> widgets, Matcher<T> matcher, boolean recursive)
widgets
provided.
widgets
- the list of widgets.matcher
- the matcher used to match the widgets.recursive
- if the match should be recursive.
true
then find
the widgets within each of the widget.protected boolean visible(Widget w)
This method is not thread safe and must be invoked from the UI thread.
TODO visibility of tab items.
w
- the widget
true
if the control is visible, false
otherwise.Control.getVisible()
public <T extends Widget> List<T> findControls(Widget parentWidget, Matcher<T> matcher, boolean recursive)
This method is thread safe.
parentWidget
- the parent widget in which controls should be found.matcher
- the matcher used to match the widgets.recursive
- if the match should be recursive.
true
then
find the widget within each of the parentWidget.public List<Shell> findShells(String text)
text
- The text on the Shell
public IChildrenResolver getChildrenResolver()
public IParentResolver getParentResolver()
public TreePath getPath(Widget w)
w
- the widget.
public Shell[] getShells()
public Shell activeShell()
Display.getActiveShell()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |