|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--abbot.DefaultComponentFinder
Basic component lookup implementation.
Field Summary | |
static int |
POPUP_TIMEOUT
Timeout for waiting on a popup menu. |
Fields inherited from interface abbot.script.Tags |
TAG_ACTION, TAG_ARGS, TAG_ASSERT, TAG_AWTTESTSCRIPT, TAG_CALL, TAG_CLASS, TAG_CLASSPATH, TAG_COMMENT, TAG_COMPONENT, TAG_COUNT, TAG_DELEGATE, TAG_DESC, TAG_DOCBASE, TAG_EVENT, TAG_FILENAME, TAG_FORKED, TAG_HEIGHT, TAG_HORDER, TAG_ID, TAG_INDEX, TAG_INVERT, TAG_INVOKER, TAG_KEYCHAR, TAG_KEYCODE, TAG_KIND, TAG_LAUNCH, TAG_METHOD, TAG_MODIFIERS, TAG_NAME, TAG_PARAMS, TAG_PARENT, TAG_POLL_INTERVAL, TAG_PROPERTY, TAG_SAMPLE, TAG_SCRIPT, TAG_SEQUENCE, TAG_SLOW, TAG_STOP_ON_ERROR, TAG_STOP_ON_FAILURE, TAG_TAG, TAG_TERMINATE, TAG_THREADED, TAG_TIMEOUT, TAG_TITLE, TAG_TRIGGER, TAG_TYPE, TAG_VALUE, TAG_VMARGS, TAG_VORDER, TAG_WAIT, TAG_WIDTH, TAG_WINDOW, TAG_X, TAG_Y |
Method Summary | |
(package private) static void |
|
void |
closeWindows()
Send an explicit window close event to all showing windows. |
void |
disposeWindows()
Dispose of all available windows, and does not return until they have been disposed of. |
void |
filterComponent(Component comp)
Don't return the given component in any queries. |
Component |
findActivePopupMenu(Component invoker)
Returns the currently active popup menu with the given invoker. |
Component |
findComponent(ComponentReference ref)
Attempt to find the component corresponding to the given reference among existing, visible components. |
Component |
findMenuItemByName(Component root,
String name)
Look up the first menu item below root with the given title. |
Window |
findWindow(String nameOrTitle)
Return the window with the given name or title. |
Frame |
getComponentFrame(Component comp)
Return the component's owning frame. |
String |
getComponentName(Component comp)
Return the component's name, ensuring that null is returned if the name appears to be auto-generated. |
Component |
getComponentParent(Component comp)
Look up the apparent parent of a component. |
Component[] |
getComponents(Container c)
Returns all components below the GUI hierarchy of the given Container, including Windows and MenuElements. |
Window |
getComponentTitledWindow(Component comp)
Return the component's owning frame or dialog. |
Window |
getComponentWindow(Component comp)
Return the nearest Window ancestor of the given Component. |
String |
getComponentWindowTitle(Component comp)
Return the title of the nearest ancestor window with a title. |
static ComponentFinder |
getFinder()
This is the factory method to use unless you already know otherwise :) |
static ComponentFinder |
getFinder(ComponentFinder context)
This factory method allows the finder to be used where a finder already exists and is filtering components. |
Window[] |
getRootWindows()
Return an array of all available Frames, across all known contexts. |
Window[] |
getWindows()
Returns the set of all available windows that have not been filtered. |
Window[] |
getWindows(Window parent)
Return all windows owned by the given window that have not been filtered. |
void |
ignoreComponent(Component comp)
Ignore (for the purpose of future lookup) the given component. |
void |
ignoreExistingComponents()
Ignore (for the purposes of future lookup) all currently available components. |
boolean |
isFiltered(Component comp)
Returns true if the component or its Window ancestor is filtered. |
boolean |
isShowing(Component c)
Indicates whether the given component is showing and ready for input. |
void |
setFilterEnabled(boolean enable)
Indicate whether to filter component lists. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static int POPUP_TIMEOUT
Method Detail |
static void()
public static ComponentFinder getFinder()
public static ComponentFinder getFinder(ComponentFinder context)
public Component findComponent(ComponentReference ref) throws ComponentNotFoundException, MultipleComponentsFoundException
findComponent
in interface ComponentFinder
ref
- A Component reference to use to identify a componentComponentNotFoundException
- if a Component cannot be located via
the passed in ComponentReferenceMultipleComponentsFoundException
- if more then one component is
found via the passed in referencepublic Window findWindow(String nameOrTitle) throws ComponentNotFoundException, MultipleComponentsFoundException
findWindow
in interface ComponentFinder
public Component findActivePopupMenu(Component invoker)
findActivePopupMenu
in interface ComponentFinder
public Component findMenuItemByName(Component root, String name)
ComponentFinder
findMenuItemByName
in interface ComponentFinder
public String getComponentName(Component comp)
getComponentName
in interface ComponentFinder
public Window[] getRootWindows()
getRootWindows
in interface ComponentFinder
public Window[] getWindows(Window parent)
getWindows
in interface ComponentFinder
public Window[] getWindows()
getWindows
in interface ComponentFinder
public Component[] getComponents(Container c)
getComponents
in interface ComponentFinder
public Component getComponentParent(Component comp)
getComponentParent
in interface ComponentFinder
public Frame getComponentFrame(Component comp)
getComponentFrame
in interface ComponentFinder
public Window getComponentWindow(Component comp)
getComponentWindow
in interface ComponentFinder
public String getComponentWindowTitle(Component comp)
getComponentWindowTitle
in interface ComponentFinder
public Window getComponentTitledWindow(Component comp)
getComponentTitledWindow
in interface ComponentFinder
public boolean isFiltered(Component comp)
isFiltered
in interface ComponentFinder
public void filterComponent(Component comp)
ComponentFinder
filterComponent
in interface ComponentFinder
public void ignoreComponent(Component comp)
ignoreComponent
in interface ComponentFinder
public void ignoreExistingComponents()
ignoreExistingComponents
in interface ComponentFinder
public void setFilterEnabled(boolean enable)
ComponentFinder
setFilterEnabled
in interface ComponentFinder
public void closeWindows()
closeWindows
in interface ComponentFinder
public void disposeWindows()
disposeWindows
in interface ComponentFinder
public boolean isShowing(Component c)
isShowing
in interface ComponentFinder
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |