Package org.fest.swing.hierarchy
Interface ComponentHierarchy
- All Known Implementing Classes:
ExistingHierarchy
,NewHierarchy
,SingleComponentHierarchy
Understands access to all components in a hierarchy. Note: Methods in this class are not executed in
the event dispatch thread. Callers are responsible for calling them in the event dispatch thread.
Note: methods in this interface are not executed in the event dispatch thread (EDT.) Clients are responsible for invoking them in the EDT.
-
Method Summary
Modifier and TypeMethodDescriptionReturns all sub-components of the given component.boolean
Returns whether this hierarchy contains the given component.void
Provides proper disposal of the given window, appropriate to this hierarchy.Return the parent for the given component.Collection<? extends Container>
roots()
Provides all root containers in the hierarchy.
-
Method Details
-
roots
Collection<? extends Container> roots()Provides all root containers in the hierarchy.- Returns:
- all root containers in the hierarchy.
-
childrenOf
Returns all sub-components of the given component.- Parameters:
c
- the given component.- Returns:
- all sub-components of the given component.
-
parentOf
Return the parent for the given component.- Parameters:
c
- the given component.- Returns:
- the parent for the given component.
-
contains
Returns whether this hierarchy contains the given component.- Parameters:
c
- the given component.- Returns:
true
if this hierarchy contains the given component,false
otherwise.
-
dispose
Provides proper disposal of the given window, appropriate to this hierarchy. After disposal, the window and its descendants will no longer be reachable from this hierarchy.- Parameters:
w
- the container to window.
-