Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

This is preliminary 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. Algorithms may provide more specialized documentation for a given layout option.

Contents

Overview

Beside a human-readable name, layout options are defined by the following properties:

  • An ID to identify them.
  • A type. One of Boolean, String, Int, Float, Enum, EnumSet (a Set 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.
  • 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.
  • An optional default value. If an option is not set on an object and if the option does not have a default value, null is returned when it is accessed.

KIML defines the following set of layout options:

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

Detailed Documentation

This section explains every layout option in more detail.

Port Offset

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:

  • The port constraints on a node are set to FREE, FIXED_SIDES or FIXED_ORDER.
  • 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.)
  • No labels