| java.lang.Object abbot.finder.AWTHierarchy abbot.finder.TestHierarchy
TestHierarchy | public class TestHierarchy extends AWTHierarchy (Code) | | Provide isolation of a Component hierarchy to limit consideration to only
those Components created during the lifetime of this Hierarchy instance.
Extant Components (and any subsequently generated subwindows) are ignored
by default.
Implicitly auto-filters windows which are disposed (i.e. generate a
WINDOW_CLOSED event), but also implicitly un-filters them if they should
be shown again. Any Window explicitly disposed with
TestHierarchy.dispose(Window) will be ignored permanently.
|
Constructor Summary | |
public | TestHierarchy() Create a new TestHierarchy which does not contain any UI
Components which might already exist. | public | TestHierarchy(boolean ignoreExisting) Create a new TestHierarchy, indicating whether extant Components
should be omitted from the Hierarchy. |
Method Summary | |
public boolean | contains(Component c) | public void | dispose(Window w) Dispose of the given Window, but only if it currently exists within
the hierarchy. | public Collection | getComponents(Component c) Returns all sub-components of the given Component, omitting those
which are currently filtered. | public Collection | getRoots() Returns all available root Windows, excluding those which have been
filtered. | public void | ignoreExisting() Make all currently extant components invisible to this Hierarchy,
without affecting their current state. | public boolean | isFiltered(Component c) Returns true if the given component will not be considered when
walking the hierarchy. | public void | setFiltered(Component c, boolean filter) Indicates whether the given component is to be included in the
Hierarchy. |
TestHierarchy | public TestHierarchy()(Code) | | Create a new TestHierarchy which does not contain any UI
Components which might already exist.
|
TestHierarchy | public TestHierarchy(boolean ignoreExisting)(Code) | | Create a new TestHierarchy, indicating whether extant Components
should be omitted from the Hierarchy.
|
dispose | public void dispose(Window w)(Code) | | Dispose of the given Window, but only if it currently exists within
the hierarchy. It will no longer appear in this Hierarchy or be
reachable in a hierarchy walk.
|
getComponents | public Collection getComponents(Component c)(Code) | | Returns all sub-components of the given Component, omitting those
which are currently filtered.
|
getRoots | public Collection getRoots()(Code) | | Returns all available root Windows, excluding those which have been
filtered.
|
ignoreExisting | public void ignoreExisting()(Code) | | Make all currently extant components invisible to this Hierarchy,
without affecting their current state.
|
isFiltered | public boolean isFiltered(Component c)(Code) | | Returns true if the given component will not be considered when
walking the hierarchy. A Component is filtered if it has explicitly
been filtered via
TestHierarchy.setFiltered(Component,boolean) , or if
any Window ancestor has been filtered.
|
setFiltered | public void setFiltered(Component c, boolean filter)(Code) | | Indicates whether the given component is to be included in the
Hierarchy. If the component is a Window, recursively applies the
action to all owned Windows.
|
|
|