use of org.eclipse.draw2d.BendpointConnectionRouter in project webtools.sourceediting by eclipse.
the class RootEditPart method activate.
public void activate() {
super.activate();
// Set up Connection layer with a router, if it doesn't already have one
ConnectionLayer connectionLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
if (connectionLayer != null) {
connectionLayer.setConnectionRouter(new BendpointConnectionRouter());
}
Figure figure = (Figure) getLayer(LayerConstants.FEEDBACK_LAYER);
if (figure != null) {
if (getViewer() instanceof ScrollingGraphicalViewer) {
// ScrollingGraphicalViewer sgv = (ScrollingGraphicalViewer)getViewer();
// IndexFigure indexFigure = new IndexFigure(sgv);
// figure.add(indexFigure);
// getViewer().addPropertyChangeListener(indexFigure);
}
}
refresh();
}
use of org.eclipse.draw2d.BendpointConnectionRouter 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());
}
}
use of org.eclipse.draw2d.BendpointConnectionRouter in project dbeaver by serge-rider.
the class DummyEdgePart method createFigure.
/**
* @see org.eclipse.gef.editparts.AbstractConnectionEditPart#createFigure()
*/
protected IFigure createFigure() {
PolylineConnection conn = new PolylineConnection();
conn.setConnectionRouter(new BendpointConnectionRouter());
conn.setVisible(true);
return conn;
}
use of org.eclipse.draw2d.BendpointConnectionRouter in project jbosstools-hibernate by jbosstools.
the class DummyEdgePart method createFigure.
/**
* @see org.eclipse.gef.editparts.AbstractConnectionEditPart#createFigure()
*/
protected IFigure createFigure() {
PolylineConnection conn = new PolylineConnection();
conn.setConnectionRouter(new BendpointConnectionRouter());
conn.setVisible(false);
return conn;
}
Aggregations