pl.edu.agh.cast.schema.editor.layout.algorithm
Class RandomLayoutAlgorithm
java.lang.Object
pl.edu.agh.cast.schema.editor.layout.algorithm.AbstractLayoutAlgorithm
pl.edu.agh.cast.schema.editor.layout.algorithm.RandomLayoutAlgorithm
- All Implemented Interfaces:
- ILayoutAlgorithm
public class RandomLayoutAlgorithm
- extends AbstractLayoutAlgorithm
An example algorithm, laying out nodes randomly.
- Author:
- AGH CAST Team
Method Summary |
protected int |
getWorkUnits(int nodesCount)
Queries for number of planned work units in the algorithm |
protected void |
setNodesPositions(Collection<ISchemaNode> positionNodes,
org.eclipse.core.runtime.IProgressMonitor monitor)
Sets positions of given nodes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RandomLayoutAlgorithm
public RandomLayoutAlgorithm()
setNodesPositions
protected void setNodesPositions(Collection<ISchemaNode> positionNodes,
org.eclipse.core.runtime.IProgressMonitor monitor)
- Sets positions of given nodes.
- Specified by:
setNodesPositions
in class AbstractLayoutAlgorithm
- Parameters:
positionNodes
- nodes to layoutmonitor
- non-null progress monitor- See Also:
#setNodesPositions(java.util.Collection, org.eclipse.core.runtime.IProgressMonitor)
getWorkUnits
protected int getWorkUnits(int nodesCount)
- Description copied from class:
AbstractLayoutAlgorithm
- Queries for number of planned work units in the algorithm
- Specified by:
getWorkUnits
in class AbstractLayoutAlgorithm
- Parameters:
nodesCount
- number of nodes to layout
- Returns:
- number of units that will be added to progress monitor's maximum range
Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.