|
Eclipse GEF 3.8.0.201206112118 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.gef.dnd.AbstractTransferDragSourceListener
org.eclipse.gef.dnd.TemplateTransferDragSourceListener
public class TemplateTransferDragSourceListener
Allows a single PaletteTemplateEntry to be
dragged from an EditPartViewer. The PaletteTemplateEntry's template
object is the data that is being transfered to the DropTarget.
| Constructor Summary | |
|---|---|
TemplateTransferDragSourceListener(EditPartViewer viewer)
Constructs a new listener for the specified EditPartViewer. |
|
TemplateTransferDragSourceListener(EditPartViewer viewer,
Transfer xfer)
Deprecated. Use the constructor without the transfer specified. |
|
| Method Summary | |
|---|---|
void |
dragFinished(DragSourceEvent event)
|
void |
dragSetData(DragSourceEvent event)
Get the template from the selected PaletteTemplateEntry
and sets it as the event data to be dropped. |
void |
dragStart(DragSourceEvent event)
Cancels the drag if the selected item does not represent a PaletteTemplateEntry. |
protected Object |
getTemplate()
A helper method that returns null or the template
Object from the currently selected EditPart. |
| Methods inherited from class org.eclipse.gef.dnd.AbstractTransferDragSourceListener |
|---|
getTransfer, getViewer, setTransfer, setViewer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TemplateTransferDragSourceListener(EditPartViewer viewer,
Transfer xfer)
viewer - viewerxfer - xferpublic TemplateTransferDragSourceListener(EditPartViewer viewer)
PaletteTemplateEntry.
viewer - the EditPartViewer that is the drag source| Method Detail |
|---|
public void dragFinished(DragSourceEvent event)
dragFinished in interface DragSourceListenerdragFinished in class AbstractTransferDragSourceListenerAbstractTransferDragSourceListener.dragFinished(DragSourceEvent)public void dragSetData(DragSourceEvent event)
PaletteTemplateEntry
and sets it as the event data to be dropped.
event - the DragSourceEventpublic void dragStart(DragSourceEvent event)
dragStart in interface DragSourceListenerdragStart in class AbstractTransferDragSourceListenerDragSourceListener.dragStart(DragSourceEvent)protected Object getTemplate()
null or the template
Object from the currently selected EditPart.
|
Eclipse GEF 3.8.0.201206112118 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||