|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
A listener for outgoing drag/drop operations -- to make a Component or part of
its display draggable, add such a listener to it and in response to a
dragGesture call, add items/flavors to the drag.
The dragCompleted method will then be called after the drag completes.
There's obviously no addDragInitiatorListener method on Component,
so use addMouseListener and removeMouseListener instead.
DragInitiatorEvent,
DragInitiatorAdapter,
Component.addMouseListener(java.awt.event.MouseListener),
Component.removeMouseListener(java.awt.event.MouseListener)| Method Summary | |
void |
dragCompleted(DragInitiatorEvent e)
Deprecated. Called after a drag initiated by the dragGesture method has been
completed successfully, with the data accepted by a receiver. |
void |
dragFailed(DragInitiatorEvent e)
Deprecated. Called after a drag initiated by the dragGesture method has
ended without the data being accepted -- either it was dropped someplace that's
not drag sensitive (i.e. |
void |
dragGesture(DragInitiatorEvent e)
Deprecated. Called when the user begins a dragging gesture -- i.e. |
| Methods inherited from interface java.awt.event.MouseListener |
mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased |
| Method Detail |
public void dragGesture(DragInitiatorEvent e)
getDrag on the DragInitiatorEvent
and add one or more items to the OutgoingDrag before returning.
(If getDrag is not called, or no items are added to the OutgoingDrag,
no drag will be initiated.)public void dragCompleted(DragInitiatorEvent e)
dragGesture method has been
completed successfully, with the data accepted by a receiver. The listener can check the
OutgoingDrag in the DragInitiatorEvent to see
where the data was dropped and what the drag modifiers are.Drag.getDestination(),
Drag#getDropLocation,
Drag#getModifierspublic void dragFailed(DragInitiatorEvent e)
dragGesture method has
ended without the data being accepted -- either it was dropped someplace that's
not drag sensitive (i.e. the menubar) or the target of the drag couldn't accept
any of the data.
|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.