|
Eclipse GEF 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.gef.dnd.AbstractTransferDropTargetListener | +--org.eclipse.gef.dnd.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()
* @see org.eclipse.gef.dnd.AbstractTransferDropTargetListener#createTargetRequest() |
protected CreateRequest |
getCreateRequest()
A helper method that casts the target Request to a CreateRequest. |
protected abstract CreationFactory |
getFactory(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()
createTargetRequest
in class AbstractTransferDropTargetListener
Request
to be used with the target EditPartprotected final CreateRequest getCreateRequest()
protected abstract CreationFactory getFactory(Object template)
template
- the template Object
* @return a Factoryprotected 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
|
Eclipse GEF 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |