In level layout mode with flow direction to
the top or bottom, the nodes are organized in horizontal levels
such that the nodes of the same level are placed approximately at
the same y-coordinate. The nodes can be justified, depending on
whether the top border, the bottom border, or the center of all
nodes of the same level must have the same y-coordinate.
In flow direction to the left or right, the
nodes are organized in vertical levels approximately at the same
x-coordinate. The nodes of the same level can be justified at the
left border, at the right border, or at the center.
To distinguish the level alignment independently from the flow
direction, the directions north and south are used (see Using compass directions for positional
layout parameters (TL)). The north border of a node is the border
that is closer to the level where its parent is placed, and the
south border of a node is the border that is closer to the level
where its child nodes are placed. If the flow direction is to the
bottom, the level alignment north means that the nodes are
justified at the top border, and south means that the nodes are
justified at the bottom border. If the flow direction is to the
top, north and south are inverted: north means the bottom border
and south means the top border. If the flow direction is to the
right, then north means the left border and south means the right
border.
![Picture
of tree layouts illustrating the level alignment parameter](../../../GraphLayout/_media/Fig4-44online47_default.gif)
Level alignment
To specify the level alignment:
In CSS
Add to the
GraphLayout
section:
levelAlignment: "NORTH";
In Java
In Java™ , use the method:
void setLevelAlignment(int alignment);
The valid values for
alignment
are:
IlvTreeLayout.CENTER
(the default)IlvTreeLayout.NORTH
IlvTreeLayout.SOUTH
In CSS, you omit the prefix
IlvTreeLayout
when specifying the value of the level alignment.