use of org.eclipse.draw2d.ConnectionLayer in project dbeaver by dbeaver.
the class DiagramPart method createFigure.
@Override
protected IFigure createFigure() {
EntityDiagramFigure figure = new EntityDiagramFigure(this);
delegatingLayoutManager = new DelegatingLayoutManager(this);
figure.setLayoutManager(delegatingLayoutManager);
/*
ConnectionLayer cLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
ViewportAwareConnectionLayerClippingStrategy clippingStrategy = new ViewportAwareConnectionLayerClippingStrategy(cLayer);
figure.setClippingStrategy(clippingStrategy);
*/
Control control = getViewer().getControl();
ConnectionLayer cLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
if ((control.getStyle() & SWT.MIRRORED) == 0) {
cLayer.setAntialias(SWT.ON);
}
FanRouter router = new FanRouter();
router.setSeparation(15);
// router.setNextRouter(new BendpointConnectionRouter());
router.setNextRouter(new ShortestPathConnectionRouter(figure));
// router.setNextRouter(new ManhattanConnectionRouter());
// router.setNextRouter(new BendpointConnectionRouter());
cLayer.setConnectionRouter(router);
return figure;
}
use of org.eclipse.draw2d.ConnectionLayer in project archi by archimatetool.
the class GraphicalRootEditPart method createFigure.
/**
* @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
*/
@Override
protected IFigure createFigure() {
innerLayers = new LayeredPane();
printableLayers = new LayeredPane();
Layer layer = new Layer();
layer.setLayoutManager(new StackLayout());
printableLayers.add(layer, PRIMARY_LAYER);
layer = new ConnectionLayer();
layer.setPreferredSize(new Dimension(5, 5));
printableLayers.add(layer, CONNECTION_LAYER);
innerLayers.add(printableLayers, PRINTABLE_LAYERS);
layer = new Layer();
layer.setPreferredSize(new Dimension(5, 5));
innerLayers.add(layer, HANDLE_LAYER);
layer = new FeedbackLayer();
layer.setPreferredSize(new Dimension(5, 5));
innerLayers.add(layer, FEEDBACK_LAYER);
ScrollPane pane = new ScrollPane();
pane.setViewport(new Viewport(true));
pane.setContents(innerLayers);
return pane;
}
use of org.eclipse.draw2d.ConnectionLayer in project archi by archimatetool.
the class FreeformGraphicalRootEditPart method createPrintableLayers.
/**
* Creates a layered pane and the layers that should be printed.
*
* @see org.eclipse.gef.print.PrintGraphicalViewerOperation
* @return a new LayeredPane containing the printable layers
*/
protected LayeredPane createPrintableLayers() {
FreeformLayeredPane layeredPane = new FreeformLayeredPane();
layeredPane.add(new FreeformLayer(), PRIMARY_LAYER);
layeredPane.add(new ConnectionLayer(), CONNECTION_LAYER);
return layeredPane;
}
use of org.eclipse.draw2d.ConnectionLayer in project archi by archimatetool.
the class ScalableRootEditPart method createPrintableLayers.
/**
* Creates a layered pane and the layers that should be printed.
*
* @see org.eclipse.gef.print.PrintGraphicalViewerOperation
* @return a new LayeredPane containing the printable layers
*/
protected LayeredPane createPrintableLayers() {
LayeredPane pane = new LayeredPane();
Layer layer = new Layer();
layer.setLayoutManager(new StackLayout());
pane.add(layer, PRIMARY_LAYER);
layer = new ConnectionLayer();
layer.setPreferredSize(new Dimension(5, 5));
pane.add(layer, CONNECTION_LAYER);
return pane;
}
use of org.eclipse.draw2d.ConnectionLayer in project tdi-studio-se by Talend.
the class ProcessPart method refreshVisuals.
/*
* (non-Javadoc)
*
* @see org.eclipse.gef.editparts.AbstractEditPart#refreshVisuals()
*/
@Override
protected void refreshVisuals() {
super.refreshVisuals();
if (DesignerPlugin.getDefault().getPreferenceStore().getBoolean(TalendDesignerPrefConstants.EDITOR_ANTIALIASING)) {
ConnectionLayer cLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
cLayer.setAntialias(SWT.ON);
}
}
Aggregations