Package org.fest.swing.hierarchy
Class SingleComponentHierarchy
java.lang.Object
org.fest.swing.hierarchy.SingleComponentHierarchy
- All Implemented Interfaces:
ComponentHierarchy
Understands a component hierarchy created with a specified
Component as root.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSingleComponentHierarchy(Container root, ComponentHierarchy hierarchy) Creates a newSingleComponentHierarchy. -
Method Summary
Modifier and TypeMethodDescriptionReturns all sub-components of the given.ComponentbooleanReturns whether the hierarchy contains the given.ComponentvoidProvides proper disposal of the given, appropriate to this hierarchy.WindowReturns the parent component for the given.Componentroot()Returns the root component in this hierarchy.Collection<? extends Container>roots()Returns a collection containing only the rootin this hierarchy.Component
-
Field Details
-
root
-
list
-
hierarchy
-
-
Constructor Details
-
SingleComponentHierarchy
Creates a newSingleComponentHierarchy.- Parameters:
root- the root component for this hierarchyhierarchy- the base component hierarchy.
-
-
Method Details
-
root
Returns the root component in this hierarchy.- Returns:
- the root component in this hierarchy.
-
parentOf
Returns the parent component for the given.Component- Specified by:
parentOfin interfaceComponentHierarchy- Parameters:
c- the givenComponent.- Returns:
- the parent component for the given
.Component
-
roots
Returns a collection containing only the rootin this hierarchy.Component- Specified by:
rootsin interfaceComponentHierarchy- Returns:
- a collection containing only the root
in this hierarchy.Component
-
childrenOf
Returns all sub-components of the given.Component- Specified by:
childrenOfin interfaceComponentHierarchy- Parameters:
c- the given component.- Returns:
- all sub-components of the given
.Component
-
contains
Returns whether the hierarchy contains the given.Component- Specified by:
containsin interfaceComponentHierarchy- Parameters:
c- the given component.- Returns:
- whether the hierarchy contains the given
.Component
-
dispose
Provides proper disposal of the given, appropriate to this hierarchy. After disposal, theWindowand its descendants will no longer be reachable from this hierarchy.Window- Specified by:
disposein interfaceComponentHierarchy- Parameters:
w- the window to dispose.
-