use of org.eclipse.draw2d.FanRouter in project jbosstools-hibernate by jbosstools.
the class DiagramEditPart method setupFanConnectionRouter.
public void setupFanConnectionRouter() {
ConnectionLayer connLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
connLayer.setConnectionRouter(new FanRouter());
getOrmDiagram().setupFanConnectionRouter();
}
use of org.eclipse.draw2d.FanRouter 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.eclipse.draw2d.FanRouter 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.FanRouter in project archi by archimatetool.
the class AbstractDiagramPart method refreshVisuals.
@Override
public void refreshVisuals() {
// on the connection figures - see AbstractConnectionFigure
if (AnimationUtil.doAnimate()) {
Animation.markBegin();
}
ConnectionLayer cLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
switch(getModel().getConnectionRouterType()) {
case IDiagramModel.CONNECTION_ROUTER_MANHATTAN:
cLayer.setConnectionRouter(new ManhattanConnectionRouter());
break;
case IDiagramModel.CONNECTION_ROUTER_BENDPOINT:
default:
AutomaticRouter router = new FanRouter();
router.setNextRouter(new BendpointConnectionRouter());
cLayer.setConnectionRouter(router);
break;
}
if (AnimationUtil.doAnimate()) {
Animation.run(AnimationUtil.animationSpeed());
}
}
use of org.eclipse.draw2d.FanRouter in project archi by archimatetool.
the class AbstractDiagramPart method setConnectionRouter.
/**
* Set Connection Router type for the whole diagram
*/
protected void setConnectionRouter(boolean withAnimation) {
// Animation
if (withAnimation && AnimationUtil.doAnimate()) {
Animation.markBegin();
}
ConnectionLayer cLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
switch(getModel().getConnectionRouterType()) {
case IDiagramModel.CONNECTION_ROUTER_MANHATTAN:
cLayer.setConnectionRouter(new ManhattanConnectionRouter());
break;
case IDiagramModel.CONNECTION_ROUTER_BENDPOINT:
default:
AutomaticRouter router = new FanRouter();
router.setNextRouter(new BendpointConnectionRouter());
cLayer.setConnectionRouter(router);
break;
}
if (withAnimation && AnimationUtil.doAnimate()) {
Animation.run(AnimationUtil.animationSpeed());
}
}
Aggregations