|
GEF v2.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.eclipse.gef.dnd.DelegatingDragAdapter
A DragSourceListener that allows many TransferDragSourceListeners to be added
to it. When the DragSource fires a DragSourceEvent, this listener calculates which
one of the added listeners is able to complete the drag operation and forwards the
event to that listener.
| Constructor Summary | |
DelegatingDragAdapter()
|
|
| Method Summary | |
void |
addDragSourceListener(TransferDragSourceListener listener)
Adds the given TransferDragSourceListener to the list of listeners. |
void |
dragFinished(DragSourceEvent event)
Forwards this event to the current listener. |
void |
dragSetData(DragSourceEvent event)
Updates the current listener and then forwards the event to it. |
void |
dragStart(DragSourceEvent event)
Forwards this event to each listener. |
Transfer[] |
getTransferTypes()
Adds the Transfer from each listener to an array and returns that array. |
boolean |
isEmpty()
Returns true if there are no listeners to delegate the events to. |
void |
removeDragSourceListener(TransferDragSourceListener listener)
Removes the given TransferDragSourceListener from the list of listeners. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DelegatingDragAdapter()
| Method Detail |
public void addDragSourceListener(TransferDragSourceListener listener)
public void dragFinished(DragSourceEvent event)
dragFinished in interface DragSourceListenerDragSourceListener.dragFinished(DragSourceEvent)public void dragSetData(DragSourceEvent event)
dragSetData in interface DragSourceListenerDragSourceListener.dragSetData(DragSourceEvent)public void dragStart(DragSourceEvent event)
event.doit to false if it cannot handle the drag operation.
If a listener can handle the drag, it is added to the list of active listeners. The
drag is aborted if there are no listeners that can handle it.dragStart in interface DragSourceListenerDragSourceListener.dragStart(DragSourceEvent)public Transfer[] getTransferTypes()
public boolean isEmpty()
true if there are no listeners to delegate the events to.public void removeDragSourceListener(TransferDragSourceListener listener)
|
GEF v2.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||