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(Component c)
Returns whether the given component is reachable from any of the root
windows.
|
void |
dispose(Window w)
Dispose of the given Window, but only if it currently exists within
the hierarchy.
|
Collection |
getComponents(Component c)
Returns all sub-components of the given Component, omitting those
which are currently filtered.
|
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(Component c)
Returns true if the given component will not be considered when
walking the hierarchy.
|
void |
setFiltered(Component c,
boolean filter)
Indicates whether the given component is to be included in the
Hierarchy.
|
getDefault, getParent, setDefault
public TestHierarchy()
public TestHierarchy(boolean ignoreExisting)
public boolean contains(Component c)
AWTHierarchy
contains
in interface Hierarchy
contains
in class AWTHierarchy
public void dispose(Window w)
dispose
in interface Hierarchy
dispose
in class AWTHierarchy
public void ignoreExisting()
public Collection getRoots()
getRoots
in interface Hierarchy
getRoots
in class AWTHierarchy
public Collection getComponents(Component c)
getComponents
in interface Hierarchy
getComponents
in class AWTHierarchy
public boolean isFiltered(Component c)
setFiltered(Component,boolean)
, or if
any Window
ancestor has been filtered.public void setFiltered(Component c, boolean filter)
Abbot is hosted on