Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

OptionIDTypeApplies toDefault
Alignmentde.cau.cs.kieler.alignmentEnumNodesAUTOMATIC
Aspect Ratiode.cau.cs.kieler.aspectRatioFloatParents0.0
Bend Pointsde.cau.cs.kieler.bendPointsObjectEdges 
Border Spacingde.cau.cs.kieler.borderSpacingFloatParents-1.0
Comment Boxde.cau.cs.kieler.commentBoxBooleanNodesfalse
Debug Modede.cau.cs.kieler.debugModeBooleanParentsfalse
Diagram Typede.cau.cs.kieler.diagramTypeString  
Directionde.cau.cs.kieler.directionEnumParentsUNDEFINED
Edge Label Placementde.cau.cs.kieler.edgeLabelPlacementEnumLabelsUNDEFINED
Edge Routingde.cau.cs.kieler.edgeRoutingEnumParentsUNDEFINED
Edge Typede.cau.cs.kieler.edgeTypeEnumEdgesNONE
Expand Nodesde.cau.cs.kieler.expandNodesBooleanParentsfalse
Font Namede.cau.cs.kieler.fontNameStringLabels 
Font Sizede.cau.cs.kieler.fontSizeIntLabels 
Hypernodede.cau.cs.kieler.hypernodeBooleanNodesfalse
Interactivede.cau.cs.kieler.interactiveBooleanParentsfalse
Label Spacingde.cau.cs.kieler.labelSpacingFloatEdges
Nodes
-1.0
Layout Hierarchyde.cau.cs.kieler.layoutHierarchyBooleanParentsfalse
Layout Algorithmde.cau.cs.kieler.algorithmStringParents 
Minimal Heightde.cau.cs.kieler.minHeightFloat

Nodes
Parents

0.0
Minimal Widthde.cau.cs.kieler.minWidthFloat

Nodes
Parents

0.0
No Layoutde.cau.cs.kieler.noLayoutBoolean false
Node Label Placementde.cau.cs.kieler.nodeLabelPlacementEnumSetNodes 
Port Constraintsde.cau.cs.kieler.portConstraintsEnumNodesUNDEFINED
Port Label Placementde.cau.cs.kieler.portLabelPlacementEnumNodesOUTSIDE
Port Offsetde.cau.cs.kieler.offsetFloatPorts 
Port Sidede.cau.cs.kieler.portSideEnumPortsUNDEFINED
Positionde.cau.cs.kieler.positionObject

Labels
Nodes
Ports

 
Priorityde.cau.cs.kieler.priorityIntEdges
Nodes
 
Randomization Seedde.cau.cs.kieler.randomSeedIntParents 
Separate Connected Componentsde.cau.cs.kieler.separateConnCompBooleanParents 
Size Constraintde.cau.cs.kieler.sizeConstraintEnumSetNodes 
Size Optionsde.cau.cs.kieler.sizeOptionsEnumSetNodesDEFAULT_MINIMUM_SIZE
Spacingde.cau.cs.kieler.spacingFloatParents-1.0

The Most Important Options

TODO: Write a bit of documentation about the most important layout options and how to use them, possibly with a simple example or somethingWhile 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.

Layout Algorithm

Anchor
layoutAlgorithm
layoutAlgorithm

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:

  • 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.
  • 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.
  • Force - Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces.
  • 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.
  • 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.

Available Algorithms and Libraries

  • The KLay Project - Java implementations of standard layout approaches, augmented with special processing of graph features such as ports and edge labels.
  • Randomizer - Distributes the nodes randomly; not very useful, but it can show how important a good layout is for understanding a graph.
  • Box Layout - Ignores edges, places all nodes in rows. Can be used to layout collections of unconnected boxes, such as Statechart regions.

  • 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.
  • OGDF (www.ogdf.net) - 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.
  • Graphviz (www.graphviz.org) - 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.

Diagram Type

Anchor
diagramType
diagramType

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:

  • 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.
  • State Machine - All kinds of state machines, automata, and activity diagrams. Examples: SCCharts / SyncCharts, UML Activity diagrams.
  • 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.
  • Class Diagram - Class diagrams such as Ecore diagrams for the EMF or UML Class diagrams.
  • Use Case Diagram - Use case diagrams as defined by the UML.
  • Unconnected Boxes - Sets of nodes that have no connections and are treated as resizable boxes. This is related to mathematical packing problems. Example: Regions in SCCharts / SyncCharts.

Other Options

  • Layout Hierarchy (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. 
  • Hypernode (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.
  • Comment Box (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.
  • No Layout (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.

Detailed Documentation

This section explains every layout option in more detail.

...