|
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.DelegatingDropAdapter
A DropTargetListener that allows many TransferDropTargetListeners to be added
to it. When the DropTarget fires a DropTargetEvent, this listener calculates which
one of the added listeners is able to complete the drop operation and forwards the
event to that listener.
| Constructor Summary | |
DelegatingDropAdapter()
|
|
| Method Summary | |
void |
addDropTargetListener(TransferDropTargetListener listener)
Adds the given TransferDropTargetListener to the list of listeners. |
void |
dragEnter(DropTargetEvent event)
Updates the current listener and forwards this event to that listener. |
void |
dragLeave(DropTargetEvent event)
Forwards this event to the current listener. |
void |
dragOperationChanged(DropTargetEvent event)
Updates the current listener and forwards this event to that listener. |
void |
dragOver(DropTargetEvent event)
Updates the current listener and forwards this event to that listener. |
void |
drop(DropTargetEvent event)
Forwards this event to the current listener, if it is not null. |
void |
dropAccept(DropTargetEvent event)
Forwards this event to the current 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 events to. |
void |
removeDropTargetListener(TransferDropTargetListener listener)
Removes the given TransferDropTargetListener 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 DelegatingDropAdapter()
| Method Detail |
public void addDropTargetListener(TransferDropTargetListener listener)
public void dragEnter(DropTargetEvent event)
dragEnter in interface DropTargetListenerDropTargetListener.dragEnter(DropTargetEvent)public void dragLeave(DropTargetEvent event)
dragLeave in interface DropTargetListenerDropTargetListener.dragLeave(DropTargetEvent)public void dragOperationChanged(DropTargetEvent event)
dragOperationChanged in interface DropTargetListenerDropTargetListener.dragOperationChanged(DropTargetEvent)public void dragOver(DropTargetEvent event)
null, event.detail is set
to DND.DROP_NONE, which causes the NOT cursor to appear.dragOver in interface DropTargetListenerDropTargetListener.dragOver(DropTargetEvent)public void drop(DropTargetEvent event)
null.
Then sets the current listener to null.drop in interface DropTargetListenerDropTargetListener.drop(DropTargetEvent)public void dropAccept(DropTargetEvent event)
dropAccept in interface DropTargetListenerDropTargetListener.dropAccept(DropTargetEvent)public Transfer[] getTransferTypes()
public boolean isEmpty()
true if there are no listeners to delegate events to.public void removeDropTargetListener(TransferDropTargetListener listener)
|
GEF v2.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||