Search in sources :

Example 1 with ArchimateDiagramTransferDropTargetListener

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

the class ArchimateDiagramEditor method configureGraphicalViewer.

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

Aggregations

ArchimateDiagramTransferDropTargetListener (com.archimatetool.editor.diagram.dnd.ArchimateDiagramTransferDropTargetListener)1 ArchimateDiagramEditPartFactory (com.archimatetool.editor.diagram.editparts.ArchimateDiagramEditPartFactory)1 GraphicalViewer (org.eclipse.gef.GraphicalViewer)1