Search in sources :

Example 1 with SketchDiagramTransferDropTargetListener

use of com.archimatetool.editor.diagram.sketch.dnd.SketchDiagramTransferDropTargetListener in project archi by archimatetool.

the class SketchEditor method configureGraphicalViewer.

@Override
protected void configureGraphicalViewer() {
    super.configureGraphicalViewer();
    GraphicalViewer viewer = getGraphicalViewer();
    // Register Edit Part Factory before setting contents
    viewer.setEditPartFactory(new SketchEditPartFactory());
    // Set Model
    viewer.setContents(getModel());
    // Native DnD
    viewer.addDropTargetListener(new SketchDiagramTransferDropTargetListener(viewer));
}
Also used : GraphicalViewer(org.eclipse.gef.GraphicalViewer) SketchDiagramTransferDropTargetListener(com.archimatetool.editor.diagram.sketch.dnd.SketchDiagramTransferDropTargetListener) SketchEditPartFactory(com.archimatetool.editor.diagram.sketch.editparts.SketchEditPartFactory)

Aggregations

SketchDiagramTransferDropTargetListener (com.archimatetool.editor.diagram.sketch.dnd.SketchDiagramTransferDropTargetListener)1 SketchEditPartFactory (com.archimatetool.editor.diagram.sketch.editparts.SketchEditPartFactory)1 GraphicalViewer (org.eclipse.gef.GraphicalViewer)1