pl.edu.agh.cast.schema.editor.layout.algorithm
Class GroupLayoutAlgorithm

java.lang.Object
  extended by pl.edu.agh.cast.schema.editor.layout.algorithm.AbstractLayoutAlgorithm
      extended by pl.edu.agh.cast.schema.editor.layout.algorithm.AbstractGroupingLayoutAlgorithm
          extended by pl.edu.agh.cast.schema.editor.layout.algorithm.GroupLayoutAlgorithm
All Implemented Interfaces:
ILayoutAlgorithm

public class GroupLayoutAlgorithm
extends AbstractGroupingLayoutAlgorithm

Group layout algorithm.

Author:
AGH CAST Team

Constructor Summary
GroupLayoutAlgorithm()
           
 
Method Summary
protected  int childrenCount(ISchemaNode entity, ISchemaNode parent, List<ISchemaNode> cycle)
           
protected  List<ISchemaNode> getCycles(Collection<ISchemaNode> entityList, org.eclipse.core.runtime.IProgressMonitor monitor)
           
protected  int getPosterityCount(ISchemaNode entity, List<ISchemaNode> cycle)
           
protected  int getWorkUnits(int nodesCount)
          Queries for number of planned work units in the algorithm
 void setNodesPositions(Collection<ISchemaNode> positionNodes, org.eclipse.core.runtime.IProgressMonitor monitor)
          Sets positions of given nodes.
 
Methods inherited from class pl.edu.agh.cast.schema.editor.layout.algorithm.AbstractGroupingLayoutAlgorithm
drawNotConnected, getMainEntities, getNeighbors, getNotConnected, isConnected
 
Methods inherited from class pl.edu.agh.cast.schema.editor.layout.algorithm.AbstractLayoutAlgorithm
getCenterOfGravity, getUpperLeftCorner, layoutNodes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupLayoutAlgorithm

public GroupLayoutAlgorithm()
Method Detail

setNodesPositions

public 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 layout
monitor - non-null progress monitor
See Also:
#setNodesPositions(java.util.Collection, org.eclipse.core.runtime.IProgressMonitor)

getCycles

protected List<ISchemaNode> getCycles(Collection<ISchemaNode> entityList,
                                      org.eclipse.core.runtime.IProgressMonitor monitor)

getPosterityCount

protected int getPosterityCount(ISchemaNode entity,
                                List<ISchemaNode> cycle)

childrenCount

protected int childrenCount(ISchemaNode entity,
                            ISchemaNode parent,
                            List<ISchemaNode> cycle)

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.