|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.jemmy.ComponentSearcher
public class ComponentSearcher
Contains methods to search for components below a
a given java.awt.Container
in the display containment hierarchy.
Uses a ComponentChooser
interface implementation to find a
component.
ComponentChooser
Constructor Summary | |
---|---|
ComponentSearcher(Container c)
Contructor. |
Method Summary | |
---|---|
Component |
findComponent(ComponentChooser chooser)
Searches for a component. |
Component |
findComponent(ComponentChooser chooser,
int index)
Searches for a component. |
TestOut |
getOutput()
Returns print output streams or writers. |
static ComponentChooser |
getTrueChooser(String description)
Creates ComponentChooser implementation
whose checkComponent(Component)
method returns true for any component. |
void |
setOutput(TestOut output)
Defines print output streams or writers. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ComponentSearcher(Container c)
c
- Container to find components in.Method Detail |
---|
public static ComponentChooser getTrueChooser(String description)
ComponentChooser
implementation
whose checkComponent(Component)
method returns true
for any component.
description
- Component description.
public void setOutput(TestOut output)
setOutput
in interface Outputable
output
- ?out? Identify the streams or writers used for print output.TestOut
,
Outputable
,
getOutput()
public TestOut getOutput()
getOutput
in interface Outputable
TestOut
,
Outputable
,
setOutput(org.netbeans.jemmy.TestOut)
public Component findComponent(ComponentChooser chooser, int index)
ComponentChooser
's container.
chooser
- ComponentChooser instance, defining and applying the
search criteria.index
- Ordinal component index. Indices start at 0.
index
'th component from among those components
for which the chooser's checkComponent(Component)
method
returns true
.
A null
reference is returned if there are fewer than
index-1
components meeting the search
criteria exist in the component hierarchy rooted in this
ComponentChooser
's container.public Component findComponent(ComponentChooser chooser)
ComponentChooser
's container.
chooser
- ComponentChooser instance, defining and applying the
search criteria.
checkComponent(Component)
method returns true
.
A null
reference is returned if no component meeting the search
criteria exist in the component hierarchy rooted in this
ComponentChooser
's container.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |