|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.station.screen.magnet.DefaultMagnetOperation
public class DefaultMagnetOperation
The DefaultMagnetOperation
searches the nearest attracted ScreenDockWindow
to a moved side
and if that other window is nearer than a given threshold then the moved window is attracted.
Constructor Summary | |
---|---|
DefaultMagnetOperation(int threshold)
Creates a new operation |
Method Summary | |
---|---|
void |
attract(MagnetController controller,
MagnetRequest request)
Called by controller after a ScreenDockWindow moved or changed
its size (or both). |
void |
destroy()
Called once the operation is no longer needed. |
protected void |
moved(MagnetController controller,
MagnetRequest request)
Called if a window was moved. |
protected void |
resized(MagnetController controller,
MagnetRequest request)
Called if a window was resized. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultMagnetOperation(int threshold)
threshold
- the maximum distance between two items in pixels allowing them to interact with each otherMethod Detail |
---|
public void attract(MagnetController controller, MagnetRequest request)
MagnetOperation
controller
after a ScreenDockWindow
moved or changed
its size (or both). This method has to find out whether the window is attracted to another
window and if so it must call one of the attract
methods of request
.
attract
in interface MagnetOperation
controller
- the caller of this method, may be used to find other ScreenDockWindow
srequest
- detailed information about the eventpublic void destroy()
MagnetOperation
destroy
in interface MagnetOperation
protected void moved(MagnetController controller, MagnetRequest request)
controller
- the callerrequest
- information about the window that was movedprotected void resized(MagnetController controller, MagnetRequest request)
controller
- the callerrequest
- information about the window that was resized
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |