public void connect(CustomPortInteractor source, CustomPortInteractor target) {
    CustomConnectionWidget connection = new CustomConnectionWidget(this);
    connection.setSourceAnchor(AnchorFactory.createCircularAnchor(source, 1));
    connection.setTargetAnchor(AnchorFactory.createCircularAnchor(target, 1));

    // save one for each so that they connections can be accessed in both directions
    connections.add(
        new Connection(
            source.getNode(),
            source.getPortNumber(),
            target.getNode(),
            target.getPortNumber(),
            connection));
    addEdge(connection);
  }