Java 类org.eclipse.draw2d.ConnectionRouter 实例源码

项目:neoscada    文件:GenericLevelPresets.java   
@Override
protected IFigure createMain ()
{
    final Figure baseFigure = new LayeredPane ();

    final Layer rootFigure = new Layer ();

    this.connLayer = new ConnectionLayer ();
    this.connLayer.setAntialias ( 1 );
    this.connLayer.setConnectionRouter ( ConnectionRouter.NULL );

    baseFigure.add ( this.connLayer );
    baseFigure.add ( rootFigure );

    rootFigure.setLayoutManager ( new BorderLayout () );
    rootFigure.setBackgroundColor ( ColorConstants.white );

    rootFigure.add ( createArrowFigure (), BorderLayout.RIGHT );
    rootFigure.add ( createEntryGrid ( this.connLayer ), BorderLayout.CENTER );

    return baseFigure;
}
项目:olca-app    文件:LinkPart.java   
@Override
protected IFigure createFigure() {
    Link link = (Link) getModel();
    link.editPart = this;
    SankeyDiagram editor = ((ProductSystemNode) link.sourceNode.parent).editor;
    PolylineConnection conn = new LinkFigure(link.getWidth(), editor);
    if (editor.isRouted()) {
        conn.setConnectionRouter(ROUTER);
    } else {
        conn.setConnectionRouter(ConnectionRouter.NULL);
    }
    link.figure = conn;
    conn.setTolerance(0);
    conn.setForegroundColor(link.getColor());
    return conn;
}
项目:birt    文件:ColumnConnection.java   
public void setConnectionRouter( ConnectionRouter cr )
{
    if ( cr == null )
        super.setConnectionRouter( new ColumnConnectionRouter( ) );
    else
        super.setConnectionRouter( cr );
}
项目:olca-app    文件:ProductSystemGraphEditor.java   
public void setRouted(boolean routed) {
    this.routed = routed;
    ConnectionRouter router = ConnectionRouter.NULL;
    if (routed)
        router = TreeConnectionRouter.instance;
    for (ProcessNode node : model.getChildren())
        for (Link link : node.links)
            link.figure.setConnectionRouter(router);
}
项目:olca-app    文件:ProductSystemNode.java   
public void setRouted(boolean enabled) {
    ConnectionRouter router = ConnectionRouter.NULL;
    if (enabled)
        router = LinkPart.ROUTER;
    for (Node node : children) {
        if (!(node instanceof ProcessNode))
            continue;
        ProcessNode pNode = (ProcessNode) node;
        for (Link link : pNode.links) {
            link.figure.setConnectionRouter(router);
        }
    }
}
项目:olca-app    文件:LinkPart.java   
private ConnectionRouter getConnectionRouter() {
    return getEditor().isRouted() ? TreeConnectionRouter.instance : ConnectionRouter.NULL;
}
项目:olca-app    文件:ProcessLinkCreatePolicy.java   
@Override
protected ConnectionRouter getDummyConnectionRouter(CreateConnectionRequest request) {
    return ConnectionRouter.NULL;
}
项目:gef-gwt    文件:GraphicalNodeEditPolicy.java   
/**
 * Returns the ConnectionRouter for the creation feedback's connection.
 * 
 * @param request
 *            the create request
 * @return a connection router
 * @since 3.2
 */
protected ConnectionRouter getDummyConnectionRouter(
        CreateConnectionRequest request) {
    return ((ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER))
            .getConnectionRouter();
}