Class SugiyamaLayoutAlgorithm
java.lang.Object
org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm
org.eclipse.zest.layouts.algorithms.SugiyamaLayoutAlgorithm
- All Implemented Interfaces:
- LayoutAlgorithm
The SugiyamaLayoutAlgorithm class implements an algorithm to arrange a
 directed graph in a layered tree-like layout. The final presentation follows
 five design principles for enhanced readability:
 - Hierarchical layout of vertices - Least crossings of lines (edges) -
 Straightness of lines when ever possible - Close layout of vertices connected
 to each other, i.e. short paths - Balanced layout of lines coming into or
 going from a vertex
 For further information see http://dx.doi.org/10.1109/TSMC.1981.4308636
 This layout algorithm works only with - directed graphs (
 
ZestStyles.CONNECTIONS_DIRECTED) - graphs without cycles (otherwise
 an appropriate RuntimeException is thrown)- Since:
- 2.0
- 
Nested Class SummaryNested classes/interfaces inherited from class org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithmAbstractLayoutAlgorithm.Zest1
- 
Field SummaryFields inherited from class org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithmcontext
- 
Constructor SummaryConstructorsConstructorDescriptionSugiyamaLayoutAlgorithm(int dir) SugiyamaLayoutAlgorithm(int dir, Dimension dim) Constructs a tree-like, layered layout of a directed graph.
- 
Method SummaryModifier and TypeMethodDescriptionvoidapplyLayout(boolean clean) Makes this algorithm perform layout computation and apply it to its context.Methods inherited from class org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithmsetLayoutContext
- 
Constructor Details- 
SugiyamaLayoutAlgorithmConstructs a tree-like, layered layout of a directed graph.- Parameters:
- dir- -- SWT.HORIZONTAL: left to right -- SWT.VERTICAL: top to bottom
- dim- - desired size of the layout area. Uses- LayoutContext.getBounds()if not set
 
- 
SugiyamaLayoutAlgorithmpublic SugiyamaLayoutAlgorithm(int dir) 
- 
SugiyamaLayoutAlgorithmpublic SugiyamaLayoutAlgorithm()
 
- 
- 
Method Details- 
applyLayoutpublic void applyLayout(boolean clean) Description copied from interface:LayoutAlgorithmMakes this algorithm perform layout computation and apply it to its context.- Parameters:
- clean- if true the receiver should assume that the layout context has changed significantly and recompute the whole layout even if it keeps track of changes with listeners. False can be used after dynamic layout in a context is turned back on so that layout algorithm working in background can apply accumulated changes. Static layout algorithm can ignore this call entirely if clean is false.
 
 
-