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


public interface MagnetizedOperation

A callback used by ScreenDockWindows to calculate the attraction between two ScreenDockWindows.

Author:
Benjamin Sigg

Method Summary
 Rectangle attract(Rectangle bounds)
          To be called by a ScreenDockWindow if the user updates the size or location of the window.
 void stop()
          To be called by a ScreenDockWindow once moving or resizing is finished.
 

Method Detail

attract

Rectangle attract(Rectangle bounds)
To be called by a ScreenDockWindow if the user updates the size or location of the window. This method calculates then to which other windows an attraction may exist.

Parameters:
bounds - the boundaries the window would have if the operation would stop right now.
Returns:
the boundaries the window would have if attraction is respected, never null

stop

void stop()
To be called by a ScreenDockWindow once moving or resizing is finished.