|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpl.edu.agh.cast.schema.editor.layout.algorithm.AbstractLayoutAlgorithm
pl.edu.agh.cast.schema.editor.layout.algorithm.AbstractGroupingLayoutAlgorithm
public abstract class AbstractGroupingLayoutAlgorithm
Abstract layout algorithm that provides helper methods for algorithms requiring grouping entities. Provides methods for finding main entities, neighbors, not connected nodes etc.
Constructor Summary | |
---|---|
AbstractGroupingLayoutAlgorithm()
|
Method Summary | |
---|---|
protected void |
drawNotConnected(Collection<ISchemaNode> notConnected)
Lays out the nodes provided in argument horizontally in the upper left corner of the diagram |
protected List<ISchemaNode> |
getMainEntities(Collection<ISchemaNode> nodes)
Returns a list of nodes that are marked as main. |
protected List<ISchemaNode> |
getNeighbors(Collection<ISchemaNode> nodes,
ISchemaNode mainNode)
Returns list of nodes connected with a given node |
protected List<ISchemaNode> |
getNotConnected(Collection<ISchemaNode> nodes)
Searches for nodes that are not connected to any other node |
protected boolean |
isConnected(ISchemaNode first,
ISchemaNode second)
Checks for a connection between two nodes |
Methods inherited from class pl.edu.agh.cast.schema.editor.layout.algorithm.AbstractLayoutAlgorithm |
---|
getCenterOfGravity, getUpperLeftCorner, getWorkUnits, layoutNodes, setNodesPositions |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractGroupingLayoutAlgorithm()
Method Detail |
---|
protected List<ISchemaNode> getMainEntities(Collection<ISchemaNode> nodes)
nodes
- collection of nodes to be searched
protected List<ISchemaNode> getNeighbors(Collection<ISchemaNode> nodes, ISchemaNode mainNode)
nodes
- collection of nodes to be consideredmainNode
- node whose neighbors should be found
protected List<ISchemaNode> getNotConnected(Collection<ISchemaNode> nodes)
nodes
- collection of nodes to consider
protected boolean isConnected(ISchemaNode first, ISchemaNode second)
first
- first nodesecond
- second node
protected void drawNotConnected(Collection<ISchemaNode> notConnected)
notConnected
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |