Wiki source code of KIML Layout Options

Version 19.1 by msp on 2014/03/08 20:04

Hide last authors
cds 1.1 1 {{warning}}
cds 11.1 2 This is preliminary and incomplete documentation. You've been warned.
cds 1.1 3 {{/warning}}
4
msp 18.1 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.
cds 1.1 6
7 **Contents**
8
9
cds 7.1 10
msp 18.1 11 {{toc maxLevel="2"/}}
cds 7.1 12
cds 1.1 13 = Overview =
14
msp 18.1 15 Beside a user-friendly name, layout options are defined by the following properties:
cds 1.1 16
17 * An ID to identify them.
msp 18.1 18 * 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.
msp 19.1 19 * 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.
msp 18.1 20 * 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.
cds 1.1 21
msp 18.1 22 Layout options can be assigned to two main categories: user options and programmatic options.
cds 1.1 23
msp 18.1 24 == User Options ==
25
26 User options are those that you can see in the "//Layout View//" available in Eclipse if the KIML user interface is installed. That view is restricted to layout options that are supported by the currently active layout algorithm. Furthermore, some options are visible only when the //Show Advanced Properties// button is active in the view.
27
cds 1.1 28 |=(((
29 Option
30 )))|=(((
31 ID
32 )))|=(((
33 Type
34 )))|=(((
35 Applies to
36 )))|=(((
37 Default
38 )))
39 |(((
40 Alignment
41 )))|(((
42 de.cau.cs.kieler.alignment
43 )))|(((
44 Enum
45 )))|(((
46 Nodes
47 )))|(((
48 AUTOMATIC
49 )))
50 |(((
51 Aspect Ratio
52 )))|(((
53 de.cau.cs.kieler.aspectRatio
54 )))|(((
55 Float
56 )))|(((
57 Parents
58 )))|(((
59 0.0
60 )))
61 |(((
62 Bend Points
63 )))|(((
64 de.cau.cs.kieler.bendPoints
65 )))|(((
66 Object
67 )))|(((
68 Edges
69 )))|(((
70
71 )))
72 |(((
73 Border Spacing
74 )))|(((
75 de.cau.cs.kieler.borderSpacing
76 )))|(((
77 Float
78 )))|(((
79 Parents
80 )))|(((
msp 17.1 81
cds 1.1 82 )))
83 |(((
84 Debug Mode
85 )))|(((
86 de.cau.cs.kieler.debugMode
87 )))|(((
88 Boolean
89 )))|(((
90 Parents
91 )))|(((
92 false
93 )))
94 |(((
95 Direction
96 )))|(((
97 de.cau.cs.kieler.direction
98 )))|(((
99 Enum
100 )))|(((
101 Parents
102 )))|(((
msp 17.1 103
cds 1.1 104 )))
105 |(((
cds 13.1 106 [[Edge Routing>>doc:||anchor="edgeRouting"]]
cds 1.1 107 )))|(((
108 de.cau.cs.kieler.edgeRouting
109 )))|(((
110 Enum
111 )))|(((
112 Parents
113 )))|(((
msp 17.1 114
cds 1.1 115 )))
116 |(((
117 Expand Nodes
118 )))|(((
119 de.cau.cs.kieler.expandNodes
120 )))|(((
121 Boolean
122 )))|(((
123 Parents
124 )))|(((
125 false
126 )))
127 |(((
128 Interactive
129 )))|(((
130 de.cau.cs.kieler.interactive
131 )))|(((
132 Boolean
133 )))|(((
134 Parents
135 )))|(((
136 false
137 )))
138 |(((
139 Label Spacing
140 )))|(((
141 de.cau.cs.kieler.labelSpacing
142 )))|(((
143 Float
144 )))|(((
145 Edges
146 Nodes
147 )))|(((
msp 17.1 148
cds 1.1 149 )))
150 |(((
151 Layout Hierarchy
152 )))|(((
153 de.cau.cs.kieler.layoutHierarchy
154 )))|(((
155 Boolean
156 )))|(((
157 Parents
158 )))|(((
159 false
160 )))
161 |(((
msp 16.1 162 [[Layout Algorithm>>doc:||anchor="layoutAlgorithm"]]
cds 1.1 163 )))|(((
164 de.cau.cs.kieler.algorithm
165 )))|(((
166 String
167 )))|(((
168 Parents
169 )))|(((
170
171 )))
172 |(% colspan="1" %)(% colspan="1" %)
173 (((
msp 18.1 174 Node Label Placement
cds 1.1 175 )))|(% colspan="1" %)(% colspan="1" %)
176 (((
msp 18.1 177 de.cau.cs.kieler.nodeLabelPlacement
cds 1.1 178 )))|(% colspan="1" %)(% colspan="1" %)
179 (((
msp 18.1 180 EnumSet
cds 1.1 181 )))|(% colspan="1" %)(% colspan="1" %)
182 (((
cds 3.1 183 Nodes
cds 1.1 184 )))|(% colspan="1" %)(% colspan="1" %)
185 (((
msp 18.1 186
cds 1.1 187 )))
msp 18.1 188 |(((
189 Port Constraints
190 )))|(((
191 de.cau.cs.kieler.portConstraints
192 )))|(((
193 Enum
194 )))|(((
cds 3.1 195 Nodes
msp 18.1 196 )))|(((
197
cds 1.1 198 )))
199 |(% colspan="1" %)(% colspan="1" %)
200 (((
msp 18.1 201 Port Label Placement
cds 1.1 202 )))|(% colspan="1" %)(% colspan="1" %)
203 (((
msp 18.1 204 de.cau.cs.kieler.portLabelPlacement
cds 1.1 205 )))|(% colspan="1" %)(% colspan="1" %)
206 (((
msp 18.1 207 Enum
cds 1.1 208 )))|(% colspan="1" %)(% colspan="1" %)
209 (((
msp 18.1 210 Nodes
cds 1.1 211 )))|(% colspan="1" %)(% colspan="1" %)
212 (((
msp 18.1 213 OUTSIDE
cds 1.1 214 )))
215 |(% colspan="1" %)(% colspan="1" %)
216 (((
msp 18.1 217 Port Spacing
cds 1.1 218 )))|(% colspan="1" %)(% colspan="1" %)
219 (((
msp 18.1 220 de.cau.cs.kieler.portSpacing
cds 1.1 221 )))|(% colspan="1" %)(% colspan="1" %)
222 (((
msp 18.1 223 Float
cds 1.1 224 )))|(% colspan="1" %)(% colspan="1" %)
225 (((
226 Nodes
227 )))|(% colspan="1" %)(% colspan="1" %)
228 (((
229
230 )))
231 |(((
msp 18.1 232 Position
cds 1.1 233 )))|(((
msp 18.1 234 de.cau.cs.kieler.position
cds 1.1 235 )))|(((
msp 18.1 236 Object
cds 1.1 237 )))|(((
msp 18.1 238 Labels
cds 1.1 239 Nodes
msp 18.1 240 Ports
cds 1.1 241 )))|(((
msp 17.1 242
cds 1.1 243 )))
msp 18.1 244 |(((
245 Priority
246 )))|(((
247 de.cau.cs.kieler.priority
248 )))|(((
249 Int
250 )))|(((
251 Edges
252 Nodes
253 )))|(((
254
255 )))
cds 1.1 256 |(% colspan="1" %)(% colspan="1" %)
257 (((
msp 18.1 258 Randomization Seed
cds 1.1 259 )))|(% colspan="1" %)(% colspan="1" %)
260 (((
msp 18.1 261 de.cau.cs.kieler.randomSeed
cds 1.1 262 )))|(% colspan="1" %)(% colspan="1" %)
263 (((
msp 18.1 264 Int
cds 1.1 265 )))|(% colspan="1" %)(% colspan="1" %)
266 (((
msp 18.1 267 Parents
cds 1.1 268 )))|(% colspan="1" %)(% colspan="1" %)
269 (((
msp 18.1 270
cds 1.1 271 )))
272 |(% colspan="1" %)(% colspan="1" %)
273 (((
msp 18.1 274 Separate Connected Components
cds 1.1 275 )))|(% colspan="1" %)(% colspan="1" %)
276 (((
msp 18.1 277 de.cau.cs.kieler.separateConnComp
cds 1.1 278 )))|(% colspan="1" %)(% colspan="1" %)
279 (((
msp 18.1 280 Boolean
cds 1.1 281 )))|(% colspan="1" %)(% colspan="1" %)
282 (((
msp 18.1 283 Parents
cds 1.1 284 )))|(% colspan="1" %)(% colspan="1" %)
285 (((
286
287 )))
288 |(% colspan="1" %)(% colspan="1" %)
289 (((
msp 18.1 290 Size Constraint
cds 1.1 291 )))|(% colspan="1" %)(% colspan="1" %)
292 (((
msp 18.1 293 de.cau.cs.kieler.sizeConstraint
cds 1.1 294 )))|(% colspan="1" %)(% colspan="1" %)
295 (((
msp 18.1 296 EnumSet
cds 1.1 297 )))|(% colspan="1" %)(% colspan="1" %)
298 (((
msp 18.1 299 Nodes
cds 1.1 300 )))|(% colspan="1" %)(% colspan="1" %)
301 (((
msp 17.1 302
cds 1.1 303 )))
msp 17.1 304 |(% colspan="1" %)(% colspan="1" %)
305 (((
msp 18.1 306 Size Options
msp 17.1 307 )))|(% colspan="1" %)(% colspan="1" %)
308 (((
msp 18.1 309 de.cau.cs.kieler.sizeOptions
msp 17.1 310 )))|(% colspan="1" %)(% colspan="1" %)
311 (((
msp 18.1 312 EnumSet
msp 17.1 313 )))|(% colspan="1" %)(% colspan="1" %)
314 (((
315 Nodes
316 )))|(% colspan="1" %)(% colspan="1" %)
317 (((
msp 18.1 318 DEFAULT_MINIMUM_SIZE
319 )))
320 |(% colspan="1" %)(% colspan="1" %)
321 (((
322 Spacing
323 )))|(% colspan="1" %)(% colspan="1" %)
324 (((
325 de.cau.cs.kieler.spacing
326 )))|(% colspan="1" %)(% colspan="1" %)
327 (((
328 Float
329 )))|(% colspan="1" %)(% colspan="1" %)
330 (((
331 Parents
332 )))|(% colspan="1" %)(% colspan="1" %)
333 (((
msp 17.1 334
335 )))
msp 18.1 336
337 == Programmatic Options ==
338
339 Programmatic options are such that are meant to be configured exclusively through the KIML API. They should not be visible in the user interface.
340
341 |=(((
342 Option
343 )))|=(((
344 ID
345 )))|=(((
346 Type
347 )))|=(((
348 Applies to
349 )))|=(((
350 Default
351 )))
msp 19.1 352 |(% colspan="1" %)(% colspan="1" %)
353 (((
354 Animate
355 )))|(% colspan="1" %)(% colspan="1" %)
356 (((
357 de.cau.cs.kieler.animate
358 )))|(% colspan="1" %)(% colspan="1" %)
359 (((
360 Boolean
361 )))|(% colspan="1" %)(% colspan="1" %)
362 (((
363 Parents
364 )))|(% colspan="1" %)(% colspan="1" %)
365 (((
366 true
367 )))
368 |(% colspan="1" %)(% colspan="1" %)
369 (((
370 Animation Time Factor
371 )))|(% colspan="1" %)(% colspan="1" %)
372 (((
373 de.cau.cs.kieler.animTimeFactor
374 )))|(% colspan="1" %)(% colspan="1" %)
375 (((
376 Int
377 )))|(% colspan="1" %)(% colspan="1" %)
378 (((
379 Parents
380 )))|(% colspan="1" %)(% colspan="1" %)
381 (((
382 100
383 )))
384 |(% colspan="1" %)(% colspan="1" %)
385 (((
386 Comment Box
387 )))|(% colspan="1" %)(% colspan="1" %)
388 (((
389 de.cau.cs.kieler.commentBox
390 )))|(% colspan="1" %)(% colspan="1" %)
391 (((
392 Boolean
393 )))|(% colspan="1" %)(% colspan="1" %)
394 (((
395 Nodes
396 )))|(% colspan="1" %)(% colspan="1" %)
397 (((
398 false
399 )))
cds 1.1 400 |(((
msp 18.1 401 [[Diagram Type>>doc:||anchor="diagramType"]]
cds 1.1 402 )))|(((
msp 18.1 403 de.cau.cs.kieler.diagramType
cds 1.1 404 )))|(((
msp 18.1 405 String
cds 1.1 406 )))|(((
msp 18.1 407 Parents
cds 1.1 408 )))|(((
409
410 )))
411 |(((
msp 18.1 412 Edge Label Placement
cds 1.1 413 )))|(((
msp 18.1 414 de.cau.cs.kieler.edgeLabelPlacement
cds 1.1 415 )))|(((
msp 18.1 416 Enum
cds 1.1 417 )))|(((
msp 18.1 418 Labels
cds 1.1 419 )))|(((
420
421 )))
422 |(% colspan="1" %)(% colspan="1" %)
423 (((
msp 18.1 424 Edge Type
cds 1.1 425 )))|(% colspan="1" %)(% colspan="1" %)
426 (((
msp 18.1 427 de.cau.cs.kieler.edgeType
cds 1.1 428 )))|(% colspan="1" %)(% colspan="1" %)
429 (((
msp 18.1 430 Enum
cds 1.1 431 )))|(% colspan="1" %)(% colspan="1" %)
432 (((
msp 18.1 433 Edges
cds 1.1 434 )))|(% colspan="1" %)(% colspan="1" %)
435 (((
msp 18.1 436 NONE
437 )))
438 |(% colspan="1" %)(% colspan="1" %)
439 (((
440 Font Name
441 )))|(% colspan="1" %)(% colspan="1" %)
442 (((
443 de.cau.cs.kieler.fontName
444 )))|(% colspan="1" %)(% colspan="1" %)
445 (((
446 String
447 )))|(% colspan="1" %)(% colspan="1" %)
448 (((
449 Labels
450 )))|(% colspan="1" %)(% colspan="1" %)
451 (((
cds 1.1 452
453 )))
454 |(% colspan="1" %)(% colspan="1" %)
455 (((
msp 18.1 456 Font Size
cds 1.1 457 )))|(% colspan="1" %)(% colspan="1" %)
458 (((
msp 18.1 459 de.cau.cs.kieler.fontSize
cds 1.1 460 )))|(% colspan="1" %)(% colspan="1" %)
461 (((
msp 18.1 462 Int
cds 1.1 463 )))|(% colspan="1" %)(% colspan="1" %)
464 (((
msp 18.1 465 Labels
cds 1.1 466 )))|(% colspan="1" %)(% colspan="1" %)
467 (((
468
469 )))
470 |(% colspan="1" %)(% colspan="1" %)
471 (((
msp 18.1 472 Hypernode
cds 1.1 473 )))|(% colspan="1" %)(% colspan="1" %)
474 (((
msp 18.1 475 de.cau.cs.kieler.hypernode
cds 1.1 476 )))|(% colspan="1" %)(% colspan="1" %)
477 (((
msp 18.1 478 Boolean
cds 1.1 479 )))|(% colspan="1" %)(% colspan="1" %)
480 (((
481 Nodes
482 )))|(% colspan="1" %)(% colspan="1" %)
483 (((
msp 18.1 484 false
cds 1.1 485 )))
486 |(% colspan="1" %)(% colspan="1" %)
487 (((
msp 19.1 488 Layout Ancestors
489 )))|(% colspan="1" %)(% colspan="1" %)
490 (((
491 de.cau.cs.kieler.layoutAncestors
492 )))|(% colspan="1" %)(% colspan="1" %)
493 (((
494 Boolean
495 )))|(% colspan="1" %)(% colspan="1" %)
496 (((
497 Parents
498 )))|(% colspan="1" %)(% colspan="1" %)
499 (((
500 false
501 )))
502 |(% colspan="1" %)(% colspan="1" %)
503 (((
504 Maximal Animation Time
505 )))|(% colspan="1" %)(% colspan="1" %)
506 (((
507 de.cau.cs.kieler.maxAnimTim
508 )))|(% colspan="1" %)(% colspan="1" %)
509 (((
510 Int
511 )))|(% colspan="1" %)(% colspan="1" %)
512 (((
513 Parents
514 )))|(% colspan="1" %)(% colspan="1" %)
515 (((
516 4000
517 )))
518 |(% colspan="1" %)(% colspan="1" %)
519 (((
520 Minimal Animation Time
521 )))|(% colspan="1" %)(% colspan="1" %)
522 (((
523 de.cau.cs.kieler.minAnimTim
524 )))|(% colspan="1" %)(% colspan="1" %)
525 (((
526 Int
527 )))|(% colspan="1" %)(% colspan="1" %)
528 (((
529 Parents
530 )))|(% colspan="1" %)(% colspan="1" %)
531 (((
532 400
533 )))
534 |(% colspan="1" %)(% colspan="1" %)
535 (((
msp 18.1 536 Minimal Height
cds 1.1 537 )))|(% colspan="1" %)(% colspan="1" %)
538 (((
msp 18.1 539 de.cau.cs.kieler.minHeight
cds 1.1 540 )))|(% colspan="1" %)(% colspan="1" %)
541 (((
msp 18.1 542 Float
cds 1.1 543 )))|(% colspan="1" %)(% colspan="1" %)
544 (((
545 Nodes
msp 18.1 546 Parents
cds 1.1 547 )))|(% colspan="1" %)(% colspan="1" %)
548 (((
msp 18.1 549 0.0
cds 1.1 550 )))
551 |(% colspan="1" %)(% colspan="1" %)
552 (((
msp 18.1 553 Minimal Width
cds 1.1 554 )))|(% colspan="1" %)(% colspan="1" %)
555 (((
msp 18.1 556 de.cau.cs.kieler.minWidth
cds 1.1 557 )))|(% colspan="1" %)(% colspan="1" %)
558 (((
559 Float
560 )))|(% colspan="1" %)(% colspan="1" %)
561 (((
msp 18.1 562 Nodes
cds 1.1 563 Parents
564 )))|(% colspan="1" %)(% colspan="1" %)
565 (((
msp 18.1 566 0.0
567 )))
568 |(% colspan="1" %)(% colspan="1" %)
569 (((
570 No Layout
571 )))|(% colspan="1" %)(% colspan="1" %)
572 (((
573 de.cau.cs.kieler.noLayout
574 )))|(% colspan="1" %)(% colspan="1" %)
575 (((
576 Boolean
577 )))|(% colspan="1" %)(% colspan="1" %)
578 (((
msp 17.1 579
msp 18.1 580 )))|(% colspan="1" %)(% colspan="1" %)
581 (((
582 false
cds 1.1 583 )))
msp 18.1 584 |(% colspan="1" %)(% colspan="1" %)
585 (((
msp 19.1 586 Port Index
587 )))|(% colspan="1" %)(% colspan="1" %)
588 (((
589 de.cau.cs.kieler.portIndex
590 )))|(% colspan="1" %)(% colspan="1" %)
591 (((
592 Int
593 )))|(% colspan="1" %)(% colspan="1" %)
594 (((
595 Ports
596 )))|(% colspan="1" %)(% colspan="1" %)
597 (((
598
599 )))
600 |(% colspan="1" %)(% colspan="1" %)
601 (((
msp 18.1 602 [[Port Offset>>doc:||anchor="portOffset"]]
603 )))|(% colspan="1" %)(% colspan="1" %)
604 (((
605 de.cau.cs.kieler.offset
606 )))|(% colspan="1" %)(% colspan="1" %)
607 (((
608 Float
609 )))|(% colspan="1" %)(% colspan="1" %)
610 (((
611 Ports
612 )))|(% colspan="1" %)(% colspan="1" %)
613 (((
614
615 )))
616 |(% colspan="1" %)(% colspan="1" %)
617 (((
618 Port Side
619 )))|(% colspan="1" %)(% colspan="1" %)
620 (((
621 de.cau.cs.kieler.portSide
622 )))|(% colspan="1" %)(% colspan="1" %)
623 (((
624 Enum
625 )))|(% colspan="1" %)(% colspan="1" %)
626 (((
627 Ports
628 )))|(% colspan="1" %)(% colspan="1" %)
629 (((
630
631 )))
msp 19.1 632 |(% colspan="1" %)(% colspan="1" %)
633 (((
634 Progress Bar
635 )))|(% colspan="1" %)(% colspan="1" %)
636 (((
637 de.cau.cs.kieler.progressBar
638 )))|(% colspan="1" %)(% colspan="1" %)
639 (((
640 Boolean
641 )))|(% colspan="1" %)(% colspan="1" %)
642 (((
643 Parents
644 )))|(% colspan="1" %)(% colspan="1" %)
645 (((
646 false
647 )))
648 |(% colspan="1" %)(% colspan="1" %)
649 (((
650 Scale Factor
651 )))|(% colspan="1" %)(% colspan="1" %)
652 (((
653 de.cau.cs.kieler.scaleFactor
654 )))|(% colspan="1" %)(% colspan="1" %)
655 (((
656 Float
657 )))|(% colspan="1" %)(% colspan="1" %)
658 (((
659 Nodes
660 )))|(% colspan="1" %)(% colspan="1" %)
661 (((
662 1.0
663 )))
664 |(% colspan="1" %)(% colspan="1" %)
665 (((
666 Zoom to Fit
667 )))|(% colspan="1" %)(% colspan="1" %)
668 (((
669 de.cau.cs.kieler.zoomToFit
670 )))|(% colspan="1" %)(% colspan="1" %)
671 (((
672 Boolean
673 )))|(% colspan="1" %)(% colspan="1" %)
674 (((
675 Parents
676 )))|(% colspan="1" %)(% colspan="1" %)
677 (((
678 false
679 )))
cds 1.1 680
msp 19.1 681 === Layout Output Properties ===
682
683 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
684
685 |=(((
686 Property
687 )))|=(((
688 ID
689 )))|=(((
690 Type
691 )))|=(((
692 Applies to
693 )))
694 |(((
695 [[Edge Routing>>doc:||anchor="edgeRouting"]]
696 )))|(((
697 de.cau.cs.kieler.edgeRouting
698 )))|(((
699 Enum
700 )))|(((
701 Edges
702 )))
703 |(((
704 Junction Points
705 )))|(((
706 de.cau.cs.kieler.junctionPoints
707 )))|(((
708 Object
709 )))|(((
710 Edges
711 )))
712
713
714
msp 18.1 715 = Detailed Documentation =
cds 1.1 716
msp 18.1 717 == The Most Important Options ==
718
msp 16.1 719 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.
cds 1.1 720
msp 18.1 721 === Layout Algorithm ===
msp 16.1 722
723 {{id name="layoutAlgorithm"/}}
724
725 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.
726
727 The following layout types are predefined:
728
729 * **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.
730 * **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.
731 * **Force** - Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces.
732 * **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.
733 * **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.
734
735 === Available Algorithms and Libraries ===
736
737 * **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.
738 * **Randomizer** - Distributes the nodes randomly; not very useful, but it can show how important a good layout is for understanding a graph.
739 * (((
740 **Box Layout** - Ignores edges, places all nodes in rows. Can be used to layout collections of unconnected boxes, such as Statechart regions.
741 )))
742 * **Fixed Layout** - Does not compute a new layout, but leaves all nodes and edges where they are. If the Position and Bend Points options are set for the elements of the graph, the pre-defined layout is applied.
743 * **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.
744 * **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.
745
msp 18.1 746 === Diagram Type ===
msp 16.1 747
748 {{id name="diagramType"/}}
749
750 Diagram types are used to classify graphical diagrams for setting default layout option values for a set of similar diagrams. The diagram type of an element is specified with the layout option {{code language="none"}}de.cau.cs.kieler.diagramType{{/code}}. Layout algorithms can declare which diagram types they support well, and give a priority value for each supported type. KIML decides at runtime which layout algorithm has the highest priority for a given diagram, so that the most suitable algorithm is always used. Usual values for such priorities are between 1 and 10, where the highest value should only be assigned if the algorithm is especially designed for diagrams of the respective type, or if it has proven to be very adequate for them. Lower values should be given if the algorithm is able to draw the diagrams correctly, but with lower quality of the resulting layout.
751
752 The following diagram types are predefined:
753
754 * **General** - This type is automatically assigned to all diagrams for which no specific type is declared. A layout algorithm that has the highest priority on the //General// diagram type is taken as the default algorithm when no further information on a diagram is available to KIML.
755 * **State Machine** - All kinds of state machines, automata, and activity diagrams. Examples: [[doc:SCCharts SyncCharts]], UML Activity diagrams.
756 * **Data Flow Diagram** - Actor-oriented diagrams, where connections are mostly done between //ports// of nodes. These diagrams can only be handled properly by very special layout algorithms, such as those developed in the [[KLay project>>doc:Layout Algorithms (KLay)]].
757 * **Class Diagram** - Class diagrams such as Ecore diagrams for the [[EMF>>url:http://www.eclipse.org/modeling/emf/||shape="rect"]] or UML Class diagrams.
758 * **Use Case Diagram** - Use case diagrams as defined by the UML.
759 * **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]].
760
761 == Other Options ==
762
763 * **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.
764 * **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.
765 * **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.
766 * **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.
767
cds 1.1 768 This section explains every layout option in more detail.
769
msp 18.1 770 === Edge Routing ===
cds 12.1 771
772 {{id name="edgeRouting"/}}
773
774 This option influences the way in which edges are routed between the nodes they connect. The following settings are available:
775
776 * POLYLINE
777 Edges consist of one or more segments defined by a list of bend points.
778 * ORTHOGONAL
779 Edges are routed orthogonally, meaning that each segment of an edge runs either horizontally or vertically, but never at an angle.
780 * SPLINE
781 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.
782 * UNDEFINED
783 No particular edge routing style is selected. The result produced by the layout algorithm may be undefined.
784
cds 14.1 785 (% style="color: rgb(153,51,0);" %)**TODO:** Add an image illustrating the different routing styles.
786
msp 18.1 787 === Port Offset ===
cds 1.1 788
cds 9.1 789 {{id name="portOffset"/}}
cds 5.1 790
cds 1.1 791 The port offset is used to specify how much space a layout algorithm should leave between a port and the border of its node. This is usually zero, but doesn't have to be. If the offset is not defined for a given port, a layout algorithm can try to infer the offset from the port's coordinates and its node's size in the input graph. This of course requires both properties to be set to sensible values.
cds 3.1 792
793 Set this property if one of the following cases applies:
794
795 * The port constraints on a node are set to FREE, FIXED_SIDES or FIXED_ORDER.
796 * The port constraints on a node are set to FIXED_RATIO or FIXED_POS, and the size of the node is not fixed. (Note that this is especially true for ports of compound nodes.)