Search in sources :

Example 1 with BendpointConnectionRouter

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;
}
Also used : BendpointConnectionRouter(org.eclipse.draw2d.BendpointConnectionRouter) PolylineConnection(org.eclipse.draw2d.PolylineConnection)

Example 2 with BendpointConnectionRouter

use of org.eclipse.draw2d.BendpointConnectionRouter in project dbeaver by dbeaver.

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;
}
Also used : BendpointConnectionRouter(org.eclipse.draw2d.BendpointConnectionRouter) PolylineConnection(org.eclipse.draw2d.PolylineConnection)

Example 3 with BendpointConnectionRouter

use of org.eclipse.draw2d.BendpointConnectionRouter in project dbeaver by dbeaver.

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;
}
Also used : BendpointConnectionRouter(org.eclipse.draw2d.BendpointConnectionRouter) PolylineConnection(org.eclipse.draw2d.PolylineConnection)

Example 4 with BendpointConnectionRouter

use of org.eclipse.draw2d.BendpointConnectionRouter in project cubrid-manager by CUBRID.

the class ConnectionPart method createFigure.

/**
	 * @see org.eclipse.gef.editparts.AbstractConnectionEditPart#createFigure()
	 * @return conn
	 */
protected IFigure createFigure() {
    PolylineConnection conn = new PolylineConnection();
    conn.setTargetDecoration(new PolygonDecoration());
    conn.setConnectionRouter(new BendpointConnectionRouter());
    return conn;
}
Also used : PolygonDecoration(org.eclipse.draw2d.PolygonDecoration) BendpointConnectionRouter(org.eclipse.draw2d.BendpointConnectionRouter) PolylineConnection(org.eclipse.draw2d.PolylineConnection)

Example 5 with BendpointConnectionRouter

use of org.eclipse.draw2d.BendpointConnectionRouter 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());
    }
}
Also used : AutomaticRouter(org.eclipse.draw2d.AutomaticRouter) BendpointConnectionRouter(org.eclipse.draw2d.BendpointConnectionRouter) ManhattanConnectionRouter(org.eclipse.draw2d.ManhattanConnectionRouter) FanRouter(org.eclipse.draw2d.FanRouter) ConnectionLayer(org.eclipse.draw2d.ConnectionLayer)

Aggregations

BendpointConnectionRouter (org.eclipse.draw2d.BendpointConnectionRouter)8 PolylineConnection (org.eclipse.draw2d.PolylineConnection)6 ConnectionLayer (org.eclipse.draw2d.ConnectionLayer)2 AutomaticRouter (org.eclipse.draw2d.AutomaticRouter)1 FanRouter (org.eclipse.draw2d.FanRouter)1 Figure (org.eclipse.draw2d.Figure)1 IFigure (org.eclipse.draw2d.IFigure)1 ManhattanConnectionRouter (org.eclipse.draw2d.ManhattanConnectionRouter)1 PolygonDecoration (org.eclipse.draw2d.PolygonDecoration)1 RectangleFigure (org.eclipse.draw2d.RectangleFigure)1 ScrollingGraphicalViewer (org.eclipse.gef.ui.parts.ScrollingGraphicalViewer)1