com.samskivert.swing.dnd
Interface DropTarget

All Known Subinterfaces:
AutoscrollingDropTarget

public interface DropTarget

A drop target is associated with a component and represents a valid place to end a drag and drop.


Method Summary
 boolean checkDrop(DragSource source, Object peekdata)
          Return true if the specified drop should be allowed on this target.
 void dropCompleted(DragSource source, Object data, Point pos)
          Called when the drop is actually executed.
 void noDrop()
          Called to let the DropTarget know that we've stopped hovering over but did not actually drop.
 

Method Detail

checkDrop

boolean checkDrop(DragSource source,
                  Object peekdata)
Return true if the specified drop should be allowed on this target. Also indicates that a hover has started in case the drop target would like to create dragover feedback aside from the cursor feedback. Called after and only if the DragSource's checkDrop returned true. If this method returns true then either dropCompleted(com.samskivert.swing.dnd.DragSource, java.lang.Object, java.awt.Point) or noDrop() will be called next.


noDrop

void noDrop()
Called to let the DropTarget know that we've stopped hovering over but did not actually drop.


dropCompleted

void dropCompleted(DragSource source,
                   Object data,
                   Point pos)
Called when the drop is actually executed.

Parameters:
pos - the location of the drop in screen coordinates


Copyright © 2000-2008 Michael Bayne. All Rights Reserved.