Class JGraphSimpleLayout

java.lang.Object
com.jgraph.layout.graph.JGraphSimpleLayout
All Implemented Interfaces:
JGraphLayout

public class JGraphSimpleLayout extends Object implements JGraphLayout
Three simple layouts in one class. Circl, tilt and randomize. The latter two take into accounts the x and y parameters.
  • Field Details

    • TYPE_CIRCLE

      public static final int TYPE_CIRCLE
      See Also:
    • TYPE_TILT

      public static final int TYPE_TILT
      See Also:
    • TYPE_RANDOM

      public static final int TYPE_RANDOM
      See Also:
    • type

      protected int type
    • maxx

      protected int maxx
    • maxy

      protected int maxy
  • Constructor Details

    • JGraphSimpleLayout

      public JGraphSimpleLayout(int type)
    • JGraphSimpleLayout

      public JGraphSimpleLayout(int type, int maxx, int maxy)
  • Method Details

    • run

      public void run(JGraphFacade graph)
      Description copied from interface: JGraphLayout
      Takes the graph detail and configuration information within the facade and creates the resulting laid out graph within that facade for further use
      Specified by:
      run in interface JGraphLayout
      Parameters:
      graph - The layout facade that the layout will use as input
    • getMaxx

      public int getMaxx()
      Returns:
      Returns the maxx.
    • setMaxx

      public void setMaxx(int maxx)
      Parameters:
      maxx - The maxx to set.
    • getMaxy

      public int getMaxy()
      Returns:
      Returns the maxy.
    • setMaxy

      public void setMaxy(int maxy)
      Parameters:
      maxy - The maxy to set.
    • toString

      public String toString()
      Returns a name for this algorithm based on the type. This may be one of Circle,Tilt or Random. Unknown is returned for all unimplemented types.
      Overrides:
      toString in class Object