Class for creating a partition grid, i.e., a grid that partitions the drawing area into rectangular partition cells.

Namespace: yWorks.yFiles.Layout.Grid
Assembly: yWorks.yFilesSilverlight.Algorithms (in yWorks.yFilesSilverlight.Algorithms.dll) Version: 2.4.0.0

Syntax

C#
public class PartitionGrid
Visual Basic
Public Class PartitionGrid

Remarks

Class for creating a partition grid, i.e., a grid that partitions the drawing area into rectangular partition cells. The grid consists of rows and columns that are created using the corresponding constructors of this class or method #addColumn or #addRow. The PartitionGrid object has to be registered to the graph using DataProvider key PartitionGridDpKey ;

Each node can be assigned to a PartitionCellId which represents a set of partition cells. The mapping has to be registered to the graph using DataProvider key PartitionCellDpKey . Simple partition cell identifiers which represent a single partition cell, i.e., a row-/column-pair, can be created using method CreateCellId(RowDescriptor, ColumnDescriptor) or CreateCellId(Int32, Int32) .

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(RowDescriptor, ColumnDescriptor, RowDescriptor, ColumnDescriptor) , CreateCellSpanId(Int32, Int32, Int32, Int32) , CreateCellSpanId(ICollection, ICollection) , CreateColumnSpanId(Int32) , and CreateRowSpanId(Int32) .

Note: if at least one node is mapped to a multi-cell, enabling option OptimizeColumnOrder or OptimizeRowOrder has no effect.

Note: A group node mapped to a multi-cell identifier represents the corresponding multi-cell, i.e., its boundary corresponds to the smallest rectangle containing all partition cells (rows and columns) specified by the multi-cell. The boundary does not depend on the partition cells associated with the group's descendants. Hence, each non-group descendant has to be manually assigned to one of the partition cells. Furthermore, edges incident to such a group node are not considered during the layout. Mapping a group node to a simple partition cell identifier has no effect.

Inheritance Hierarchy

System..::..Object
  yWorks.yFiles.Layout.Grid..::..PartitionGrid

See Also