|
GEF (MVC) 3.9.100.201405261516 |
|||||||||
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.gef.dnd.TemplateTransferDropTargetListener
public class TemplateTransferDropTargetListener
Performs a native Drop using the TemplateTransfer
. The Drop is
performed by using a CreateRequest
to obtain a Command
from the targeted EditPart
.
This class is abstract
. Subclasses are responsible for providing
the appropriate Factory
object based on the template that is
being dragged.
Constructor Summary | |
---|---|
TemplateTransferDropTargetListener(EditPartViewer viewer)
Constructs a listener on the specified viewer. |
Method Summary | |
---|---|
protected Request |
createTargetRequest()
Creates and returns the Request that will be sent to the
targeted EditPart. |
protected CreateRequest |
getCreateRequest()
A helper method that casts the target Request to a CreateRequest. |
protected CreationFactory |
getFactory(java.lang.Object template)
Returns the appropriate Factory object to be used for the specified template. |
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 created object. |
protected void |
updateTargetRequest()
Assumes that the target request is a CreateRequest . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TemplateTransferDropTargetListener(EditPartViewer viewer)
viewer
- the EditPartViewerMethod Detail |
---|
protected Request createTargetRequest()
AbstractTransferDropTargetListener
Request
that will be sent to the
targeted EditPart. Subclasses can override to create specialized
requests.
createTargetRequest
in class AbstractTransferDropTargetListener
Request
to be used with the target
EditPartAbstractTransferDropTargetListener.createTargetRequest()
protected final CreateRequest getCreateRequest()
protected CreationFactory getFactory(java.lang.Object template)
template
- the template Object
protected void handleDragOperationChanged()
DND.DROP_COPY
.
handleDragOperationChanged
in class AbstractTransferDropTargetListener
AbstractTransferDropTargetListener.handleDragOperationChanged()
protected void handleDragOver()
DND.DROP_COPY
by default.
handleDragOver
in class AbstractTransferDropTargetListener
AbstractTransferDropTargetListener.handleDragOver()
protected void handleDrop()
handleDrop
in class AbstractTransferDropTargetListener
AbstractTransferDropTargetListener.handleDrop()
protected void updateTargetRequest()
CreateRequest
.
updateTargetRequest
in class AbstractTransferDropTargetListener
|
GEF (MVC) 3.9.100.201405261516 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |