public class SugiyamaLayoutAlgorithm extends ProcessLayouter
LAYOUT_HORIZONTAL, LAYOUT_VERTICAL
Constructor and Description |
---|
SugiyamaLayoutAlgorithm(boolean topToBttom,
int distanceX,
int distanceY,
boolean centerNodes,
boolean shortenEdges,
boolean scatterEdges)
Constructor for external calls.
|
SugiyamaLayoutAlgorithm(boolean topToBottom,
java.util.Properties properties)
standard Inubit Workbench constructor
reads all settings from the Properties
|
SugiyamaLayoutAlgorithm(java.util.Properties properties)
standard Inubit Workbench constructor
reads all settings from the Properties
|
Modifier and Type | Method and Description |
---|---|
protected void |
applyMainAlgorithm(AbstractModelAdapter model,
int xOffSet,
int yOffset) |
protected LayerStructure |
buildLayers(AbstractModelAdapter model,
TopologicalSorter _sorter) |
protected void |
clearTemporaryData(AbstractModelAdapter model)
should be executed before running the algorithm
|
java.lang.String |
getDisplayName() |
boolean |
getShortenEdges() |
boolean |
getTopToBottom()
Tells you if the model was layouted top to bottom (true) or left to right (false)
|
void |
layoutModel(AbstractModelAdapter model,
int xstart,
int ystart,
int direction)
start and direction are not needed
|
protected void |
optimizePositioning(AbstractModelAdapter model,
TopologicalSorter _sorter,
LayerStructure _layers,
int xOffset,
int yOffset) |
void |
setSelectedNode(NodeInterface selectedNode) |
void |
setShortenEdges(boolean f_shortenEdges) |
protected TopologicalSorter |
topologicalSorting(AbstractModelAdapter model) |
void |
writeCoords(NodeWrapper node,
AbstractModelAdapter model)
writes the coords which were determined by the algorithm back to the nodes
and routes all edges
|
getUnroutedEdges, layoutModel
public SugiyamaLayoutAlgorithm(boolean topToBttom, int distanceX, int distanceY, boolean centerNodes, boolean shortenEdges, boolean scatterEdges)
public SugiyamaLayoutAlgorithm(boolean topToBottom, java.util.Properties properties)
public SugiyamaLayoutAlgorithm(java.util.Properties properties)
public java.lang.String getDisplayName()
getDisplayName
in class ProcessLayouter
public void layoutModel(AbstractModelAdapter model, int xstart, int ystart, int direction) throws java.lang.Exception
layoutModel
in class ProcessLayouter
direction
- One of LAYOUT_VERTICAL or LAYOUT_HORIZONTALjava.lang.Exception
protected void clearTemporaryData(AbstractModelAdapter model)
model
- protected void applyMainAlgorithm(AbstractModelAdapter model, int xOffSet, int yOffset)
protected LayerStructure buildLayers(AbstractModelAdapter model, TopologicalSorter _sorter)
protected TopologicalSorter topologicalSorting(AbstractModelAdapter model)
protected void optimizePositioning(AbstractModelAdapter model, TopologicalSorter _sorter, LayerStructure _layers, int xOffset, int yOffset)
public void writeCoords(NodeWrapper node, AbstractModelAdapter model)
node
- model
- public void setSelectedNode(NodeInterface selectedNode)
setSelectedNode
in class ProcessLayouter
public void setShortenEdges(boolean f_shortenEdges)
public boolean getShortenEdges()
public boolean getTopToBottom()