|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.gef.dnd.AbstractTransferDropTargetListener
org.eclipse.gmf.runtime.diagram.ui.parts.DiagramDropTargetListener
Performs a drop of one or more semantic elements using a given transfer. The Drop is performed by
using a DropObjectsRequest to obtain a Command from the targeted
EditPart. The target edit part might re-interpret the DropElementsRequest
to mean another request.
This class is abstract. Subclasses are responsible for providing the
appropriate Transfer object based on the type of elements that are being dragged.
| Constructor Summary | |
DiagramDropTargetListener(EditPartViewer viewer)
Constructor for DiagramDropTargetListener. |
|
DiagramDropTargetListener(EditPartViewer viewer,
Transfer xfer)
Constructor for DiagramDropTargetListener. |
|
| Method Summary | |
protected Request |
createTargetRequest()
|
void |
dragEnter(DropTargetEvent event)
|
protected DropObjectsRequest |
getDropObjectsRequest()
A helper method that casts the target Request to a DropElementsRequest. |
protected abstract java.util.List |
getObjectsBeingDropped()
gets a list of objects being dropped on the diagram |
protected void |
handleDragEnter()
Called whenever the User enters the target. |
protected void |
handleDragOperationChanged()
The purpose of a template is to be copied. |
protected void |
handleDragOver()
The purpose of a template is to be copied. |
protected void |
handleDrop()
Overridden to select the request result if any |
boolean |
isEnabled(DropTargetEvent event)
Make sure the target can produce a command |
protected void |
updateTargetEditPart()
|
protected void |
updateTargetRequest()
Assumes that the target request is a DropObjectsRequest. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DiagramDropTargetListener(EditPartViewer viewer)
viewer -
public DiagramDropTargetListener(EditPartViewer viewer,
Transfer xfer)
viewer - xfer - | Method Detail |
protected Request createTargetRequest()
AbstractTransferDropTargetListener.createTargetRequest()protected final DropObjectsRequest getDropObjectsRequest()
protected abstract java.util.List getObjectsBeingDropped()
Listpublic void dragEnter(DropTargetEvent event)
DropTargetListener.dragEnter(org.eclipse.swt.dnd.DropTargetEvent)protected void handleDragEnter()
protected void handleDragOperationChanged()
DND.DROP_COPY.
AbstractTransferDropTargetListener.handleDragOperationChanged()protected void handleDragOver()
DND.DROP_COPY by default.
AbstractTransferDropTargetListener.handleDragOver()protected void handleDrop()
AbstractTransferDropTargetListener.handleDrop()protected void updateTargetRequest()
DropObjectsRequest.
public boolean isEnabled(DropTargetEvent event)
protected void updateTargetEditPart()
AbstractTransferDropTargetListener.updateTargetEditPart()
|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.