public class MultiDropTarget extends DropTarget
MultiDropTarget
is associated with a Component
when that Component
wishes to accept drops during Drag and
Drop operations.
Each DropTarget
is associated with a FlavorMap
.
The default FlavorMap
hereafter designates the
FlavorMap
returned by
SystemFlavorMap.getDefaultFlavorMap()
.
DropTarget.DropTargetAutoScroller
Constructor and Description |
---|
MultiDropTarget(Component c,
int ops,
DropTargetListener dtl)
Creates a
MultiDropTarget given the Component
to associate itself with, an int representing the default
acceptable action(s) to support, and a DropTargetListener
to handle event processing. |
Modifier and Type | Method and Description |
---|---|
void |
addDropTargetListener(DropTargetListener dtl) |
void |
dragEnter(DropTargetDragEvent e) |
void |
dragExit(DropTargetEvent e) |
void |
dragOver(DropTargetDragEvent e) |
void |
drop(DropTargetDropEvent e) |
void |
dropActionChanged(DropTargetDragEvent e) |
void |
removeDropTargetListener(DropTargetListener dtl) |
addNotify, clearAutoscroll, createDropTargetAutoScroller, createDropTargetContext, getComponent, getDefaultActions, getDropTargetContext, getFlavorMap, initializeAutoscrolling, isActive, removeNotify, setActive, setComponent, setDefaultActions, setFlavorMap, updateAutoscroll
public MultiDropTarget(Component c, int ops, DropTargetListener dtl)
MultiDropTarget
given the Component
to associate itself with, an int
representing the default
acceptable action(s) to support, and a DropTargetListener
to handle event processing.
The Component will receive drops only if it is enabled.
c
- The Component
with which this
DropTarget
is associatedops
- The default acceptable actions for this
DropTarget
dtl
- The DropTargetListener
for this
DropTarget
HeadlessException
- if GraphicsEnvironment.isHeadless() returns trueGraphicsEnvironment.isHeadless()
public void addDropTargetListener(DropTargetListener dtl)
addDropTargetListener
in class DropTarget
public void removeDropTargetListener(DropTargetListener dtl)
removeDropTargetListener
in class DropTarget
public void dragEnter(DropTargetDragEvent e)
dragEnter
in interface DropTargetListener
dragEnter
in class DropTarget
public void dragOver(DropTargetDragEvent e)
dragOver
in interface DropTargetListener
dragOver
in class DropTarget
public void dragExit(DropTargetEvent e)
dragExit
in interface DropTargetListener
dragExit
in class DropTarget
public void drop(DropTargetDropEvent e)
drop
in interface DropTargetListener
drop
in class DropTarget
public void dropActionChanged(DropTargetDragEvent e)
dropActionChanged
in interface DropTargetListener
dropActionChanged
in class DropTarget
Copyright © 2006–2016 Dirk Lemmermann Software & Consulting. All rights reserved.