use of org.jkiss.dbeaver.ext.erd.dnd.NodeDropTargetListener in project dbeaver by serge-rider.
the class ERDEditorPart method createViewer.
private GraphicalViewer createViewer(Composite parent) {
StatusLineValidationMessageHandler validationMessageHandler = new StatusLineValidationMessageHandler(getEditorSite());
GraphicalViewer viewer = new ERDGraphicalViewer(this, validationMessageHandler);
viewer.createControl(parent);
// configure the viewer
viewer.getControl().setBackground(ColorConstants.white);
rootPart = new ScalableFreeformRootEditPart();
viewer.setRootEditPart(rootPart);
viewer.setKeyHandler(new GraphicalViewerKeyHandler(viewer));
viewer.addDropTargetListener(new DataEditDropTargetListener(viewer));
viewer.addDropTargetListener(new NodeDropTargetListener(viewer));
// initialize the viewer with input
viewer.setEditPartFactory(new ERDEditPartFactory());
return viewer;
}
use of org.jkiss.dbeaver.ext.erd.dnd.NodeDropTargetListener in project dbeaver by dbeaver.
the class ERDEditorPart method createViewer.
private GraphicalViewer createViewer(Composite parent) {
StatusLineValidationMessageHandler validationMessageHandler = new StatusLineValidationMessageHandler(getEditorSite());
GraphicalViewer viewer = new ERDGraphicalViewer(this, validationMessageHandler);
viewer.createControl(parent);
// configure the viewer
viewer.getControl().setBackground(UIUtils.getColorRegistry().get(ERDConstants.COLOR_ERD_DIAGRAM_BACKGROUND));
rootPart = new ScalableFreeformRootEditPart();
viewer.setRootEditPart(rootPart);
viewer.setKeyHandler(new GraphicalViewerKeyHandler(viewer));
viewer.addDropTargetListener(new DataEditDropTargetListener(viewer));
viewer.addDropTargetListener(new NodeDropTargetListener(viewer));
// initialize the viewer with input
viewer.setEditPartFactory(new ERDEditPartFactory());
return viewer;
}
Aggregations