Changes for page KIML Layout Options

Last modified by Alexander Schulz-Rosengarten on 2023/09/11 16:17

From version 24.1
edited by cds
on 2014/03/14 14:31
Change comment: There is no comment for this version
To version 18.1
edited by msp
on 2014/03/07 17:04
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.cds
1 +XWiki.msp
Content
... ... @@ -1,6 +1,8 @@
1 -
1 +{{warning}}
2 +This is preliminary and incomplete documentation. You've been warned.
3 +{{/warning}}
2 2  
3 -KIML defines a whole set of standard layout options that many layout algorithms support. When an option is supported by an algorithm, that algorithm may override the option's default value. Algorithms may also provide more specialized documentation for layout options.
5 +KIML defines a whole set of standard layout options that many layout algorithms support. Whether an algorithm supports a layout option depends on the option and on the algorithm. When an option is supported by an algorithm, that algorithm may override the option's default value. Algorithms may also provide more specialized documentation for layout options.
4 4  
5 5  **Contents**
6 6  
... ... @@ -14,7 +14,7 @@
14 14  
15 15  * An ID to identify them.
16 16  * A type. One of Boolean, String, Int, Float, Enum, EnumSet (a s{{code language="none"}}et{{/code}} over a given enumeration), or Object (a non-primitive Java object). The types Enum and EnumSet have to be further defined by an enumeration class. The Object type can be constricted to a certain Java class.
17 -* The kinds of graph objects the option applies to. At least one of Nodes, Edges, Ports, Labels, or Parents (nodes that have children, including the diagram root node). Parents-applicable options affect whole graphs or subgraphs, while options with other application targets affect only single graph elements.
19 +* The kinds of graph objects the option applies to. At least one of Parents (nodes that have children, including the diagram root node), Nodes, Edges, Ports, or Labels.
18 18  * An optional default value. A default value may also be provided by the layout algorithm using the option, or by the modeling application you are using. In these cases the value given here is overridden.
19 19  
20 20  Layout options can be assigned to two main categories: user options and programmatic options.
... ... @@ -35,7 +35,7 @@
35 35  Default
36 36  )))
37 37  |(((
38 -[[Alignment>>doc:||anchor="alignment"]]
40 +Alignment
39 39  )))|(((
40 40  de.cau.cs.kieler.alignment
41 41  )))|(((
... ... @@ -46,7 +46,7 @@
46 46  AUTOMATIC
47 47  )))
48 48  |(((
49 -[[Aspect Ratio>>doc:||anchor="aspectRatio"]]
51 +Aspect Ratio
50 50  )))|(((
51 51  de.cau.cs.kieler.aspectRatio
52 52  )))|(((
... ... @@ -133,22 +133,6 @@
133 133  )))|(((
134 134  false
135 135  )))
136 -|(% colspan="1" %)(% colspan="1" %)
137 -(((
138 -Label Side
139 -)))|(% colspan="1" %)(% colspan="1" %)
140 -(((
141 -de.cau.cs.kieler.labelSide
142 -)))|(% colspan="1" %)(% colspan="1" %)
143 -(((
144 -Enum
145 -)))|(% colspan="1" %)(% colspan="1" %)
146 -(((
147 -Parents
148 -)))|(% colspan="1" %)(% colspan="1" %)
149 -(((
150 -SMART
151 -)))
152 152  |(((
153 153  Label Spacing
154 154  )))|(((
... ... @@ -162,7 +162,7 @@
162 162  
163 163  )))
164 164  |(((
165 -[[Layout Hierarchy>>doc:||anchor="layoutHierarchy"]]
151 +Layout Hierarchy
166 166  )))|(((
167 167  de.cau.cs.kieler.layoutHierarchy
168 168  )))|(((
... ... @@ -363,54 +363,6 @@
363 363  )))|=(((
364 364  Default
365 365  )))
366 -|(% colspan="1" %)(% colspan="1" %)
367 -(((
368 -Animate
369 -)))|(% colspan="1" %)(% colspan="1" %)
370 -(((
371 -de.cau.cs.kieler.animate
372 -)))|(% colspan="1" %)(% colspan="1" %)
373 -(((
374 -Boolean
375 -)))|(% colspan="1" %)(% colspan="1" %)
376 -(((
377 -Parents
378 -)))|(% colspan="1" %)(% colspan="1" %)
379 -(((
380 -true
381 -)))
382 -|(% colspan="1" %)(% colspan="1" %)
383 -(((
384 -Animation Time Factor
385 -)))|(% colspan="1" %)(% colspan="1" %)
386 -(((
387 -de.cau.cs.kieler.animTimeFactor
388 -)))|(% colspan="1" %)(% colspan="1" %)
389 -(((
390 -Int
391 -)))|(% colspan="1" %)(% colspan="1" %)
392 -(((
393 -Parents
394 -)))|(% colspan="1" %)(% colspan="1" %)
395 -(((
396 -100
397 -)))
398 -|(% colspan="1" %)(% colspan="1" %)
399 -(((
400 -[[Comment Box>>doc:||anchor="commentBox"]]
401 -)))|(% colspan="1" %)(% colspan="1" %)
402 -(((
403 -de.cau.cs.kieler.commentBox
404 -)))|(% colspan="1" %)(% colspan="1" %)
405 -(((
406 -Boolean
407 -)))|(% colspan="1" %)(% colspan="1" %)
408 -(((
409 -Nodes
410 -)))|(% colspan="1" %)(% colspan="1" %)
411 -(((
412 -false
413 -)))
414 414  |(((
415 415  [[Diagram Type>>doc:||anchor="diagramType"]]
416 416  )))|(((
... ... @@ -483,7 +483,7 @@
483 483  )))
484 484  |(% colspan="1" %)(% colspan="1" %)
485 485  (((
486 -[[Hypernode>>doc:||anchor="hypernode"]]
424 +Hypernode
487 487  )))|(% colspan="1" %)(% colspan="1" %)
488 488  (((
489 489  de.cau.cs.kieler.hypernode
... ... @@ -499,54 +499,6 @@
499 499  )))
500 500  |(% colspan="1" %)(% colspan="1" %)
501 501  (((
502 -Layout Ancestors
503 -)))|(% colspan="1" %)(% colspan="1" %)
504 -(((
505 -de.cau.cs.kieler.layoutAncestors
506 -)))|(% colspan="1" %)(% colspan="1" %)
507 -(((
508 -Boolean
509 -)))|(% colspan="1" %)(% colspan="1" %)
510 -(((
511 -Parents
512 -)))|(% colspan="1" %)(% colspan="1" %)
513 -(((
514 -false
515 -)))
516 -|(% colspan="1" %)(% colspan="1" %)
517 -(((
518 -Maximal Animation Time
519 -)))|(% colspan="1" %)(% colspan="1" %)
520 -(((
521 -de.cau.cs.kieler.maxAnimTim
522 -)))|(% colspan="1" %)(% colspan="1" %)
523 -(((
524 -Int
525 -)))|(% colspan="1" %)(% colspan="1" %)
526 -(((
527 -Parents
528 -)))|(% colspan="1" %)(% colspan="1" %)
529 -(((
530 -4000
531 -)))
532 -|(% colspan="1" %)(% colspan="1" %)
533 -(((
534 -Minimal Animation Time
535 -)))|(% colspan="1" %)(% colspan="1" %)
536 -(((
537 -de.cau.cs.kieler.minAnimTim
538 -)))|(% colspan="1" %)(% colspan="1" %)
539 -(((
540 -Int
541 -)))|(% colspan="1" %)(% colspan="1" %)
542 -(((
543 -Parents
544 -)))|(% colspan="1" %)(% colspan="1" %)
545 -(((
546 -400
547 -)))
548 -|(% colspan="1" %)(% colspan="1" %)
549 -(((
550 550  Minimal Height
551 551  )))|(% colspan="1" %)(% colspan="1" %)
552 552  (((
... ... @@ -581,7 +581,7 @@
581 581  )))
582 582  |(% colspan="1" %)(% colspan="1" %)
583 583  (((
584 -[[No Layout>>doc:||anchor="noLayout"]]
474 +No Layout
585 585  )))|(% colspan="1" %)(% colspan="1" %)
586 586  (((
587 587  de.cau.cs.kieler.noLayout
... ... @@ -597,22 +597,6 @@
597 597  )))
598 598  |(% colspan="1" %)(% colspan="1" %)
599 599  (((
600 -Port Index
601 -)))|(% colspan="1" %)(% colspan="1" %)
602 -(((
603 -de.cau.cs.kieler.portIndex
604 -)))|(% colspan="1" %)(% colspan="1" %)
605 -(((
606 -Int
607 -)))|(% colspan="1" %)(% colspan="1" %)
608 -(((
609 -Ports
610 -)))|(% colspan="1" %)(% colspan="1" %)
611 -(((
612 -
613 -)))
614 -|(% colspan="1" %)(% colspan="1" %)
615 -(((
616 616  [[Port Offset>>doc:||anchor="portOffset"]]
617 617  )))|(% colspan="1" %)(% colspan="1" %)
618 618  (((
... ... @@ -643,109 +643,9 @@
643 643  (((
644 644  
645 645  )))
646 -|(% colspan="1" %)(% colspan="1" %)
647 -(((
648 -Progress Bar
649 -)))|(% colspan="1" %)(% colspan="1" %)
650 -(((
651 -de.cau.cs.kieler.progressBar
652 -)))|(% colspan="1" %)(% colspan="1" %)
653 -(((
654 -Boolean
655 -)))|(% colspan="1" %)(% colspan="1" %)
656 -(((
657 -Parents
658 -)))|(% colspan="1" %)(% colspan="1" %)
659 -(((
660 -false
661 -)))
662 -|(% colspan="1" %)(% colspan="1" %)
663 -(((
664 -Scale Factor
665 -)))|(% colspan="1" %)(% colspan="1" %)
666 -(((
667 -de.cau.cs.kieler.scaleFactor
668 -)))|(% colspan="1" %)(% colspan="1" %)
669 -(((
670 -Float
671 -)))|(% colspan="1" %)(% colspan="1" %)
672 -(((
673 -Nodes
674 -)))|(% colspan="1" %)(% colspan="1" %)
675 -(((
676 -1.0
677 -)))
678 -|(% colspan="1" %)(% colspan="1" %)
679 -(((
680 -Thickness
681 -)))|(% colspan="1" %)(% colspan="1" %)
682 -(((
683 -de.cau.cs.kieler.thickness
684 -)))|(% colspan="1" %)(% colspan="1" %)
685 -(((
686 -Float
687 -)))|(% colspan="1" %)(% colspan="1" %)
688 -(((
689 -Edges
690 -)))|(% colspan="1" %)(% colspan="1" %)
691 -(((
692 -1.0
693 -)))
694 -|(% colspan="1" %)(% colspan="1" %)
695 -(((
696 -Zoom to Fit
697 -)))|(% colspan="1" %)(% colspan="1" %)
698 -(((
699 -de.cau.cs.kieler.zoomToFit
700 -)))|(% colspan="1" %)(% colspan="1" %)
701 -(((
702 -Boolean
703 -)))|(% colspan="1" %)(% colspan="1" %)
704 -(((
705 -Parents
706 -)))|(% colspan="1" %)(% colspan="1" %)
707 -(((
708 -false
709 -)))
710 710  
711 -=== Layout Output Properties ===
712 -
713 -A few properties are used as additional information in the output of a layout algorithm. This information should be considered when the layout is applied to the original diagram
714 -
715 -|=(((
716 -Property
717 -)))|=(((
718 -ID
719 -)))|=(((
720 -Type
721 -)))|=(((
722 -Applies to
723 -)))
724 -|(((
725 -[[Edge Routing>>doc:||anchor="edgeRouting"]]
726 -)))|(((
727 -de.cau.cs.kieler.edgeRouting
728 -)))|(((
729 -Enum
730 -)))|(((
731 -Edges
732 -)))
733 -|(((
734 -Junction Points
735 -)))|(((
736 -de.cau.cs.kieler.junctionPoints
737 -)))|(((
738 -Object
739 -)))|(((
740 -Edges
741 -)))
742 -
743 -
744 -
745 745  = Detailed Documentation =
746 746  
747 -This section explains every layout option in more detail.
748 -
749 749  == The Most Important Options ==
750 750  
751 751  While most layout options are used to affect how the active layout algorithm computes concrete coordinates for the graph elements, there are some layout options that have a special role in KIML.
... ... @@ -754,15 +754,19 @@
754 754  
755 755  {{id name="layoutAlgorithm"/}}
756 756  
757 -The option with identifier {{code language="none"}}de.cau.cs.kieler.algorithm{{/code}} specifies which layout algorithm to use for a graph or subgraph. The value can be either the identifier of a layout algorithm or the identifier of a layout type. In the latter case the algorithm with highest priority of that type is applied. It is possible to set different values for this option on subgraphs of a hierarchical graph, where a subgraph is identified by a parent node. A layout algorithm is responsible to process only the direct content of a given parent node. An exception from this rule is made when the [[Layout Hierarchy>>doc:||anchor="layoutHierarchy"]] option is active.
531 +The option with identifier {{code language="none"}}de.cau.cs.kieler.algorithm{{/code}} specifies which layout algorithm to use for the content of a composite node. The value can be either the identifier of a layout algorithm or the identifier of a layout type. In the latter case the algorithm with highest priority of that type is applied.
758 758  
759 -The following layout has been created by setting a force-based layout algorithm on the inner hierarchy level and a layer-based layout algorithm on the top level.
533 +The following layout types are predefined:
760 760  
761 -[[image:attach:layout_algorithm.png]]
535 +* **Layered** - The layer-based method emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.
536 +* **Orthogonal** - Orthogonal methods follow the "topology-shape-metrics" approach, which first applies a planarization technique, resulting in a planar representation of the graph, then compute an orthogonal shape, and finally determine concrete coordinates for nodes and edge bend points by applying a compaction method.
537 +* **Force** - Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces.
538 +* **Circular** - Circular layout algorithms emphasize biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent properties of the graph.
539 +* **Tree** - Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type.
762 762  
763 -==== Available Algorithms and Libraries ====
541 +=== Available Algorithms and Libraries ===
764 764  
765 -* **The [[KLay Project>>doc:Layout Algorithms (KLay)]]** - Java implementations of standard layout approaches, augmented with special processing of graph features such as ports and labels.
543 +* **The [[KLay Project>>doc:Layout Algorithms (KLay)]]** - Java implementations of standard layout approaches, augmented with special processing of graph features such as ports and edge labels.
766 766  * **Randomizer** - Distributes the nodes randomly; not very useful, but it can show how important a good layout is for understanding a graph.
767 767  * (((
768 768  **Box Layout** - Ignores edges, places all nodes in rows. Can be used to layout collections of unconnected boxes, such as Statechart regions.
... ... @@ -771,14 +771,6 @@
771 771  * **OGDF** ((% style="color: rgb(0,0,0);" %)[[www.ogdf.net>>url:http://www.ogdf.net/||shape="rect"]](%%)) - A self-contained C++ class library for the automatic layout of diagrams. The version that is shipped with KIELER is compiled as an executable that reads files in OGML format and outputs the computed concrete layout.
772 772  * **Graphviz** ([[www.graphviz.org>>url:http://www.graphviz.org/||shape="rect"]]) - An open source graph visualization tool with several graph layout programs, web and interactive graphical interfaces, auxiliary tools, libraries, and language bindings. Graphviz needs to be installed separately in order to be used within KIELER, since it is called in a separate process using the DOT language for communication.
773 773  
774 -==== Predefined Layout Types ====
775 -
776 -* **Layered** - The layer-based method emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.
777 -* **Orthogonal** - Orthogonal methods follow the "topology-shape-metrics" approach, which first applies a planarization technique, resulting in a planar representation of the graph, then compute an orthogonal shape, and finally determine concrete coordinates for nodes and edge bend points by applying a compaction method.
778 -* **Force** - Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces.
779 -* **Circular** - Circular layout algorithms emphasize biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent properties of the graph.
780 -* **Tree** - Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type.
781 -
782 782  === Diagram Type ===
783 783  
784 784  {{id name="diagramType"/}}
... ... @@ -794,6 +794,15 @@
794 794  * **Use Case Diagram** - Use case diagrams as defined by the UML.
795 795  * **Unconnected Boxes** - Sets of nodes that have no connections and are treated as resizable boxes. This is related to mathematical [[packing problems>>url:http://en.wikipedia.org/wiki/Packing_problem||shape="rect"]]. Example: Regions in [[doc:SCCharts SyncCharts]].
796 796  
567 +== Other Options ==
568 +
569 +* **Layout Hierarchy** ({{code language="none"}}de.cau.cs.kieler.layoutHierarchy{{/code}}) - If this option is supported and active, the layout algorithm is requested to process the full hierarchy contained in the input node. This means that instead of executing another algorithm on each hierarchy level, all levels are arranged in a single algorithm execution.
570 +* **Hypernode** ({{code language="none"}}de.cau.cs.kieler.hypernode{{/code}}) - A node that is marked as hypernode has a special role in the graph structure, since all its incident edges are treated as parts of the same [[hyperedge>>url:http://en.wikipedia.org/wiki/Hypergraph||shape="rect"]]. Example: relation vertices in [[Ptolemy>>url:http://ptolemy.eecs.berkeley.edu/||shape="rect"]] models.
571 +* **Comment Box** ({{code language="none"}}de.cau.cs.kieler.commentBox{{/code}}) - A node that is marked as comment box is treated as a label that needs to be placed somewhere. This is different to normal node labels, which are usually regarded as fixed.
572 +* **No Layout** ({{code language="none"}}de.cau.cs.kieler.noLayout{{/code}}) - Elements that are marked with this option are excluded from layout. This is used to identify diagram objects that should not be regarded as graph elements.
573 +
574 +This section explains every layout option in more detail.
575 +
797 797  === Edge Routing ===
798 798  
799 799  {{id name="edgeRouting"/}}
... ... @@ -803,66 +803,14 @@
803 803  * POLYLINE
804 804  Edges consist of one or more segments defined by a list of bend points.
805 805  * ORTHOGONAL
806 -Edges are routed orthogonally, meaning that each segment of an edge runs either horizontally or vertically.
807 -* SPLINES
808 -Edges are routed as splines (smooth curves).
585 +Edges are routed orthogonally, meaning that each segment of an edge runs either horizontally or vertically, but never at an angle.
586 +* SPLINE
587 +Edges are routed as splines (smooth curves). (% style="color: rgb(153,51,0);" %)**TODO:** Add more documentation on how the returned bend points are to be interpreted.
809 809  * UNDEFINED
810 -No particular edge routing style is selected. Usually this value points to the default setting of the selected layout algorithm.
589 +No particular edge routing style is selected. The result produced by the layout algorithm may be undefined.
811 811  
812 -[[image:attach:edge_routing.png]]
591 +(% style="color: rgb(153,51,0);" %)**TODO:** Add an image illustrating the different routing styles.
813 813  
814 -When used as layout option, the edge routing is set for a whole graph or subgraph, i.e. on a parent node. However, the property is additionally used for the output of the layout algorithm in order to mark individual edges. If the edge routing assigned to an edge is anything other than SPLINES, the bend points of that edge are interpreted with their normal meaning, i.e. straight lines are drawn between consecutive bend points. If, on the other hand, a layout algorithm marks an edge with the value SPLINES, the bend points have to be interpreted as control points for a series of cubic splines following this procedure:
815 -
816 -1. Start at the source point of the edge.
817 -1. As long as there are at least three bend points left:
818 -11. Draw a cubic spline segment to the third bend point with the other two bend points as control points.
819 -11. Use the third bend point as start point for the next segment.
820 -11. Consume the three bend points and proceed to the next segment.
821 -1. Check the number of remaining bend points:
822 -11. Two bend points – draw a cubic spline segment to the target point of the edge.
823 -11. One bend point – draw a quadratic spline segment to the target point of the edge.
824 -11. No bend point – draw a straight line to the target point of the edge.
825 -
826 -== Other Options ==
827 -
828 -=== Alignment ===
829 -
830 -{{id name="alignment"/}}
831 -
832 -Determines the alignment of a node in relation to other nodes of the same row or column. For layer-based algorithms, for instance, this option controls how a node is positioned inside its assigned layer.
833 -
834 -=== Aspect Ratio ===
835 -
836 -{{id name="aspectRatio"/}}
837 -
838 -The aspect ratio of a drawing is the ratio of its total width to its total height. This option gives some control over that ratio, although in most cases it is only interpreted as a hint on how to arrange multiple connected components, hence the actual aspect ratio will probably be different from what has been specified with the option.
839 -
840 -=== Comment Box ===
841 -
842 -{{id name="commentBox"/}}
843 -
844 -A node that is marked as comment box is treated as a label that needs to be placed somewhere. In contrast to normal node labels (modeled with a KLabel instance), comment boxes may have connections to other nodes, as in the following example.
845 -
846 -[[image:attach:comment_box.png]]
847 -
848 -=== (% style="line-height: 1.5625;" %)Hypernode(%%) ===
849 -
850 -{{id name="hypernode"/}}
851 -
852 -A node that is marked as hypernode has a special role in the graph structure, since all its incident edges are treated as parts of the same [[hyperedge>>url:http://en.wikipedia.org/wiki/Hypergraph||shape="rect"]]. Example: relation vertices in [[Ptolemy>>url:http://ptolemy.eecs.berkeley.edu/||shape="rect"]] models.
853 -
854 -=== Layout Hierarchy ===
855 -
856 -{{id name="layoutHierarchy"/}}
857 -
858 -If this option is supported and active, the layout algorithm is requested to process the full hierarchy contained in the input node. This means that instead of executing another algorithm on each hierarchy level, all levels are arranged in a single algorithm execution.
859 -
860 -=== No Layout ===
861 -
862 -{{id name="noLayout"/}}
863 -
864 -Elements that are marked with this option are excluded from layout. This is used to identify diagram objects that should not be regarded as graph elements.
865 -
866 866  === Port Offset ===
867 867  
868 868  {{id name="portOffset"/}}
Confluence.Code.ConfluencePageClass[0]
Id
... ... @@ -1,1 +1,1 @@
1 -9470074
1 +9470010
URL
... ... @@ -1,1 +1,1 @@
1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/9470074/KIML Layout Options
1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/9470010/KIML Layout Options