org.openide.windows 6.33.1

org.openide.windows
Class ExternalDropHandler

java.lang.Object
  extended by org.openide.windows.ExternalDropHandler

public abstract class ExternalDropHandler
extends Object

When an implementation of this class is available in the global Lookup and an object is being dragged over some parts of the main window of the IDE then the window system may call methods of this class to decide whether it can accept or reject the drag operation. And when the object is actually dropped into the IDE then this class will be asked to handle the drop.

Since:
6.7

Constructor Summary
ExternalDropHandler()
           
 
Method Summary
abstract  boolean canDrop(DropTargetDragEvent e)
           
abstract  boolean canDrop(DropTargetDropEvent e)
          This method is called when the dragged object is already dropped to decide whether the drop can be accepted.
abstract  boolean handleDrop(DropTargetDropEvent e)
          When an object is dropped into the IDE this method must process it (e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExternalDropHandler

public ExternalDropHandler()
Method Detail

canDrop

public abstract boolean canDrop(DropTargetDragEvent e)
Returns:
True if the dragged object can be dropped into the IDE, false if the DataFlavor(s) are not supported.

canDrop

public abstract boolean canDrop(DropTargetDropEvent e)
This method is called when the dragged object is already dropped to decide whether the drop can be accepted.

Returns:
True if the dropped object is supported (i.e. handleDrop method can process the object), false otherwise.

handleDrop

public abstract boolean handleDrop(DropTargetDropEvent e)
When an object is dropped into the IDE this method must process it (e.g. open the dropped file in a new editor tab).

Returns:
True if the dropped object was processed successfully, false otherwise.

org.openide.windows 6.33.1

Built on April 28 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.