public class DnDSupport extends java.lang.Object implements DnDTarget, DnDSource, DnDDropHandler.WithResult, Disposable
DnDDropHandler.WithResultDisposable.Parent| Modifier and Type | Method and Description |
|---|---|
boolean |
canStartDragging(DnDAction action,
java.awt.Point dragOrigin) |
void |
cleanUpOnLeave() |
static DnDSupportBuilder |
createBuilder(javax.swing.JComponent component) |
Pair<java.awt.Image,java.awt.Point> |
createDraggedImage(DnDAction action,
java.awt.Point dragOrigin) |
void |
dispose()
Usually not invoked directly, see class javadoc.
|
void |
dragDropEnd() |
void |
dropActionChanged(int gestureModifiers) |
boolean |
possiblyDrop(DnDEvent aEvent) |
DnDDragStartBean |
startDragging(DnDAction action,
java.awt.Point dragOrigin) |
boolean |
update(DnDEvent event) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitupdateDraggedImagecreateDraggedImagedroppublic boolean canStartDragging(DnDAction action, java.awt.Point dragOrigin)
canStartDragging in interface DnDSourcepublic DnDDragStartBean startDragging(DnDAction action, java.awt.Point dragOrigin)
startDragging in interface DnDSourcepublic Pair<java.awt.Image,java.awt.Point> createDraggedImage(DnDAction action, java.awt.Point dragOrigin)
createDraggedImage in interface DnDSourcepublic void dragDropEnd()
dragDropEnd in interface DnDSourcepublic void dropActionChanged(int gestureModifiers)
dropActionChanged in interface DnDDropActionHandlerdropActionChanged in interface DnDSourcepublic boolean update(DnDEvent event)
update in interface DnDTargetCheckerevent - Drag-n-Drop eventtrue - if this target is unable to handle the event and parent component should be asked to process it.
false - if this target is able to handle the event and parent component should NOT be asked to process it.DnDEvent.setDropPossible(boolean, String),
DnDEvent.setDropPossible(String, DropActionHandler)public boolean possiblyDrop(DnDEvent aEvent)
possiblyDrop in interface DnDDropHandler.WithResulttrue if drop succeededpublic void cleanUpOnLeave()
cleanUpOnLeave in interface DnDTargetpublic void dispose()
Disposabledispose in interface Disposablepublic static DnDSupportBuilder createBuilder(javax.swing.JComponent component)