|
Java Platform 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.dnd.DragSourceContext
The DragSourceContext class is responsible for managing the initiator side of the Drag and Drop protocol. In particular it is responsible for managing event notifications to the DragSourceListener, and providing the Transferable state to enable the data transfer.
Field Summary | |
protected static int |
CHANGED
|
protected static int |
DEFAULT
|
protected static int |
ENTER
|
protected static int |
OVER
|
Constructor Summary | |
DragSourceContext(java.awt.dnd.peer.DragSourceContextPeer dscp,
DragGestureEvent trigger,
Cursor dragCursor,
Image dragImage,
Point offset,
Transferable t,
DragSourceListener dsl)
construct a DragSourceContext (called from DragSource) |
Method Summary | |
void |
addDragSourceListener(DragSourceListener dsl)
change the DragSourceListener |
void |
dragDropEnd(DragSourceDropEvent dsde)
intercept the dragDropEnd event from the peer |
void |
dragEnter(DragSourceDragEvent dsde)
intercept the dragEnter event from the peer |
void |
dragExit(DragSourceEvent dse)
intercept the dragExit event from the peer |
void |
dragOver(DragSourceDragEvent dsde)
intercept the dragOver event from the peer |
void |
dropActionChanged(DragSourceDragEvent dsde)
intercept the dragGestureChanged event from the peer |
Component |
getComponent()
|
Cursor |
getCursor()
|
DragSource |
getDragSource()
|
int |
getSourceActions()
|
Transferable |
getTransferable()
|
DragGestureEvent |
getTrigger()
|
void |
removeDragSourceListener(DragSourceListener dsl)
change the DragSourceListener |
void |
setCursor(Cursor c)
change the drag cursor |
void |
transferablesFlavorsChanged()
notify the peer that the Transferables DataFlavors have changed |
protected void |
updateCurrentCursor(int dropOp,
int targetAct,
int status)
check the cursor for updates and implement defaults |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected static final int DEFAULT
protected static final int ENTER
protected static final int OVER
protected static final int CHANGED
Constructor Detail |
public DragSourceContext(java.awt.dnd.peer.DragSourceContextPeer dscp, DragGestureEvent trigger, Cursor dragCursor, Image dragImage, Point offset, Transferable t, DragSourceListener dsl)
dscp
- The DragSourceContextPeer for this Dragtrigger
- The triggering eventdragCursor
- The initial CursordragImage
- The image to drag (or null)offset
- The offset of the image origin from the hotspot
at the instant of the triggering eventt
- The Transferabledsl
- The DragSourceListenerMethod Detail |
public DragSource getDragSource()
public Component getComponent()
public DragGestureEvent getTrigger()
public int getSourceActions()
public void setCursor(Cursor c)
public Cursor getCursor()
public void addDragSourceListener(DragSourceListener dsl) throws TooManyListenersException
public void removeDragSourceListener(DragSourceListener dsl)
public void transferablesFlavorsChanged()
public void dragEnter(DragSourceDragEvent dsde)
public void dragOver(DragSourceDragEvent dsde)
public void dragExit(DragSourceEvent dse)
public void dropActionChanged(DragSourceDragEvent dsde)
public void dragDropEnd(DragSourceDropEvent dsde)
public Transferable getTransferable()
protected void updateCurrentCursor(int dropOp, int targetAct, int status)
|
Java Platform 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |