Show last authors
1 {{warning}}
2 This is preliminary and incomplete documentation. You've been warned.
3 {{/warning}}
4
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, it may change the option's default value. Algorithms may also provide more specialized documentation for a given layout option.
6
7 **Contents**
8
9
10
11 {{toc/}}
12
13 = Overview =
14
15 Beside a human-readable name, layout options are defined by the following properties:
16
17 * An ID to identify them.
18 * A type. One of Boolean, String, Int, Float, Enum, EnumSet (a {{code language="none"}}Set{{/code}} over a given enumeration), or Object. The types Enum and EnumSet have to be further defined by an enumeration class. The Object type can be constricted to a certain class.
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, and Labels.
20 * An optional default value. If an option is not set on an object and if the option does not have a default value, {{code language="none"}}null{{/code}} is returned when it is accessed.
21
22 KIML defines the following set of layout options:
23
24 |=(((
25 Option
26 )))|=(((
27 ID
28 )))|=(((
29 Type
30 )))|=(((
31 Applies to
32 )))|=(((
33 Default
34 )))
35 |(((
36 Alignment
37 )))|(((
38 de.cau.cs.kieler.alignment
39 )))|(((
40 Enum
41 )))|(((
42 Nodes
43 )))|(((
44 AUTOMATIC
45 )))
46 |(((
47 Aspect Ratio
48 )))|(((
49 de.cau.cs.kieler.aspectRatio
50 )))|(((
51 Float
52 )))|(((
53 Parents
54 )))|(((
55 0.0
56 )))
57 |(((
58 Bend Points
59 )))|(((
60 de.cau.cs.kieler.bendPoints
61 )))|(((
62 Object
63 )))|(((
64 Edges
65 )))|(((
66
67 )))
68 |(((
69 Border Spacing
70 )))|(((
71 de.cau.cs.kieler.borderSpacing
72 )))|(((
73 Float
74 )))|(((
75 Parents
76 )))|(((
77 -1.0
78 )))
79 |(% colspan="1" %)(% colspan="1" %)
80 (((
81 Comment Box
82 )))|(% colspan="1" %)(% colspan="1" %)
83 (((
84 de.cau.cs.kieler.commentBox
85 )))|(% colspan="1" %)(% colspan="1" %)
86 (((
87 Boolean
88 )))|(% colspan="1" %)(% colspan="1" %)
89 (((
90 Nodes
91 )))|(% colspan="1" %)(% colspan="1" %)
92 (((
93 false
94 )))
95 |(((
96 Debug Mode
97 )))|(((
98 de.cau.cs.kieler.debugMode
99 )))|(((
100 Boolean
101 )))|(((
102 Parents
103 )))|(((
104 false
105 )))
106 |(% colspan="1" %)(% colspan="1" %)
107 (((
108 Diagram Type
109 )))|(% colspan="1" %)(% colspan="1" %)
110 (((
111 de.cau.cs.kieler.diagramType
112 )))|(% colspan="1" %)(% colspan="1" %)
113 (((
114 String
115 )))|(% colspan="1" %)(% colspan="1" %)
116 (((
117
118 )))|(% colspan="1" %)(% colspan="1" %)
119 (((
120
121 )))
122 |(((
123 Direction
124 )))|(((
125 de.cau.cs.kieler.direction
126 )))|(((
127 Enum
128 )))|(((
129 Parents
130 )))|(((
131 UNDEFINED
132 )))
133 |(% colspan="1" %)(% colspan="1" %)
134 (((
135 Edge Label Placement
136 )))|(% colspan="1" %)(% colspan="1" %)
137 (((
138 de.cau.cs.kieler.edgeLabelPlacement
139 )))|(% colspan="1" %)(% colspan="1" %)
140 (((
141 Enum
142 )))|(% colspan="1" %)(% colspan="1" %)
143 (((
144 Labels
145 )))|(% colspan="1" %)(% colspan="1" %)
146 (((
147 UNDEFINED
148 )))
149 |(((
150 [[Edge Routing>>doc:||anchor="edgeRouting"]]
151 )))|(((
152 de.cau.cs.kieler.edgeRouting
153 )))|(((
154 Enum
155 )))|(((
156 Parents
157 )))|(((
158 UNDEFINED
159 )))
160 |(% colspan="1" %)(% colspan="1" %)
161 (((
162 Edge Type
163 )))|(% colspan="1" %)(% colspan="1" %)
164 (((
165 de.cau.cs.kieler.edgeType
166 )))|(% colspan="1" %)(% colspan="1" %)
167 (((
168 Enum
169 )))|(% colspan="1" %)(% colspan="1" %)
170 (((
171 Edges
172 )))|(% colspan="1" %)(% colspan="1" %)
173 (((
174 NONE
175 )))
176 |(((
177 Expand Nodes
178 )))|(((
179 de.cau.cs.kieler.expandNodes
180 )))|(((
181 Boolean
182 )))|(((
183 Parents
184 )))|(((
185 false
186 )))
187 |(% colspan="1" %)(% colspan="1" %)
188 (((
189 Font Name
190 )))|(% colspan="1" %)(% colspan="1" %)
191 (((
192 de.cau.cs.kieler.fontName
193 )))|(% colspan="1" %)(% colspan="1" %)
194 (((
195 String
196 )))|(% colspan="1" %)(% colspan="1" %)
197 (((
198 Labels
199 )))|(% colspan="1" %)(% colspan="1" %)
200 (((
201
202 )))
203 |(% colspan="1" %)(% colspan="1" %)
204 (((
205 Font Size
206 )))|(% colspan="1" %)(% colspan="1" %)
207 (((
208 de.cau.cs.kieler.fontSize
209 )))|(% colspan="1" %)(% colspan="1" %)
210 (((
211 Int
212 )))|(% colspan="1" %)(% colspan="1" %)
213 (((
214 Labels
215 )))|(% colspan="1" %)(% colspan="1" %)
216 (((
217
218 )))
219 |(% colspan="1" %)(% colspan="1" %)
220 (((
221 Hypernode
222 )))|(% colspan="1" %)(% colspan="1" %)
223 (((
224 de.cau.cs.kieler.hypernode
225 )))|(% colspan="1" %)(% colspan="1" %)
226 (((
227 Boolean
228 )))|(% colspan="1" %)(% colspan="1" %)
229 (((
230 Nodes
231 )))|(% colspan="1" %)(% colspan="1" %)
232 (((
233 false
234 )))
235 |(((
236 Interactive
237 )))|(((
238 de.cau.cs.kieler.interactive
239 )))|(((
240 Boolean
241 )))|(((
242 Parents
243 )))|(((
244 false
245 )))
246 |(((
247 Label Spacing
248 )))|(((
249 de.cau.cs.kieler.labelSpacing
250 )))|(((
251 Float
252 )))|(((
253 Edges
254 Nodes
255 )))|(((
256 -1.0
257 )))
258 |(((
259 Layout Hierarchy
260 )))|(((
261 de.cau.cs.kieler.layoutHierarchy
262 )))|(((
263 Boolean
264 )))|(((
265 Parents
266 )))|(((
267 false
268 )))
269 |(((
270 Layout Algorithm
271 )))|(((
272 de.cau.cs.kieler.algorithm
273 )))|(((
274 String
275 )))|(((
276 Parents
277 )))|(((
278
279 )))
280 |(% colspan="1" %)(% colspan="1" %)
281 (((
282 Minimal Height
283 )))|(% colspan="1" %)(% colspan="1" %)
284 (((
285 de.cau.cs.kieler.minHeight
286 )))|(% colspan="1" %)(% colspan="1" %)
287 (((
288 Float
289 )))|(% colspan="1" %)(% colspan="1" %)
290 (((
291 Nodes
292 Parents
293 )))|(% colspan="1" %)(% colspan="1" %)
294 (((
295 0.0
296 )))
297 |(% colspan="1" %)(% colspan="1" %)
298 (((
299 Minimal Width
300 )))|(% colspan="1" %)(% colspan="1" %)
301 (((
302 de.cau.cs.kieler.minWidth
303 )))|(% colspan="1" %)(% colspan="1" %)
304 (((
305 Float
306 )))|(% colspan="1" %)(% colspan="1" %)
307 (((
308 Nodes
309 Parents
310 )))|(% colspan="1" %)(% colspan="1" %)
311 (((
312 0.0
313 )))
314 |(% colspan="1" %)(% colspan="1" %)
315 (((
316 No Layout
317 )))|(% colspan="1" %)(% colspan="1" %)
318 (((
319 de.cau.cs.kieler.noLayout
320 )))|(% colspan="1" %)(% colspan="1" %)
321 (((
322 Boolean
323 )))|(% colspan="1" %)(% colspan="1" %)
324 (((
325
326 )))|(% colspan="1" %)(% colspan="1" %)
327 (((
328 false
329 )))
330 |(% colspan="1" %)(% colspan="1" %)
331 (((
332 Node Label Placement
333 )))|(% colspan="1" %)(% colspan="1" %)
334 (((
335 de.cau.cs.kieler.nodeLabelPlacement
336 )))|(% colspan="1" %)(% colspan="1" %)
337 (((
338 EnumSet
339 )))|(% colspan="1" %)(% colspan="1" %)
340 (((
341 Nodes
342 )))|(% colspan="1" %)(% colspan="1" %)
343 (((
344
345 )))
346 |(((
347 Port Constraints
348 )))|(((
349 de.cau.cs.kieler.portConstraints
350 )))|(((
351 Enum
352 )))|(((
353 Nodes
354 )))|(((
355 UNDEFINED
356 )))
357 |(% colspan="1" %)(% colspan="1" %)
358 (((
359 Port Label Placement
360 )))|(% colspan="1" %)(% colspan="1" %)
361 (((
362 de.cau.cs.kieler.portLabelPlacement
363 )))|(% colspan="1" %)(% colspan="1" %)
364 (((
365 Enum
366 )))|(% colspan="1" %)(% colspan="1" %)
367 (((
368 Nodes
369 )))|(% colspan="1" %)(% colspan="1" %)
370 (((
371 OUTSIDE
372 )))
373 |(% colspan="1" %)(% colspan="1" %)
374 (((
375 [[Port Offset>>doc:||anchor="portOffset"]]
376 )))|(% colspan="1" %)(% colspan="1" %)
377 (((
378 de.cau.cs.kieler.offset
379 )))|(% colspan="1" %)(% colspan="1" %)
380 (((
381 Float
382 )))|(% colspan="1" %)(% colspan="1" %)
383 (((
384 Ports
385 )))|(% colspan="1" %)(% colspan="1" %)
386 (((
387
388 )))
389 |(% colspan="1" %)(% colspan="1" %)
390 (((
391 Port Side
392 )))|(% colspan="1" %)(% colspan="1" %)
393 (((
394 de.cau.cs.kieler.portSide
395 )))|(% colspan="1" %)(% colspan="1" %)
396 (((
397 Enum
398 )))|(% colspan="1" %)(% colspan="1" %)
399 (((
400 Ports
401 )))|(% colspan="1" %)(% colspan="1" %)
402 (((
403 UNDEFINED
404 )))
405 |(((
406 Position
407 )))|(((
408 de.cau.cs.kieler.position
409 )))|(((
410 Object
411 )))|(((
412 Labels
413 Nodes
414 Ports
415 )))|(((
416
417 )))
418 |(((
419 Priority
420 )))|(((
421 de.cau.cs.kieler.priority
422 )))|(((
423 Int
424 )))|(((
425 Edges
426 Nodes
427 )))|(((
428
429 )))
430 |(% colspan="1" %)(% colspan="1" %)
431 (((
432 Randomization Seed
433 )))|(% colspan="1" %)(% colspan="1" %)
434 (((
435 de.cau.cs.kieler.randomSeed
436 )))|(% colspan="1" %)(% colspan="1" %)
437 (((
438 Int
439 )))|(% colspan="1" %)(% colspan="1" %)
440 (((
441 Parents
442 )))|(% colspan="1" %)(% colspan="1" %)
443 (((
444
445 )))
446 |(% colspan="1" %)(% colspan="1" %)
447 (((
448 Separate Connected Components
449 )))|(% colspan="1" %)(% colspan="1" %)
450 (((
451 de.cau.cs.kieler.separateConnComp
452 )))|(% colspan="1" %)(% colspan="1" %)
453 (((
454 Boolean
455 )))|(% colspan="1" %)(% colspan="1" %)
456 (((
457 Parents
458 )))|(% colspan="1" %)(% colspan="1" %)
459 (((
460
461 )))
462 |(% colspan="1" %)(% colspan="1" %)
463 (((
464 Size Constraint
465 )))|(% colspan="1" %)(% colspan="1" %)
466 (((
467 de.cau.cs.kieler.sizeConstraint
468 )))|(% colspan="1" %)(% colspan="1" %)
469 (((
470 EnumSet
471 )))|(% colspan="1" %)(% colspan="1" %)
472 (((
473 Nodes
474 )))|(% colspan="1" %)(% colspan="1" %)
475 (((
476
477 )))
478 |(% colspan="1" %)(% colspan="1" %)
479 (((
480 Size Options
481 )))|(% colspan="1" %)(% colspan="1" %)
482 (((
483 de.cau.cs.kieler.sizeOptions
484 )))|(% colspan="1" %)(% colspan="1" %)
485 (((
486 EnumSet
487 )))|(% colspan="1" %)(% colspan="1" %)
488 (((
489 Nodes
490 )))|(% colspan="1" %)(% colspan="1" %)
491 (((
492 DEFAULT_MINIMUM_SIZE
493 )))
494 |(% colspan="1" %)(% colspan="1" %)
495 (((
496 Spacing
497 )))|(% colspan="1" %)(% colspan="1" %)
498 (((
499 de.cau.cs.kieler.spacing
500 )))|(% colspan="1" %)(% colspan="1" %)
501 (((
502 Float
503 )))|(% colspan="1" %)(% colspan="1" %)
504 (((
505 Parents
506 )))|(% colspan="1" %)(% colspan="1" %)
507 (((
508 -1.0
509 )))
510
511 = The Most Important Options =
512
513 **TODO:** Write a bit of documentation about the most important layout options and how to use them, possibly with a simple example or something.
514
515 = Detailed Documentation =
516
517 This section explains every layout option in more detail.
518
519 == Edge Routing ==
520
521
522
523 {{id name="edgeRouting"/}}
524
525 This option influences the way in which edges are routed between the nodes they connect. The following settings are available:
526
527 * POLYLINE
528 Edges consist of one or more segments defined by a list of bend points.
529 * ORTHOGONAL
530 Edges are routed orthogonally, meaning that each segment of an edge runs either horizontally or vertically, but never at an angle.
531 * SPLINE
532 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.
533 * UNDEFINED
534 No particular edge routing style is selected. The result produced by the layout algorithm may be undefined.
535
536 (% style="color: rgb(153,51,0);" %)**TODO:** Add an image illustrating the different routing styles.
537
538 == Port Offset ==
539
540
541
542 {{id name="portOffset"/}}
543
544 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.
545
546 Set this property if one of the following cases applies:
547
548 * The port constraints on a node are set to FREE, FIXED_SIDES or FIXED_ORDER.
549 * 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.)