com.jgraph.layout.graph
Class JGraphSimpleLayout
java.lang.Object
com.jgraph.layout.graph.JGraphSimpleLayout
- All Implemented Interfaces:
- JGraphLayout
public class JGraphSimpleLayout
- extends java.lang.Object
- implements JGraphLayout
Three simple layouts in one class. Circl, tilt and randomize. The latter two
take into accounts the x and y parameters.
Method Summary |
int |
getMaxx()
|
int |
getMaxy()
|
void |
run(JGraphFacade graph)
Takes the graph detail and configuration information within the facade
and creates the resulting laid out graph within that facade for further
use |
void |
setMaxx(int maxx)
|
void |
setMaxy(int maxy)
|
java.lang.String |
toString()
Returns a name for this algorithm based on the type. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TYPE_CIRCLE
public static final int TYPE_CIRCLE
- See Also:
- Constant Field Values
TYPE_TILT
public static final int TYPE_TILT
- See Also:
- Constant Field Values
TYPE_RANDOM
public static final int TYPE_RANDOM
- See Also:
- Constant Field Values
type
protected int type
maxx
protected int maxx
maxy
protected int maxy
JGraphSimpleLayout
public JGraphSimpleLayout(int type)
JGraphSimpleLayout
public JGraphSimpleLayout(int type,
int maxx,
int maxy)
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 java.lang.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 java.lang.Object
Copyright (C) 2001-2009 JGraph Ltd. All rights reserved.