org.fest.swing.hierarchy
Interface ComponentHierarchy

All Known Implementing Classes:
ExistingHierarchy, NewHierarchy, SingleComponentHierarchy

@RunsInCurrentThread
public interface ComponentHierarchy

Understands access to all components in a hierarchy.

Note: methods in this interface are not guaranteed to be executed in the event dispatch thread (EDT.) Clients are responsible for invoking them in the EDT.

Author:
Alex Ruiz, Yvonne Wang

Method Summary
 Collection<Component> childrenOf(Component c)
          Returns all sub-components of the given component.
 boolean contains(Component c)
          Returns whether this hierarchy contains the given component.
 void dispose(Window w)
          Provides proper disposal of the given window, appropriate to this hierarchy.
 Container parentOf(Component c)
          Return the parent for the given component.
 Collection<? extends Container> roots()
          Provides all root containers in the hierarchy.
 

Method Detail

roots

Collection<? extends Container> roots()
Provides all root containers in the hierarchy.

Returns:
all root containers in the hierarchy.

childrenOf

Collection<Component> childrenOf(Component c)
Returns all sub-components of the given component.

Parameters:
c - the given component.
Returns:
all sub-components of the given component.

parentOf

Container parentOf(Component c)
Return the parent for the given component.

Parameters:
c - the given component.
Returns:
the parent for the given component.

contains

boolean contains(Component c)
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

void dispose(Window w)
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.


Copyright © 2007-2011 FEST (Fixtures for Easy Software Testing). All Rights Reserved.