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 
Debug Modede.cau.cs.kieler.debugModeBooleanParentsfalse
Directionde.cau.cs.kieler.directionEnumParents 
Edge Routingde.cau.cs.kieler.edgeRoutingEnumParents 
Expand Nodesde.cau.cs.kieler.expandNodesBooleanParentsfalse
Interactivede.cau.cs.kieler.interactiveBooleanParentsfalse
Label Spacingde.cau.cs.kieler.labelSpacingFloatEdges
Nodes
 
Layout Hierarchyde.cau.cs.kieler.layoutHierarchyBooleanParentsfalse
Layout Algorithmde.cau.cs.kieler.algorithmStringParents 
Node Label Placementde.cau.cs.kieler.nodeLabelPlacementEnumSetNodes 
Port Constraintsde.cau.cs.kieler.portConstraintsEnumNodes 
Port Label Placementde.cau.cs.kieler.portLabelPlacementEnumNodesOUTSIDE
Port Spacingde.cau.cs.kieler.portSpacingFloatNodes 
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 

...

OptionIDTypeApplies toDefault

Animate

de.cau.cs.kieler.animate

BooleanParentstrue

Animation Time Factor

de.cau.cs.kieler.animTimeFactor

IntParents100

Comment Box

de.cau.cs.kieler.commentBox

BooleanNodesfalse
Diagram Typede.cau.cs.kieler.diagramTypeStringParents 
Edge Label Placementde.cau.cs.kieler.edgeLabelPlacementEnumLabels 
Edge Typede.cau.cs.kieler.edgeTypeEnumEdgesNONE
Font Namede.cau.cs.kieler.fontNameStringLabels 
Font Sizede.cau.cs.kieler.fontSizeIntLabels 
Hypernodede.cau.cs.kieler.hypernodeBooleanNodesfalse

Layout Ancestors

de.cau.cs.kieler.layoutAncestors

BooleanParentsfalse

Maximal Animation Time

de.cau.cs.kieler.maxAnimTim

IntParents4000

Minimal Animation Time

de.cau.cs.kieler.minAnimTim

IntParents400
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

Port Index

de.cau.cs.kieler.portIndex

IntPorts 
Port Offsetde.cau.cs.kieler.offsetFloatPorts 
Port Sidede.cau.cs.kieler.portSideEnumPorts 

Progress Bar

de.cau.cs.kieler.progressBar

BooleanParentsfalse
Scale Factor

de.cau.cs.kieler.scaleFactor

FloatNodes1.0

Zoom to Fit

de.cau.cs.kieler.zoomToFit

BooleanParentsfalse

...

PropertyIDTypeApplies to
Edge Routingde.cau.cs.kieler.edgeRoutingEnumEdges
Junction Points

de.cau.cs.kieler.junctionPoints

ObjectEdges

 

Detailed Documentation

This section explains every layout option in more detail.

The Most Important Options

...

The option with identifier de.cau.cs.kieler.algorithm 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 option is active.

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.

Available Algorithms and Libraries

  • The KLay Project - Java implementations of standard layout approaches, augmented with special processing of graph features such as ports and 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.

Predefined Layout Types

  • 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.

...

  • 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.

Edge Routing
Anchor
edgeRouting
edgeRouting

This option influences the way in which edges are routed between the nodes they connect.

...

Other Options

...

The following settings are available:

  • POLYLINE
    Edges consist of one or more segments defined by a list of bend points.
  • ORTHOGONAL
    Edges are routed orthogonally, meaning that each segment of an edge runs either horizontally or vertically.
  • SPLINES
    Edges are routed as splines (smooth curves).
  • UNDEFINED
    No particular edge routing style is selected. Usually this value points to the default setting of the selected layout algorithm.

Image Added

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:

  1. Start at the source point of the edge.
  2. As long as there are at least three bend points left:
    1. Draw a cubic spline segment to the third bend point with the other two bend points as control points.
    2. Use the third bend point as start point for the next segment.
    3. Consume the three bend points and proceed to the next segment.
  3. Check the number of remaining bend points:
    1. Two bend points – draw a cubic spline segment to the target point of the edge.
    2. One bend point – draw a quadratic spline segment to the target point of the edge.
    3. No bend point – draw a straight line to the target point of the edge.

Other Options

Comment Box
Anchor
commentBox
commentBox

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.

Image Added

Hypernode
Anchor
hypernode
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.

...

Layout Hierarchy
Anchor
layoutHierarchy
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.

No Layout
Anchor
noLayout
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:

  • POLYLINE
    Edges consist of one or more segments defined by a list of bend points.
  • ORTHOGONAL
    Edges are routed orthogonally, meaning that each segment of an edge runs either horizontally or vertically, but never at an angle.
  • SPLINE
    Edges are routed as splines (smooth curves). TODO: Add more documentation on how the returned bend points are to be interpreted.
  • UNDEFINED
    No particular edge routing style is selected. The result produced by the layout algorithm may be undefined.

TODO: Add an image illustrating the different routing styles.

Port Offset
Anchor
portOffset
portOffset

...