public class BasicDropHandler extends DropTarget
Component.setDropTarget(java.awt.dnd.DropTarget)
method to override the
one which is installed with it (which probably comes from the basic UI).DropTarget.DropTargetAutoScroller
Constructor and Description |
---|
BasicDropHandler(JComponent comp)
Constructs a new drop handler for use with a given component.
|
Modifier and Type | Method and Description |
---|---|
void |
dragEnter(DropTargetDragEvent evt) |
void |
dragExit(DropTargetEvent evt) |
void |
dragOver(DropTargetDragEvent evt) |
void |
drop(DropTargetDropEvent evt) |
protected boolean |
isDropLocation(Point loc)
Indicates whether a given location is permissible for a drop event.
|
addDropTargetListener, addNotify, clearAutoscroll, createDropTargetAutoScroller, createDropTargetContext, dropActionChanged, getComponent, getDefaultActions, getDropTargetContext, getFlavorMap, initializeAutoscrolling, isActive, removeDropTargetListener, removeNotify, setActive, setComponent, setDefaultActions, setFlavorMap, updateAutoscroll
public BasicDropHandler(JComponent comp)
comp
- the component which this drop handler will controlpublic void dragEnter(DropTargetDragEvent evt)
dragEnter
in interface DropTargetListener
dragEnter
in class DropTarget
public void dragOver(DropTargetDragEvent evt)
dragOver
in interface DropTargetListener
dragOver
in class DropTarget
public void dragExit(DropTargetEvent evt)
dragExit
in interface DropTargetListener
dragExit
in class DropTarget
public void drop(DropTargetDropEvent evt)
drop
in interface DropTargetListener
drop
in class DropTarget
protected boolean isDropLocation(Point loc)
loc
- the point at which a drop might take placetrue
iff it's OK to drop at loc
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.