Search in sources :

Example 1 with FixedPointsConnectionRouter

use of org.csstudio.opibuilder.editparts.FixedPointsConnectionRouter in project yamcs-studio by yamcs.

the class ManhattanBendpointEditPolicy method showMoveBendpointFeedback.

protected void showMoveBendpointFeedback(BendpointRequest request) {
    if (originalRouter == null && !(getConnection().getConnectionRouter() instanceof FixedPointsConnectionRouter)) {
        originalRouter = getConnection().getConnectionRouter();
        getConnection().setConnectionRouter(new FixedPointsConnectionRouter());
    }
    if (originalConstraint == null) {
        originalConstraint = getConnection().getRoutingConstraint();
    }
    getConnection().setRoutingConstraint(getNewPoints(request));
}
Also used : FixedPointsConnectionRouter(org.csstudio.opibuilder.editparts.FixedPointsConnectionRouter)

Example 2 with FixedPointsConnectionRouter

use of org.csstudio.opibuilder.editparts.FixedPointsConnectionRouter in project yamcs-studio by yamcs.

the class RerouteConnectionAction method selectionChanged.

@Override
public void selectionChanged(IAction action, ISelection selection) {
    super.selectionChanged(action, selection);
    if (getSelectedConnection() == null) {
        return;
    }
    Connection figure = getSelectedConnection().getConnectionFigure();
    action.setEnabled(figure != null && figure.getConnectionRouter() instanceof FixedPointsConnectionRouter);
}
Also used : Connection(org.eclipse.draw2d.Connection) FixedPointsConnectionRouter(org.csstudio.opibuilder.editparts.FixedPointsConnectionRouter)

Aggregations

FixedPointsConnectionRouter (org.csstudio.opibuilder.editparts.FixedPointsConnectionRouter)2 Connection (org.eclipse.draw2d.Connection)1