net.infonode.docking
Class WindowDragger

java.lang.Object
  extended by net.infonode.docking.WindowDragger
All Implemented Interfaces:
DockingWindowDragger

 class WindowDragger
extends java.lang.Object
implements DockingWindowDragger

Version:
$Revision: 1.30 $
Author:
$Author: jesper $

Field Summary
private  DockingWindow dragWindow
           
private  DropAction dropAction
           
private  RootWindow rootWindow
           
 
Constructor Summary
WindowDragger(DockingWindow dragWindow)
           
WindowDragger(DockingWindow dragWindow, RootWindow rootWindow)
           
 
Method Summary
 void abortDrag()
          Aborts this drag operation.
 void dragWindow(java.awt.event.MouseEvent mouseEvent)
          Drags the window to a new location.
 void dropWindow(java.awt.event.MouseEvent mouseEvent)
          Drops the window at the specified location.
private  DockingWindow getDeepestWindowAt(java.awt.Component component, int x, int y)
           
 DockingWindow getDragWindow()
          The window that is dragged and dropped.
 RootWindow getDropTarget()
          Returns the RootWindow where the window can be dropped.
private  void stopDrag()
           
(package private)  void undoDrag(DropAction newAction)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dragWindow

private DockingWindow dragWindow

dropAction

private DropAction dropAction

rootWindow

private RootWindow rootWindow
Constructor Detail

WindowDragger

WindowDragger(DockingWindow dragWindow)

WindowDragger

WindowDragger(DockingWindow dragWindow,
              RootWindow rootWindow)
Method Detail

getDragWindow

public DockingWindow getDragWindow()
Description copied from interface: DockingWindowDragger
The window that is dragged and dropped.

Specified by:
getDragWindow in interface DockingWindowDragger
Returns:
the window that is dragged and dropped.

getDropTarget

public RootWindow getDropTarget()
Description copied from interface: DockingWindowDragger
Returns the RootWindow where the window can be dropped.

Specified by:
getDropTarget in interface DockingWindowDragger
Returns:
the RootWindow where the window can be dropped

undoDrag

void undoDrag(DropAction newAction)

stopDrag

private void stopDrag()

abortDrag

public void abortDrag()
Description copied from interface: DockingWindowDragger
Aborts this drag operation.

Specified by:
abortDrag in interface DockingWindowDragger

dropWindow

public void dropWindow(java.awt.event.MouseEvent mouseEvent)
Description copied from interface: DockingWindowDragger
Drops the window at the specified location.

Specified by:
dropWindow in interface DockingWindowDragger
Parameters:
mouseEvent - the mouse event that caused the drop

dragWindow

public void dragWindow(java.awt.event.MouseEvent mouseEvent)
Description copied from interface: DockingWindowDragger
Drags the window to a new location. The location is relative to the RootWindow in where it should be dropped, see DockingWindowDragger.getDropTarget().

Specified by:
dragWindow in interface DockingWindowDragger
Parameters:
mouseEvent - the mouse event that caused the drag

getDeepestWindowAt

private DockingWindow getDeepestWindowAt(java.awt.Component component,
                                         int x,
                                         int y)