JHotDraw 6.0b1

org.jhotdraw.contrib.dnd
Class JHDDropTargetListener

java.lang.Object
  extended by org.jhotdraw.contrib.dnd.JHDDropTargetListener
All Implemented Interfaces:
java.awt.dnd.DropTargetListener, java.util.EventListener

public class JHDDropTargetListener
extends java.lang.Object
implements java.awt.dnd.DropTargetListener


Nested Class Summary
static class JHDDropTargetListener.AddUndoActivity
           
 
Constructor Summary
JHDDropTargetListener(DrawingEditor drawingEditor, DrawingView drawingView)
          Creates a new instance of JHDDropTargetListener
 
Method Summary
protected  Undoable createTargetUndoActivity(DrawingView view)
          Factory method for undo activity
 void dragEnter(java.awt.dnd.DropTargetDragEvent dtde)
          Called when a drag operation has encountered the DropTarget.
 void dragExit(java.awt.dnd.DropTargetEvent dte)
          The drag operation has departed the DropTarget without dropping.
 void dragOver(java.awt.dnd.DropTargetDragEvent dtde)
          Called when a drag operation is ongoing on the DropTarget.
 void drop(java.awt.dnd.DropTargetDropEvent dtde)
          The drag operation has terminated with a drop on this DropTarget.
 void dropActionChanged(java.awt.dnd.DropTargetDragEvent dtde)
          Called if the user has modified the current drop gesture.
protected  DrawingEditor editor()
           
protected  Undoable getTargetUndoActivity()
           
protected  void setTargetUndoActivity(Undoable undoable)
           
protected  boolean supportDropTargetDragEvent(java.awt.dnd.DropTargetDragEvent dtde)
          Tests wether the Drag event is of a type that we support handling Check the DND interface and support the events it says it supports if not a dnd interface comp, then dont support! because we dont even really know what kind of view it is.
protected  DrawingView view()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JHDDropTargetListener

public JHDDropTargetListener(DrawingEditor drawingEditor,
                             DrawingView drawingView)
Creates a new instance of JHDDropTargetListener

Method Detail

view

protected DrawingView view()

editor

protected DrawingEditor editor()

dragEnter

public void dragEnter(java.awt.dnd.DropTargetDragEvent dtde)
Called when a drag operation has encountered the DropTarget.

Specified by:
dragEnter in interface java.awt.dnd.DropTargetListener

dragExit

public void dragExit(java.awt.dnd.DropTargetEvent dte)
The drag operation has departed the DropTarget without dropping.

Specified by:
dragExit in interface java.awt.dnd.DropTargetListener

dragOver

public void dragOver(java.awt.dnd.DropTargetDragEvent dtde)
Called when a drag operation is ongoing on the DropTarget.

Specified by:
dragOver in interface java.awt.dnd.DropTargetListener

drop

public void drop(java.awt.dnd.DropTargetDropEvent dtde)
The drag operation has terminated with a drop on this DropTarget. Be nice to somehow incorporate FigureTransferCommand here.

Specified by:
drop in interface java.awt.dnd.DropTargetListener

dropActionChanged

public void dropActionChanged(java.awt.dnd.DropTargetDragEvent dtde)
Called if the user has modified the current drop gesture.

Specified by:
dropActionChanged in interface java.awt.dnd.DropTargetListener

supportDropTargetDragEvent

protected boolean supportDropTargetDragEvent(java.awt.dnd.DropTargetDragEvent dtde)
Tests wether the Drag event is of a type that we support handling Check the DND interface and support the events it says it supports if not a dnd interface comp, then dont support! because we dont even really know what kind of view it is.


createTargetUndoActivity

protected Undoable createTargetUndoActivity(DrawingView view)
Factory method for undo activity


setTargetUndoActivity

protected void setTargetUndoActivity(Undoable undoable)

getTargetUndoActivity

protected Undoable getTargetUndoActivity()

JHotDraw 6.0b1