public final class SingleComponentHierarchy extends Object implements ComponentHierarchy
Component as root.| Constructor and Description |
|---|
SingleComponentHierarchy(Container root,
ComponentHierarchy hierarchy)
Creates a new
SingleComponentHierarchy. |
| Modifier and Type | Method and Description |
|---|---|
Collection<Component> |
childrenOf(Component c)
Returns all sub-components of the given
. |
boolean |
contains(Component c)
Returns whether the hierarchy contains the given
. |
void |
dispose(Window w)
Provides proper disposal of the given
, appropriate to this hierarchy. |
Container |
parentOf(Component c)
Returns the parent component for the given
. |
Container |
root()
Returns the root component in this hierarchy.
|
Collection<? extends Container> |
roots()
Returns a collection containing only the root
in this hierarchy. |
public SingleComponentHierarchy(Container root, ComponentHierarchy hierarchy)
SingleComponentHierarchy.root - the root component for this hierarchyhierarchy - the base component hierarchy.public Container root()
public Container parentOf(Component c)
Component.parentOf in interface ComponentHierarchyc - the given Component.Component.public Collection<? extends Container> roots()
Component in this hierarchy.roots in interface ComponentHierarchyComponent in this hierarchy.public Collection<Component> childrenOf(Component c)
Component.childrenOf in interface ComponentHierarchyc - the given component.Component.public boolean contains(Component c)
Component.contains in interface ComponentHierarchyc - the given component.Component.public void dispose(Window w)
Window, appropriate to this hierarchy. After disposal,
the Window and its descendants will no longer be reachable from this hierarchy.dispose in interface ComponentHierarchyw - the window to dispose.Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.