|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.assertj.swing.hierarchy.SingleComponentHierarchy
public final class SingleComponentHierarchy
A ComponentHierarchy
created with a specified AWT or Swing Component
as root.
Constructor Summary | |
---|---|
SingleComponentHierarchy(Container root,
ComponentHierarchy hierarchy)
Creates a new SingleComponentHierarchy . |
Method Summary | |
---|---|
Collection<Component> |
childrenOf(Component c)
Returns all the children of the given AWT or Swing Component . |
boolean |
contains(Component c)
Indicates whether this ComponentHierarchy contains the given AWT or Swing Component . |
void |
dispose(Window w)
Provides proper disposal of the given AWT or Swing Window , appropriate to this ComponentHierarchy . |
Container |
parentOf(Component c)
Returns the parent for the given AWT or Swing Component . |
Container |
root()
|
Collection<Container> |
roots()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SingleComponentHierarchy(@Nonnull Container root, @Nonnull ComponentHierarchy hierarchy)
SingleComponentHierarchy
.
root
- the root Component
for this hierarchy.hierarchy
- the base ComponentHierarchy
.Method Detail |
---|
public Container root()
Component
in this hierarchy.@Nullable public Container parentOf(@Nonnull Component c)
Component
.
parentOf
in interface ComponentHierarchy
c
- the given Component
.
Component
.@Nonnull public Collection<Container> roots()
roots
in interface ComponentHierarchy
Component
in this hierarchy.@Nonnull public Collection<Component> childrenOf(@Nonnull Component c)
ComponentHierarchy
Component
.
childrenOf
in interface ComponentHierarchy
c
- the given Component
.
Component
.public boolean contains(@Nonnull Component c)
ComponentHierarchy
ComponentHierarchy
contains the given AWT or Swing Component
.
contains
in interface ComponentHierarchy
c
- the given Component
.
true
if this ComponentHierarchy
contains the given Component
, false
otherwise.public void dispose(@Nonnull Window w)
ComponentHierarchy
Window
, appropriate to this ComponentHierarchy
.
After disposal, the Window
and its descendants will no longer be reachable from this
ComponentHierarchy
.
dispose
in interface ComponentHierarchy
w
- the Window
to dispose.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |