@RunsInCurrentThread public interface ComponentHierarchy
Provides access to all AWT or Swing Component
s in a hierarchy.
Note: Methods in this interface are accessed in the current executing thread. Such thread may or may not be the event dispatch thread (EDT). Client code must call methods in this interface from the EDT.
Modifier and Type | Method and Description |
---|---|
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 . |
Collection<Container> |
roots() |
@Nonnull Collection<Container> roots()
Container
s in the ComponentHierarchy
.@Nonnull Collection<Component> childrenOf(@Nonnull Component c)
Component
.c
- the given Component
.Component
.@Nullable Container parentOf(@Nonnull Component c)
Component
.c
- the given Component
.Component
.boolean contains(@Nonnull Component c)
ComponentHierarchy
contains the given AWT or Swing Component
.c
- the given Component
.true
if this ComponentHierarchy
contains the given Component
, false
otherwise.Copyright © 2014–2017 AssertJ. All rights reserved.