当前页面:
在线文档首页 >
NetBeans API Javadoc (Current Development Version)
ExternalDropHandler (Window System API) - NetBeans API Javadoc (Current Development Version)
org.openide.windows
Class ExternalDropHandler
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExternalDropHandler
public ExternalDropHandler()
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.