code: public void setAutomaticLayout(AutomaticLayout.RankDirection rankDirection, int rankSeparation, int nodeSeparation, int edgeSeparation, boolean vertices) {
          this.automaticLayout = new AutomaticLayout(rankDirection, rankSeparation, nodeSeparation, edgeSeparation, vertices);
      }
docs: Enables the automatic layout for this view, with the specified settings.
  
  @param rankDirection     the rank direction
  @param rankSeparation    the separation between ranks (in pixels, a positive integer)
  @param nodeSeparation    the separation between nodes within the same rank (in pixels, a positive integer)
  @param edgeSeparation    the separation between edges (in pixels, a positive integer)
  @param vertices          whether vertices should be created during automatic layout