if ( from == null || to == null ) {
throw new RuntimeException( "Connection needs existing from and to nodes." );
}
RectilinearTwoEndedConnection connection = new RectilinearTwoEndedConnection( UIObjectConnector.wrap( from ),
UIObjectConnector.wrap( to ) );
return connection;
}