org.flexdock.docking.event.hierarchy

## Class DockingPortTracker

- java.lang.Object
- - org.flexdock.docking.event.hierarchy.DockingPortTracker

- All Implemented Interfaces:
    java.awt.event.HierarchyListener, java.util.EventListener

      public class DockingPortTracker
      extends java.lang.Object
      implements java.awt.event.HierarchyListener

  Author:
    Christopher Butler, Karl Schaefer

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DockingPortTracker()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `dockingPortAdded(RootWindow window, DockingPort port)`
    `void` | `dockingPortRemoved(RootWindow window, DockingPort port)`
    `static DockingPort` | `findById(java.lang.String portId)`
    `static DockingPort` | `findByWindow(java.awt.Component comp)` Returns the `DockingPort` for `comp`.
    `static DockingPort` | `findByWindow(RootWindow window)`
    `static java.util.Set` | `getDockingPorts()`
    `static java.util.Set` | `getDockingWindows()`
    `static java.awt.event.HierarchyListener` | `getInstance()`
    `static DockingPort` | `getRootDockingPort(Dockable dockable)`
    `static RootDockingPortInfo` | `getRootDockingPortInfo(java.awt.Component c)`
    `static RootDockingPortInfo` | `getRootDockingPortInfo(RootWindow window)`
    `static java.util.Set` | `getRootDockingPorts()`
    `void` | `hierarchyChanged(java.awt.event.HierarchyEvent evt)`
    `static void` | `updateIndex(DockingPort port)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DockingPortTracker

          public DockingPortTracker()

  - ### Method Detail

    - #### getInstance

          public static java.awt.event.HierarchyListener getInstance()

    - #### getRootDockingPortInfo

          public static RootDockingPortInfo getRootDockingPortInfo(java.awt.Component c)

    - #### getRootDockingPortInfo

          public static RootDockingPortInfo getRootDockingPortInfo(RootWindow window)

    - #### findById

          public static DockingPort findById(java.lang.String portId)

    - #### findByWindow

          public static DockingPort findByWindow(java.awt.Component comp)

      Returns the `DockingPort` for `comp`. If `comp` is `null`, then this method returns `null`.
      Parameters:
        `comp` - the component for which to find the root docking port.
      Returns:
        the eldest docking port for `comp`, or `null` if `comp` is `null` or has no `DockingPort` ancestor.

    - #### findByWindow

          public static DockingPort findByWindow(RootWindow window)

    - #### updateIndex

          public static void updateIndex(DockingPort port)

    - #### hierarchyChanged

          public void hierarchyChanged(java.awt.event.HierarchyEvent evt)

      Specified by:
        `hierarchyChanged` in interface `java.awt.event.HierarchyListener`

    - #### dockingPortAdded

          public void dockingPortAdded(RootWindow window,
                              DockingPort port)

    - #### dockingPortRemoved

          public void dockingPortRemoved(RootWindow window,
                                DockingPort port)

    - #### getDockingWindows

          public static java.util.Set getDockingWindows()

    - #### getDockingPorts

          public static java.util.Set getDockingPorts()

    - #### getRootDockingPorts

          public static java.util.Set getRootDockingPorts()

    - #### getRootDockingPort

          public static DockingPort getRootDockingPort(Dockable dockable)