Package org.eclipse.draw2d

Examples of org.eclipse.draw2d.ShortestPathConnectionRouter


            router.setNextRouter(new BendpointConnectionRouter());
            layer.setConnectionRouter(router);
        } else if (getProcessWrapper().getRouterLayout().equals(ProcessWrapper.ROUTER_LAYOUT_MANHATTAN)) {
            layer.setConnectionRouter(new ManhattanConnectionRouter());
        } else {
            layer.setConnectionRouter(new ShortestPathConnectionRouter(getFigure()));
        }
        Animation.run(400);
    }
View Full Code Here


        }

        // Update connection router according to new model size
        ConnectionRouter router;
        if ( (isNewDiagram && newGraph.getChildren().size() < SIMPLE_ROUTER_MIN_NODES) || (!isNewDiagram && getModel().getChildren().size() < SIMPLE_ROUTER_MIN_NODES) ) {
            router = new ShortestPathConnectionRouter( (IFigure) rootEditPart.getContentPane().getChildren().get( 0 ) );
        } else {
            router = ConnectionRouter.NULL;
        }
        connLayer.setConnectionRouter( router );
View Full Code Here

  public AutomaticRouter getConnectionRouter() {
    if (router == null) {
      router = new FanRouter();
      //            router.setNextRouter(new BendpointConnectionRouter());
      //            router.setNextRouter(new ManhattanConnectionRouter());
      router.setNextRouter(new ShortestPathConnectionRouter(getFigure())); // Cool :-)
    }
    if (logger.isLoggable(Level.FINE)) {
      //$ANALYSIS-IGNORE
      logger.fine("getConnectionRouter() -> " + router);
    }
View Full Code Here

        }

        // Update connection router according to new model size
        ConnectionRouter router;
        if ( (isNewDiagram && newGraph.getChildren().size() < SIMPLE_ROUTER_MIN_NODES) || (!isNewDiagram && getModel().getChildren().size() < SIMPLE_ROUTER_MIN_NODES) ) {
            router = new ShortestPathConnectionRouter( (IFigure) rootEditPart.getContentPane().getChildren().get( 0 ) );
        } else {
            router = ConnectionRouter.NULL;
        }
        connLayer.setConnectionRouter( router );
View Full Code Here

    Figure f = new FreeformLayer();
    f.setLayoutManager(new FreeformLayout());

    // Create the static router for the connection layer
    ConnectionLayer connLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
    ShortestPathConnectionRouter router = new ShortestPathConnectionRouter(
        f);
    router.setSpacing(2);
    // ManhattanConnectionRouter router = new ManhattanConnectionRouter();
    connLayer.setConnectionRouter(router);

    return f;
  }
View Full Code Here

        f.setBorder(new MarginBorder(3));
        f.setLayoutManager(new FreeformLayout());

        // Create the static router for the connection layer
        ConnectionLayer connLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
        connLayer.setConnectionRouter(new ShortestPathConnectionRouter(f));

        return f;
    }
View Full Code Here

            router.setNextRouter(new BendpointConnectionRouter());
            layer.setConnectionRouter(router);
        } else if (getProcessWrapper().getRouterLayout().equals(ProcessWrapper.ROUTER_LAYOUT_MANHATTAN)) {
            layer.setConnectionRouter(new ManhattanConnectionRouter());
        } else {
            layer.setConnectionRouter(new ShortestPathConnectionRouter(getFigure()));
        }
        Animation.run(400);
    }
View Full Code Here

    getPresentation().render();
    IFigure f = getPresentation().getFigure();
    // Create the static router for the connection layer
    ConnectionLayer connLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
    connLayer.setConnectionRouter(new ShortestPathConnectionRouter(f));
    connLayer.setAntialias(SWT.ON);

    return f;
  }
View Full Code Here

        }

        // Update connection router according to new model size
        ConnectionRouter router;
        if ( (isNewDiagram && newGraph.getChildren().size() < SIMPLE_ROUTER_MIN_NODES) || (!isNewDiagram && getModel().getChildren().size() < SIMPLE_ROUTER_MIN_NODES) ) {
            router = new ShortestPathConnectionRouter( (IFigure) rootEditPart.getContentPane().getChildren().get( 0 ) );
        } else {
            router = ConnectionRouter.NULL;
        }
        connLayer.setConnectionRouter( router );
View Full Code Here

    router.setNextRouter(new BendpointConnectionRouter());
    cLayer.setConnectionRouter(router);
  } else if (getLogicDiagram().getConnectionRouter().equals(LogicDiagram.ROUTER_MANHATTAN))
    cLayer.setConnectionRouter(new ManhattanConnectionRouter());
  else
    cLayer.setConnectionRouter(new ShortestPathConnectionRouter(getFigure()));
  Animation.run(400);
}
View Full Code Here

TOP

Related Classes of org.eclipse.draw2d.ShortestPathConnectionRouter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.