org.flexdock.docking.event.hierarchy
Class DockingPortTracker

java.lang.Object
  extended by org.flexdock.docking.event.hierarchy.DockingPortTracker
All Implemented Interfaces:
HierarchyListener, EventListener

public class DockingPortTracker
extends Object
implements HierarchyListener

Author:
Christopher Butler, Karl Schaefer

Constructor Summary
DockingPortTracker()
           
 
Method Summary
 void dockingPortAdded(RootWindow window, DockingPort port)
           
 void dockingPortRemoved(RootWindow window, DockingPort port)
           
static DockingPort findById(String portId)
           
static DockingPort findByWindow(Component comp)
          Returns the DockingPort for comp.
static DockingPort findByWindow(RootWindow window)
           
static Set getDockingPorts()
           
static Set getDockingWindows()
           
static HierarchyListener getInstance()
           
static DockingPort getRootDockingPort(Dockable dockable)
           
static RootDockingPortInfo getRootDockingPortInfo(Component c)
           
static RootDockingPortInfo getRootDockingPortInfo(RootWindow window)
           
static Set getRootDockingPorts()
           
 void hierarchyChanged(HierarchyEvent evt)
           
static void remove(Component c)
           
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 HierarchyListener getInstance()

remove

public static void remove(Component c)

getRootDockingPortInfo

public static RootDockingPortInfo getRootDockingPortInfo(Component c)

getRootDockingPortInfo

public static RootDockingPortInfo getRootDockingPortInfo(RootWindow window)

findById

public static DockingPort findById(String portId)

findByWindow

public static DockingPort findByWindow(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(HierarchyEvent evt)
Specified by:
hierarchyChanged in interface HierarchyListener

dockingPortAdded

public void dockingPortAdded(RootWindow window,
                             DockingPort port)

dockingPortRemoved

public void dockingPortRemoved(RootWindow window,
                               DockingPort port)

getDockingWindows

public static Set getDockingWindows()

getDockingPorts

public static Set getDockingPorts()

getRootDockingPorts

public static Set getRootDockingPorts()

getRootDockingPort

public static DockingPort getRootDockingPort(Dockable dockable)