bibliothek.gui.dock.control
Class FocusController

java.lang.Object
  extended by bibliothek.gui.dock.control.FocusController
All Implemented Interfaces:
DockRegisterListener

public class FocusController
extends Object
implements DockRegisterListener

A listener to the DockRegister, ensuring that always the newest or a visible Dockable has the focus.

Author:
Benjamin Sigg

Constructor Summary
FocusController(DockController controller)
          Creates a new focus-controller.
 
Method Summary
 void dockableCycledRegister(DockController controller, Dockable dockable)
          Invoked when dockable was added and removed from the controller, or was removed and added again to controller.
 void dockableRegistered(DockController controller, Dockable dockable)
          Invoked after a Dockable was registered.
 void dockableRegistering(DockController controller, Dockable dockable)
          Invoked right before the dockable is registered in the controller.
 void dockableUnregistered(DockController controller, Dockable dockable)
          Invoked after dockable has been unregistered from controller.
 void dockStationRegistered(DockController controller, DockStation station)
          Invoked after a DockStation was registered.
 void dockStationRegistering(DockController controller, DockStation station)
          Invoked right before the station is registered in the controller.
 void dockStationUnregistered(DockController controller, DockStation station)
          Invoked after station has been unregistered from controller.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FocusController

public FocusController(DockController controller)
Creates a new focus-controller.

Parameters:
controller - the controller whose focused Dockable might be changed.
Method Detail

dockStationRegistered

public void dockStationRegistered(DockController controller,
                                  DockStation station)
Description copied from interface: DockRegisterListener
Invoked after a DockStation was registered. This method can be called while a Dockable is dragged. See the method DockController.isOnMove().

Specified by:
dockStationRegistered in interface DockRegisterListener
Parameters:
controller - the controller where station was added
station - the DockStation that was added

dockStationUnregistered

public void dockStationUnregistered(DockController controller,
                                    DockStation station)
Description copied from interface: DockRegisterListener
Invoked after station has been unregistered from controller. Note that this method can be invoked while a Dockable is dragged, use the method DockController.isOnMove().

Specified by:
dockStationUnregistered in interface DockRegisterListener
Parameters:
controller - the controller from where dockable was removed
station - the removed DockStation

dockableUnregistered

public void dockableUnregistered(DockController controller,
                                 Dockable dockable)
Description copied from interface: DockRegisterListener
Invoked after dockable has been unregistered from controller. Note that this method can be invoked while a Dockable is dragged, use the method DockController.isOnMove().

Specified by:
dockableUnregistered in interface DockRegisterListener
Parameters:
controller - the controller from where dockable was removed
dockable - the removed Dockable

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
Parameters:
controller - the controller who does not yet know station.
station - the station who does not yet know controller.

dockableRegistered

public void dockableRegistered(DockController controller,
                               Dockable dockable)
Description copied from interface: DockRegisterListener
Invoked after a Dockable was registered. Note that this method can be called while a Dockable is dragged. See the method DockController.isOnMove().

Specified by:
dockableRegistered in interface DockRegisterListener
Parameters:
controller - the controller where dockable was added
dockable - the Dockable that was added

dockableRegistering

public void dockableRegistering(DockController controller,
                                Dockable dockable)
Description copied from interface: DockRegisterListener
Invoked right before the dockable is registered in the controller.

Specified by:
dockableRegistering in interface DockRegisterListener
Parameters:
controller - the controller who does not yet know dockable.
dockable - the dockable who does not yet know controller.

dockableCycledRegister

public void dockableCycledRegister(DockController controller,
                                   Dockable dockable)
Description copied from interface: DockRegisterListener
Invoked when dockable was added and removed from the controller, or was removed and added again to controller. This method is only invoked if a call to DockRegisterListener.dockableRegistered(DockController, Dockable) and DockRegisterListener.dockableUnregistered(DockController, Dockable) was suppressed. It is unknown whether dockable is now registered at controller.

Specified by:
dockableCycledRegister in interface DockRegisterListener
Parameters:
controller - the controller whose register dockable cycled
dockable - some Dockable