Hierarchy.java :  » Testing » abbot-1.0.1 » abbot » finder » Java Open Source

Java Open Source » Testing » abbot 1.0.1 
abbot 1.0.1 » abbot » finder » Hierarchy.java
package abbot.finder;

import java.awt.Component;
import java.awt.Container;
import java.awt.Window;
import java.util.Collection;

/** Provides access to all components in a hierarchy. */
public interface Hierarchy {
    /** Provides all root components in the hierarchy.  Similar to
     * Frame.getFrames().
    Collection getRoots();
    /** Returns all sub-components of the given component.  What constitutes a
     * sub-component may vary depending on the Hierarchy implementation.
    Collection getComponents(Component c);
    /** Return the parent component for the given Component. */
    Container getParent(Component c);
    /** Returns whether the hierarchy contains the given Component. */
    boolean contains(Component c);
    /** Provide proper disposal of the given Window, appropriate to this
     * Hierarchy.  After disposal, the Window and its descendents will no
     * longer be reachable from this Hierarchy.
    void dispose(Window w);
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.