bibliothek.gui.dock.station.screen.magnet
Interface MagnetStrategy

All Known Implementing Classes:
DefaultMagnetStrategy

public interface MagnetStrategy

The MagnetStrategy is used by the MagnetController to define how exactly two ScreenDockWindows behave that are attracting each other.

Author:
Benjamin Sigg

Method Summary
 void install(MagnetController controller)
          Informs this MagnetStrategy that it will be used by controller.
 MagnetOperation start(MagnetController controller, MagnetRequest request)
          Called by controller after a ScreenDockWindow moved or changed its size (or both).
 void uninstall(MagnetController controller)
          Informs this MagnetStrategy that it is no longer used by controller.
 

Method Detail

install

void install(MagnetController controller)
Informs this MagnetStrategy that it will be used by controller.

Parameters:
controller - the controller using this strategy, not null

uninstall

void uninstall(MagnetController controller)
Informs this MagnetStrategy that it is no longer used by controller.

Parameters:
controller - the controller which no longer uses this strategy

start

MagnetOperation start(MagnetController controller,
                      MagnetRequest request)
Called by controller after a ScreenDockWindow moved or changed its size (or both). This method creates a new MagnetOperation which is tied to request. The MagnetOperation will then find out which Dockable is attracted to which other Dockable.

Parameters:
controller - the caller of this method, may be used to find other ScreenDockWindows
request - detailed information about the event