Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

abbot
Interface ComponentFinder  view ComponentFinder download ComponentFinder.java

All Known Implementing Classes:
DefaultComponentFinder

public interface ComponentFinder

Interface to support looking up existing components based on a number of different criteria.


Field Summary
static int MATCH_EXACT
           
static int MATCH_STRONG
           
static int MATCH_WEAK
           
 
Method Summary
 void closeWindows()
          Send close events to all available showing windows.
 boolean componentsMatch(java.awt.Component comp, abbot.script.ComponentReference ref, int type)
          Determine the best we can whether the component is the one referred to by the reference.
 void discardAllComponents()
          Discard all currently available components from any future queries.
 void discardComponent(java.awt.Component comp)
          Discard the given component from any future queries.
 void disposeWindows()
          Discard all currently available windows.
 void filterComponent(java.awt.Component comp)
          Don't return the given component in any queries.
 java.awt.Component findActivePopupMenu(java.awt.Component invoker)
          Find the active popup menu invoked by the given component.
 java.awt.Component findComponent(abbot.script.ComponentReference ref)
          Attempt to find the given component.
 java.awt.Component findMenuItemByName(java.awt.Component root, java.lang.String name)
          Look up the first menu item below root with the given title.
 java.awt.Window findWindow(java.lang.String nameOrTitle)
          Find the first showing window with a name or title that matches the given string.
 java.awt.Window findWindowByName(java.lang.String name)
          Find the first showing window with the given name.
 java.awt.Window findWindowByTitle(java.lang.String pattern)
          Find the first showing window with the given title pattern.
 java.awt.Frame getComponentFrame(java.awt.Component comp)
          Return the component's owning frame.
 java.lang.String getComponentName(java.awt.Component comp)
          Return the component's name.
 java.awt.Component getComponentParent(java.awt.Component comp)
          Look up the apparent parent of a component.
 java.awt.Component[] getComponents(java.awt.Container c)
          Return all children of the given container, including Windows, MenuElements, and popup menus.
 java.awt.Window getComponentTitledWindow(java.awt.Component comp)
          Return the component's nearest owning window with a title.
 java.awt.Window getComponentWindow(java.awt.Component comp)
          Returns the parent window for the given component.
 java.lang.String getComponentWindowTitle(java.awt.Component comp)
          Returns the title of the owning window for the given component.
 java.awt.Frame[] getFrames()
          Returns all available frames.
 java.awt.Window[] getWindows()
          Returns the set of all available windows.
 java.awt.Window[] getWindows(java.awt.Window parent)
          Returns all available windows under the given parent window.
 boolean isFiltered(java.awt.Component comp)
          Returns true if the component or its Window ancestor is filtered.
 boolean isWindowShowing(java.awt.Window w)
          Return whether the given window is showing.
 abbot.script.ComponentReference matchComponent(java.awt.Component comp, java.util.Iterator refs, int type)
          Find the best match for the given component among the given ComponentReferences.
 void setFilterEnabled(boolean enable)
          Indicate whether to filter component lists.
 

Field Detail

MATCH_EXACT

public static final int MATCH_EXACT
See Also:
Constant Field Values

MATCH_STRONG

public static final int MATCH_STRONG
See Also:
Constant Field Values

MATCH_WEAK

public static final int MATCH_WEAK
See Also:
Constant Field Values
Method Detail

findComponent

public java.awt.Component findComponent(abbot.script.ComponentReference ref)
                                 throws ComponentNotFoundException,
                                        MultipleComponentsFoundException
Attempt to find the given component.


findWindowByName

public java.awt.Window findWindowByName(java.lang.String name)
Find the first showing window with the given name.


findWindowByTitle

public java.awt.Window findWindowByTitle(java.lang.String pattern)
Find the first showing window with the given title pattern.


findWindow

public java.awt.Window findWindow(java.lang.String nameOrTitle)
Find the first showing window with a name or title that matches the given string.


findActivePopupMenu

public java.awt.Component findActivePopupMenu(java.awt.Component invoker)
Find the active popup menu invoked by the given component.


findMenuItemByName

public java.awt.Component findMenuItemByName(java.awt.Component root,
                                             java.lang.String name)
Look up the first menu item below root with the given title.


matchComponent

public abbot.script.ComponentReference matchComponent(java.awt.Component comp,
                                                      java.util.Iterator refs,
                                                      int type)
Find the best match for the given component among the given ComponentReferences.


componentsMatch

public boolean componentsMatch(java.awt.Component comp,
                               abbot.script.ComponentReference ref,
                               int type)
Determine the best we can whether the component is the one referred to by the reference.


getFrames

public java.awt.Frame[] getFrames()
Returns all available frames.


getWindows

public java.awt.Window[] getWindows(java.awt.Window parent)
Returns all available windows under the given parent window.


getWindows

public java.awt.Window[] getWindows()
Returns the set of all available windows.


getComponents

public java.awt.Component[] getComponents(java.awt.Container c)
Return all children of the given container, including Windows, MenuElements, and popup menus.


getComponentParent

public java.awt.Component getComponentParent(java.awt.Component comp)
Look up the apparent parent of a component.


getComponentWindow

public java.awt.Window getComponentWindow(java.awt.Component comp)
Returns the parent window for the given component. In this context, the parent of a popup menu is its invoker.


getComponentWindowTitle

public java.lang.String getComponentWindowTitle(java.awt.Component comp)
Returns the title of the owning window for the given component.


getComponentFrame

public java.awt.Frame getComponentFrame(java.awt.Component comp)
Return the component's owning frame. There will always one of these; even a frameless window will have a temporary frame generated for it.


getComponentTitledWindow

public java.awt.Window getComponentTitledWindow(java.awt.Component comp)
Return the component's nearest owning window with a title.


getComponentName

public java.lang.String getComponentName(java.awt.Component comp)
Return the component's name.


isFiltered

public boolean isFiltered(java.awt.Component comp)
Returns true if the component or its Window ancestor is filtered.


filterComponent

public void filterComponent(java.awt.Component comp)
Don't return the given component in any queries. Makes the given component unavailable unless filtering is turned off.


setFilterEnabled

public void setFilterEnabled(boolean enable)
Indicate whether to filter component lists.


discardComponent

public void discardComponent(java.awt.Component comp)
Discard the given component from any future queries.


discardAllComponents

public void discardAllComponents()
Discard all currently available components from any future queries.


disposeWindows

public void disposeWindows()
Discard all currently available windows.


closeWindows

public void closeWindows()
Send close events to all available showing windows.


isWindowShowing

public boolean isWindowShowing(java.awt.Window w)
Return whether the given window is showing.