Class Layouts

java.lang.Object
org.graphstream.ui.layout.Layouts

public class Layouts
extends Object
A factory in charge or creating various layout implementations. This class is mainly used to create the default layout for the graph viewer. You can also use layouts directly on your graphs, but in this case you do not need this factory. This class looks at the "gs.ui.layout" system property to create a layout class. You can change this property using System.setProperty("gs.ui.layout", you_layout_class_name).
  • Constructor Details

  • Method Details

    • newLayoutAlgorithm

      public static Layout newLayoutAlgorithm()
      Creates a layout according to the "org.graphstream.ui.layout" system property.
      Returns:
      The new layout or the default GraphStream "Spring-Box" layout if the "gs.ui.layout" system property is either not set or contains a class that cannot be found.