Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

When talking about label placement and node sizing, it helps to know what the two actually are. Let's start with node sizing:

Panel
borderStylesolid
titleNode SizingborderStylesolid

Node sizing is the act of determining the size of a node. In KIML, a layout algorithm can be granted different kinds of freedom in calculating the size of a node. The different kinds are expressed through a subset of the following options, as defined (and documented) in the SizeConstraint enumeration:

  • PORTS
  • PORT_LABELS
  • NODE_LABELS
  • MINIMUM_SIZE

On the one extreme, the subset can be empty, thereby fixing the node size. On the other extreme, the set can contain all options, thereby giving the layout algorithm the maximum amount of flexibility.

The way the node size is determined can also be influenced by specifying a subset of the following options, as defined (and documented) in the SizeOptions enumeration:

  • DEFAULT_MINIMUM_SIZE
  • MINIMUM_SIZE_ACCOUNTS_FOR_INSETS
  • COMPUTE_INSETS

Label placement can be divided into port label placement and node label placement:

Panel
borderStylesolid
titlePort PlacementborderStylesolid

Port placement is the act of determining the position of ports. This includes determining the side of their node where the port gets attached, determining an order between ports on the same side, and determining the final position of each port. There are different levels of constraints on placing ports, as defined (and documents) in the PortConstraints enumeration:

  • FREE
  • FIXED_SIDE
  • FIXED_ORDER
  • FIXED_RATIO
  • FIXED_POS

Port placement can take place after crossing minimization, since the order of ports must be known and port placements needs to be fixed before node placement.

Panel
borderStylesolid
titleLabel PlacementborderStylesolid

Label placement is the act of determining the position of labels, with the aim of keeping readability high. The two most critical objectives in label placement are the following:

  1. Avoiding overlaps between labels and other graphical objects, including other labels.
  2. Making sure that each label is closer to its associated graphical feature than to other, unrelated graphical features.

KLay Layered distinguishes three kinds of labels:

  1. Node labels
  2. Port labels
  3. Edge labels
    1. Tail labels
    2. Mid labels
    3. Head labels

Node labels and port labels can be placed inside or outside of their particular node.

...