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 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 Details

    • 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.