org.ocd.dcf.dnd
Class DropManager

java.lang.Object
  |
  +--org.ocd.dcf.dnd.DropManager
All Implemented Interfaces:
java.awt.event.AWTEventListener, java.util.EventListener, IDropManager

public class DropManager
extends java.lang.Object
implements IDropManager, java.awt.event.AWTEventListener

<< License Info Goes HERE >> All Rights Reserved. DragListenerAdapter Description:

Since:
$Date: 2002/08/09 02:41:37 $
Version:
$Revision: 1.8 $
Author:
$Author: drichan $

Method Summary
protected  void addWindow(java.awt.Window pWindow)
          Add a Window that will be checked for targets during Drag Operations
 void dragStarted(java.awt.dnd.DragSourceContext pContext, java.awt.Image pDragImage, java.awt.Point pOffSet)
          A DnD Session has been started, using a DragImage OffSet from the Cursor by pImageOffset
 void dragStopped(java.awt.event.MouseEvent pEvent)
          The Dragging Operation has stopped Try and do a Drop if located over a DropTarget
 void eventDispatched(java.awt.AWTEvent event)
          Invoked when an event is dispatched in the AWT.
static java.awt.Image getComponentImage(java.awt.Component pComp)
          Get an Image for a Component
 java.awt.dnd.DragSourceContext getCurrentDragSourceContext()
          Get the DragSourceContext for the current drag operation
 java.awt.datatransfer.Transferable getCurrentTransferable()
          Get the Transferable for the current drag operation
static IDropManager getDropManager()
          Get the Drop Manager Instance
 java.awt.dnd.DropTarget getDropTarget(java.awt.Point pLocation)
          Return a Drop Component for the component at the Current Location This method should search up the component hierarchy until it finds a Drop Target
protected  void moveWindowToTop(java.awt.Window pWin)
          Moves the Window to the top of the window list
protected  void removeWindow(java.awt.Window pWindow)
           
 void setDefaultDropTarget(java.awt.dnd.DropTarget pDropTarget)
          Sets the default drop target if a drag occurs over any item that is not a Drop Target.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDropManager

public static IDropManager getDropManager()
Get the Drop Manager Instance

dragStarted

public void dragStarted(java.awt.dnd.DragSourceContext pContext,
                        java.awt.Image pDragImage,
                        java.awt.Point pOffSet)
A DnD Session has been started, using a DragImage OffSet from the Cursor by pImageOffset
Specified by:
dragStarted in interface IDropManager
Parameters:
pContext - of the Drag Source
pDragImage - Image to display during DnD operation
pImageOffset - offSet of image location from Cursor or null to use Drag Component's Location

dragStopped

public void dragStopped(java.awt.event.MouseEvent pEvent)
The Dragging Operation has stopped Try and do a Drop if located over a DropTarget
Parameters:
MouseEvent - where the mouse was released

getCurrentTransferable

public java.awt.datatransfer.Transferable getCurrentTransferable()
Get the Transferable for the current drag operation
Specified by:
getCurrentTransferable in interface IDropManager
Returns:
Transferable

getCurrentDragSourceContext

public java.awt.dnd.DragSourceContext getCurrentDragSourceContext()
Get the DragSourceContext for the current drag operation
Specified by:
getCurrentDragSourceContext in interface IDropManager
Returns:
DragSourceContext

getComponentImage

public static java.awt.Image getComponentImage(java.awt.Component pComp)
Get an Image for a Component
Returns:
Image

addWindow

protected void addWindow(java.awt.Window pWindow)
Add a Window that will be checked for targets during Drag Operations
Parameters:
pWindow - window that will be checked

removeWindow

protected void removeWindow(java.awt.Window pWindow)

moveWindowToTop

protected void moveWindowToTop(java.awt.Window pWin)
Moves the Window to the top of the window list
Parameters:
pWin -  

setDefaultDropTarget

public void setDefaultDropTarget(java.awt.dnd.DropTarget pDropTarget)
Sets the default drop target if a drag occurs over any item that is not a Drop Target. This should usually be the desktop of the system.
Specified by:
setDefaultDropTarget in interface IDropManager
Parameters:
default - Drop Target

getDropTarget

public java.awt.dnd.DropTarget getDropTarget(java.awt.Point pLocation)
Return a Drop Component for the component at the Current Location This method should search up the component hierarchy until it finds a Drop Target
Specified by:
getDropTarget in interface IDropManager
Parameters:
Location - look for the Drop Target in Screen Corrdinates

eventDispatched

public void eventDispatched(java.awt.AWTEvent event)
Invoked when an event is dispatched in the AWT.
Specified by:
eventDispatched in interface java.awt.event.AWTEventListener