This is preliminary and incomplete documentation. You've been warned. |
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.
Contents
Beside a user-friendly name, layout options are defined by the following properties:
et
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.Layout options can be assigned to two main categories: user options and programmatic options.
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.
Option | ID | Type | Applies to | Default |
---|---|---|---|---|
Alignment | de.cau.cs.kieler.alignment | Enum | Nodes | AUTOMATIC |
Aspect Ratio | de.cau.cs.kieler.aspectRatio | Float | Parents | 0.0 |
Bend Points | de.cau.cs.kieler.bendPoints | Object | Edges | |
Border Spacing | de.cau.cs.kieler.borderSpacing | Float | Parents | |
Debug Mode | de.cau.cs.kieler.debugMode | Boolean | Parents | false |
Direction | de.cau.cs.kieler.direction | Enum | Parents | |
Edge Routing | de.cau.cs.kieler.edgeRouting | Enum | Parents | |
Expand Nodes | de.cau.cs.kieler.expandNodes | Boolean | Parents | false |
Interactive | de.cau.cs.kieler.interactive | Boolean | Parents | false |
Label Spacing | de.cau.cs.kieler.labelSpacing | Float | Edges Nodes | |
Layout Hierarchy | de.cau.cs.kieler.layoutHierarchy | Boolean | Parents | false |
Layout Algorithm | de.cau.cs.kieler.algorithm | String | Parents | |
Node Label Placement | de.cau.cs.kieler.nodeLabelPlacement | EnumSet | Nodes | |
Port Constraints | de.cau.cs.kieler.portConstraints | Enum | Nodes | |
Port Label Placement | de.cau.cs.kieler.portLabelPlacement | Enum | Nodes | OUTSIDE |
Port Spacing | de.cau.cs.kieler.portSpacing | Float | Nodes | |
Position | de.cau.cs.kieler.position | Object | Labels | |
Priority | de.cau.cs.kieler.priority | Int | Edges Nodes | |
Randomization Seed | de.cau.cs.kieler.randomSeed | Int | Parents | |
Separate Connected Components | de.cau.cs.kieler.separateConnComp | Boolean | Parents | |
Size Constraint | de.cau.cs.kieler.sizeConstraint | EnumSet | Nodes | |
Size Options | de.cau.cs.kieler.sizeOptions | EnumSet | Nodes | DEFAULT_MINIMUM_SIZE |
Spacing | de.cau.cs.kieler.spacing | Float | Parents |
Programmatic options are such that are meant to be configured exclusively through the KIML API. They should not be visible in the user interface.
Option | ID | Type | Applies to | Default |
---|---|---|---|---|
Animate | de.cau.cs.kieler.animate | Boolean | Parents | true |
Animation Time Factor | de.cau.cs.kieler.animTimeFactor | Int | Parents | 100 |
Comment Box | de.cau.cs.kieler.commentBox | Boolean | Nodes | false |
Diagram Type | de.cau.cs.kieler.diagramType | String | Parents | |
Edge Label Placement | de.cau.cs.kieler.edgeLabelPlacement | Enum | Labels | |
Edge Type | de.cau.cs.kieler.edgeType | Enum | Edges | NONE |
Font Name | de.cau.cs.kieler.fontName | String | Labels | |
Font Size | de.cau.cs.kieler.fontSize | Int | Labels | |
Hypernode | de.cau.cs.kieler.hypernode | Boolean | Nodes | false |
Layout Ancestors | de.cau.cs.kieler.layoutAncestors | Boolean | Parents | false |
Maximal Animation Time | de.cau.cs.kieler.maxAnimTim | Int | Parents | 4000 |
Minimal Animation Time | de.cau.cs.kieler.minAnimTim | Int | Parents | 400 |
Minimal Height | de.cau.cs.kieler.minHeight | Float | Nodes | 0.0 |
Minimal Width | de.cau.cs.kieler.minWidth | Float | Nodes | 0.0 |
No Layout | de.cau.cs.kieler.noLayout | Boolean | false | |
Port Index | de.cau.cs.kieler.portIndex | Int | Ports | |
Port Offset | de.cau.cs.kieler.offset | Float | Ports | |
Port Side | de.cau.cs.kieler.portSide | Enum | Ports | |
Progress Bar | de.cau.cs.kieler.progressBar | Boolean | Parents | false |
Scale Factor | de.cau.cs.kieler.scaleFactor | Float | Nodes | 1.0 |
Zoom to Fit | de.cau.cs.kieler.zoomToFit | Boolean | Parents | false |
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
Property | ID | Type | Applies to |
---|---|---|---|
Edge Routing | de.cau.cs.kieler.edgeRouting | Enum | Edges |
Junction Points | de.cau.cs.kieler.junctionPoints | Object | Edges |
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.
The option with identifier de.cau.cs.kieler.algorithm
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.
The following layout types are predefined:
Box Layout - Ignores edges, places all nodes in rows. Can be used to layout collections of unconnected boxes, such as Statechart regions.
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 de.cau.cs.kieler.diagramType
. 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.
The following diagram types are predefined:
de.cau.cs.kieler.layoutHierarchy
) - 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. de.cau.cs.kieler.hypernode
) - 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. Example: relation vertices in Ptolemy models.de.cau.cs.kieler.commentBox
) - 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.de.cau.cs.kieler.noLayout
) - 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.This section explains every layout option in more detail.
This option influences the way in which edges are routed between the nodes they connect. The following settings are available:
TODO: Add an image illustrating the different routing styles.
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.
Set this property if one of the following cases applies: