use of org.jkiss.dbeaver.erd.ui.layout.DelegatingLayoutManager in project dbeaver by serge-rider.
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.jkiss.dbeaver.erd.ui.layout.DelegatingLayoutManager 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;
}
Aggregations