// This sample show how to apply layered layout to a graph

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

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