|
GEF (MVC) 3.9.0.201308190730 |
|||||||||
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 java.lang.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 sourceMethod Detail |
---|
public void dragFinished(DragSourceEvent event)
dragFinished
in interface DragSourceListener
dragFinished
in class AbstractTransferDragSourceListener
AbstractTransferDragSourceListener.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 DragSourceListener
dragStart
in class AbstractTransferDragSourceListener
DragSourceListener.dragStart(DragSourceEvent)
protected java.lang.Object getTemplate()
null
or the template
Object from the currently selected EditPart.
|
GEF (MVC) 3.9.0.201308190730 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |