public class TestHierarchy extends AWTHierarchy
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
dispose(Window) will be ignored permanently.
EMPTY, tracker| Constructor and Description |
|---|
TestHierarchy()
Create a new TestHierarchy which does not contain any UI
Components which might already exist.
|
TestHierarchy(boolean ignoreExisting)
Create a new TestHierarchy, indicating whether extant Components
should be omitted from the Hierarchy.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(java.awt.Component c)
Returns whether the given component is reachable from any of the root
windows.
|
void |
dispose(java.awt.Window w)
Dispose of the given Window, but only if it currently exists within
the hierarchy.
|
java.util.Collection |
getComponents(java.awt.Component c)
Returns all sub-components of the given Component, omitting those
which are currently filtered.
|
java.util.Collection |
getRoots()
Returns all available root Windows, excluding those which have been
filtered.
|
void |
ignoreExisting()
Make all currently extant components invisible to this Hierarchy,
without affecting their current state.
|
boolean |
isFiltered(java.awt.Component c)
Returns true if the given component will not be considered when
walking the hierarchy.
|
void |
setFiltered(java.awt.Component c,
boolean filter)
Indicates whether the given component is to be included in the
Hierarchy.
|
getDefault, getParent, setDefaultpublic TestHierarchy()
public TestHierarchy(boolean ignoreExisting)
public boolean contains(java.awt.Component c)
AWTHierarchycontains in interface Hierarchycontains in class AWTHierarchypublic void dispose(java.awt.Window w)
dispose in interface Hierarchydispose in class AWTHierarchypublic void ignoreExisting()
public java.util.Collection getRoots()
getRoots in interface HierarchygetRoots in class AWTHierarchypublic java.util.Collection getComponents(java.awt.Component c)
getComponents in interface HierarchygetComponents in class AWTHierarchypublic boolean isFiltered(java.awt.Component c)
setFiltered(Component,boolean), or if
any Window ancestor has been filtered.public void setFiltered(java.awt.Component c,
boolean filter)
Abbot is hosted on