documentationfor yFiles for HTML 2.6

PartitionGrid

This class represents a partition grid that partitions the drawing area into rectangular partition cells.

Inheritance Hierarchy
PartitionGrid

Remarks

Such a structure allows, for example, to model vertical/horizontal swimlanes which are often used in flow diagrams to separate logical units.

The grid consists of rows and columns that are created using the corresponding constructors of this class or methods addRow and addColumn. The PartitionGrid object has to be registered with the graph using the IDataProvider key PARTITION_GRID_DP_KEY.

Each node can be assigned to a PartitionCellId which represents a set of partition cells. The mapping has to be registered with the graph using IDataProvider key PARTITION_CELL_ID_DP_KEY. Simple partition cell identifiers which represent a single partition cell, i.e., a row/column pair, can be created using method createCellId or createCellId.

Nodes can also be mapped to a partition cell identifier that represents a multi-cell, i.e., a cell spanning multiple columns and rows. Please note, however, that multi-cells are not allowed to overlap each other. This means that the user has to ensure that each partition cell (row/column pair) is associated with at most one partition cell identifier. The multi-cell identifier can be created using methods createCellSpanId, createCellSpanId, createCellSpanId, createColumnSpanId, and createRowSpanId.

Sample output of a layout algorithm with a partition grid

Default Values of Properties

Type Details

yfiles module
layout-core
yfiles-umd modules
All layout modules, view-layout-bridge
Legacy UMD name
yfiles.layout.PartitionGrid

See Also

The partition cell identifier of a group node is not inherited by its non-group descendant. Hence, each non-group descendant has to be manually assigned to a partition cell identifier. In addition, a group node mapped to a column/row span partition cell identifier represents the associated column/row. Thus, its boundary corresponds to that of the column/row and edges incident to such a group node are not considered during the layout. Since the boundary of a group node always encompasses all of its children, don't assign a partition cell identifier to layout the group as normal.
Partition grid structures are currently supported by the HierarchicLayout, OrganicLayout, PartialLayout (depends on the exact setup) and EdgeRouter. The RecursiveGroupLayout allows to define a local partition grid for each recursive group node, so that the grid is supported if the responsible group layout algorithm is one of the aforementioned. Furthermore, layout stage GenericPartitionGridStage offers generic partition grid support.
If at least one node is mapped to a multi-cell, enabling option optimizeColumnOrder or optimizeRowOrder has no effect.

Constructors

Properties

Methods

Constants

Static Methods