// This sample demonstrates how to
  // apply orthogonal layout to a graph

  // Create the layout object
  OrthogonalLayout layout = new OrthogonalLayout();

  // Adjust the layout attributes 
  layout.setMargins(new XDimension2D.Double(1515));
  layout.setRefine(true);
  layout.setPadding(30);
  layout.setMultipleGraphsPlacement(MultipleGraphsPlacement.Horizontal);

  // Perform the actual arrangement
  layout.arrange(diagram);