Page History
...
When talking about label placement and node sizing, it helps to know what the two actually are. Let's start with node sizing:
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
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
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
|
Label placement can be divided into port label placement and node label placement:
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
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
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 | |||||
---|---|---|---|---|---|
| |||||
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:
KLay Layered distinguishes three kinds of labels:
Node labels and port labels can be placed inside or outside of their particular node. |
...
Option | Target | Description |
---|---|---|
LayoutOptions.NODE_LABEL_PLACEMENT | Node | Determines where node labels are placed. A valid set of values contains exactly one constant from each of the following sets of constants:
|
LayoutOptions.PORT_LABEL_PLACEMENT | Node | Determines where port labels are placed: inside or outside their node. |
LayoutOptions.LABEL_SPACING | Graph | Determines the amount of space left between labels and the objects they label. |
LayoutOptions.SIZE_CONSTRAINT | Node | The amount of freedom in determining the size of a node. |
LayoutOptions.SIZE_OPTIONS | Node | Options for node size calculation. |
LayoutOptions.MIN_WIDTH | Node | The minimal width of a node. If set, overrides the default minimal width. |
LayoutOptions.MIN_HEIGHT | Node | The minimal height of a node. If set, overrides the default minimal height. |
LayoutOptions.PORT_CONSTRAINTS | Node | Freedom in placing ports. |
Properties.PORT_SPACING | Node | How much space should be left between ports. |