java.lang.Objectjava.awt.dnd.DropTarget
All Implemented Interfaces:
Serializable, DropTargetListener
Direct Known Subclasses:
SwingDropTarget
DropTarget 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().
1.2 - | Nested Class Summary: | ||
|---|---|---|
| protected static class | DropTarget.DropTargetAutoScroller | / /** this protected nested class implements autoscrolling |
| Field Summary | ||
|---|---|---|
| int | actions | Default permissible actions supported by this DropTarget.
|
| boolean | active | true if the DropTarget is accepting Drag & Drop operations.
|
| Constructor: |
|---|
DropTarget.
|
DropTarget given the Component
to associate itself with, and the DropTargetListener
to handle event processing.
The Component will receive drops only if it is enabled.
|
DropTarget 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.
|
DropTarget given the Component
to associate itself with, an int representing
the default acceptable action(s)
to support, a DropTargetListener
to handle event processing, and a boolean indicating
if the DropTarget is currently accepting drops.
The Component will receive drops only if it is enabled.
|
Component
to associate itself with, an int representing
the default acceptable action(s) to
support, a DropTargetListener
to handle event processing, a boolean indicating
if the DropTarget is currently accepting drops, and
a FlavorMap to use (or null for the default FlavorMap).
The Component will receive drops only if it is enabled.
|
| Method from java.awt.dnd.DropTarget Summary: |
|---|
| addDropTargetListener, addNotify, clearAutoscroll, createDropTargetAutoScroller, createDropTargetContext, doSetDefaultActions, dragEnter, dragExit, dragOver, drop, dropActionChanged, getComponent, getDefaultActions, getDropTargetContext, getFlavorMap, initializeAutoscrolling, isActive, removeDropTargetListener, removeNotify, setActive, setComponent, setDefaultActions, setFlavorMap, updateAutoscroll |
| Methods from java.lang.Object: |
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from java.awt.dnd.DropTarget Detail: |
|---|
DropTargetListener (UNICAST SOURCE).
|
|
|
|
|
|
dragEnter on the registered
DropTargetListener and passes it
the specified DropTargetDragEvent.
Has no effect if this DropTarget
is not active. |
dragExit on the registered
DropTargetListener and passes it
the specified DropTargetEvent.
Has no effect if this DropTarget
is not active.
This method itself does not throw any exception for null parameter but for exceptions thrown by the respective method of the listener. |
dragOver on the registered
DropTargetListener and passes it
the specified DropTargetDragEvent.
Has no effect if this DropTarget
is not active. |
drop on the registered
DropTargetListener and passes it
the specified DropTargetDropEvent
if this DropTarget is active. |
dropActionChanged on the registered
DropTargetListener and passes it
the specified DropTargetDragEvent.
Has no effect if this DropTarget
is not active. |
Component associated
with this DropTarget.
|
int representing the
current action(s) supported by this DropTarget.
|
DropTargetContext associated
with this DropTarget.
|
FlavorMap
associated with this DropTarget.
If no FlavorMap has been set for this
DropTarget, it is associated with the default
FlavorMap.
|
|
DropTarget
is currently active (ready to accept drops).
|
DropTargetListener (UNICAST SOURCE).
|
|
true,
inactive if false.
|
component.setDropTarget(droptarget);
or droptarget.setComponent(component);
The Component will receive drops only if it is enabled. |
DropTarget
|
FlavorMap associated
with this DropTarget.
|
|