use of com.cubrid.common.ui.er.part.PartFactory in project cubrid-manager by CUBRID.
the class ERSchemaEditor method createGraphicalViewer.
private ScrollingGraphicalViewer createGraphicalViewer(IEditorSite editorSite, Composite parent) {
StatusLineValidationMessageHandler messageHandler = new StatusLineValidationMessageHandler(editorSite);
ScrollingGraphicalViewer viewer = new ValidationGraphicalViewer(messageHandler);
viewer.createControl(parent);
viewer.getControl().setBackground(ColorConstants.white);
viewer.setRootEditPart(new ERScalableFreeformRootEditPart());
viewer.setEditPartFactory(new PartFactory());
viewer.setKeyHandler(new GraphicalViewerKeyHandler(viewer));
viewer.setProperty(SnapToGrid.PROPERTY_GRID_VISIBLE, true);
viewer.setProperty(SnapToGrid.PROPERTY_GRID_ENABLED, true);
viewer.setProperty(SnapToGrid.PROPERTY_GRID_SPACING, new Dimension(10, 10));
viewer.setProperty(SnapToGrid.PROPERTY_GRID_ORIGIN, new Point(5, 5));
return viewer;
}
Aggregations