bibliothek.gui.dock.common.intern
Class DelayedWorkingAreaSetter

java.lang.Object
  extended by bibliothek.gui.dock.event.DockRegisterAdapter
      extended by bibliothek.gui.dock.common.intern.DelayedWorkingAreaSetter
All Implemented Interfaces:
DockRegisterListener

@FrameworkOnly
public class DelayedWorkingAreaSetter
extends DockRegisterAdapter

A DelayedWorkingAreaSetter is a listener that is added to a CControl and waits until a CStation with a specific identifier is registered. It then calls CDockable.setWorkingArea(CStation) with this station. This listener automatically removes itself once its mission is over.

Author:
Benjamin Sigg

Constructor Summary
DelayedWorkingAreaSetter(String area, CDockable dockable, CControl control)
          Creates a new setter.
 
Method Summary
 void dockStationRegistering(DockController controller, DockStation station)
          Invoked right before the station is registered in the controller.
 void install()
           
 void registerUnstalled(DockController controller)
          Called if the DockRegister from controller is no longer stalled, this method is called before the pending events are fired.
 void uninstall()
          Removes all listeners this DelayedWorkingAreaSetter has added anywhere.
 
Methods inherited from class bibliothek.gui.dock.event.DockRegisterAdapter
dockableCycledRegister, dockableRegistered, dockableRegistering, dockableUnregistered, dockStationRegistered, dockStationUnregistered, registerStalled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelayedWorkingAreaSetter

public DelayedWorkingAreaSetter(String area,
                                CDockable dockable,
                                CControl control)
Creates a new setter.

Parameters:
area - the CStation for which to search
dockable - the element whose working area should be set
control - the control to monitor
Method Detail

install

public void install()

uninstall

public void uninstall()
Removes all listeners this DelayedWorkingAreaSetter has added anywhere.


dockStationRegistering

public void dockStationRegistering(DockController controller,
                                   DockStation station)
Description copied from interface: DockRegisterListener
Invoked right before the station is registered in the controller.

Specified by:
dockStationRegistering in interface DockRegisterListener
Overrides:
dockStationRegistering in class DockRegisterAdapter
Parameters:
controller - the controller who does not yet know station.
station - the station who does not yet know controller.

registerUnstalled

public void registerUnstalled(DockController controller)
Description copied from interface: DockRegisterListener
Called if the DockRegister from controller is no longer stalled, this method is called before the pending events are fired.

Specified by:
registerUnstalled in interface DockRegisterListener
Overrides:
registerUnstalled in class DockRegisterAdapter
Parameters:
controller - the controller whose register is no longer stalled