com.jgraph.layout.graph

Class JGraphSimpleLayout

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 Summary
protected intmaxx
protected intmaxy
protected inttype
static intTYPE_CIRCLE
static intTYPE_RANDOM
static intTYPE_TILT
Constructor Summary
JGraphSimpleLayout(int type)
JGraphSimpleLayout(int type, int maxx, int maxy)
Method Summary
intgetMaxx()
intgetMaxy()
voidrun(JGraphFacade graph)
voidsetMaxx(int maxx)
voidsetMaxy(int maxy)
StringtoString()
Returns a name for this algorithm based on the type.

Field Detail

maxx

protected int maxx

maxy

protected int maxy

type

protected int type

TYPE_CIRCLE

public static final int TYPE_CIRCLE

TYPE_RANDOM

public static final int TYPE_RANDOM

TYPE_TILT

public static final int TYPE_TILT

Constructor Detail

JGraphSimpleLayout

public JGraphSimpleLayout(int type)

JGraphSimpleLayout

public JGraphSimpleLayout(int type, int maxx, int maxy)

Method Detail

getMaxx

public int getMaxx()

Returns: Returns the maxx.

getMaxy

public int getMaxy()

Returns: Returns the maxy.

run

public void run(JGraphFacade graph)

setMaxx

public void setMaxx(int maxx)

Parameters: maxx The maxx to set.

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.
Copyright (C) 2001-2009 JGraph Ltd. All rights reserved.