Creates a PartitionGrid that matches a given table configuration of an IGraph and registers IMapper<K,V> for that grid at the graph.
Remarks
Type Details
- yfiles module
- view-layout-bridge
- yfiles-umd modules
- view-layout-bridge
- Legacy UMD name
- yfiles.layout.TableLayoutConfigurator
See Also
Constructors
Creates a new instance.
Parameters
A map of options to pass to the method.
- minimumTableDistance - number
The minimum distance between two different table nodes This option sets the minimumTableDistance property on the created object.
- compaction - boolean
Whether size compaction for table nodes is enabled. This option sets the compaction property on the created object.
- horizontalLayout - boolean
Whether the configurator will prepare its associated graph for a vertical (that is top-to-bottom or bottom-to-top) layout calculation or a horizontal (that is left-to-right or right-to-left) one. This option sets the horizontalLayout property on the created object.
- fromSketch - boolean
Whether 'from sketch' mode is enabled. This option sets the fromSketch property on the created object.
Properties
Gets or sets whether size compaction for table nodes is enabled.
Remarks
If size compaction is enabled, the size of a column or row (or a table node for that matter) may be reduced due to layout calculation, but never below the column's or row's minimum size. If size compaction is disabled, columns and rows (and therefore table nodes) may only grow due to layout calculation.
The default value for this property is true
.
Gets or sets whether 'from sketch' mode is enabled.
Remarks
Gets the PartitionGrid created in the prepare method.
Methods
Returns the PartitionCellId assigned to the node
.
Remarks
Parameters
A map of options to pass to the method.
- node - INode
- The node to return the assigned cell id for.
Returns
- ↪PartitionCellId
- The PartitionCellId assigned to the
node
.
Returns the ITable the node
belongs to.
Remarks
The node to table association is resolved in prepare and is only valid before restore is called so an InvalidOperationError is thrown when this method isn't called between those two.
The associated table is the ITable provided by the node itself or one of its ancestors via lookup. If no associated table can be found, null
is returned.
Parameters
A map of options to pass to the method.
- node - INode
- The node to lookup the table for.
Returns
Returns the ColumnDescriptor of the column in the grid to which the leafColumn
is mapped.
Remarks
The columns are mapped to the grid in prepare and are only valid before restore is called so an InvalidOperationError is thrown when this method isn't called between those two.
Note that only leaf columns (columns with no child columns) are mapped to grid columns so null
is returned for any other column.
Parameters
A map of options to pass to the method.
- leafColumn - IColumn
- The column to return the column descriptor for.
Returns
- ↪ColumnDescriptor
- The ColumnDescriptor the
leafColumn
is mapped to.
Return the sizes of all leaf rows.
Remarks
originalTable
. You also need to call cleanUp explicitly if you don't need the TableLayoutConfigurator anymore.Parameters
A map of options to pass to the method.
Returns
- ↪number[]
- The sizes of all leaf rows in
originalTable
, in their natural order.
Returns the RowDescriptor of the row in the grid to which the leafRow
is mapped.
Remarks
The rows are mapped to the grid in prepare and are only valid before restore is called so an InvalidOperationError is thrown when this method isn't called between those two.
Note that only leaf rows (rows with no child rows) are mapped to grid rows so null
is returned for any other row.
Parameters
A map of options to pass to the method.
- leafRow - IRow
- The row to return the row descriptor for.
Returns
- ↪RowDescriptor
- The RowDescriptor the
leafRow
is mapped to.
Return the sizes of all leaf rows.
Remarks
originalTable
. You also need to call cleanUp explicitly if you don't need the TableLayoutConfigurator anymore.Parameters
A map of options to pass to the method.
Returns
- ↪number[]
- The sizes of all leaf rows in
originalTable
, in their natural order.
Returns the INode which provides the table
in its lookup.
Remarks
Parameters
A map of options to pass to the method.
- table - ITable
- The table for which the corresponding owner node is searched.
Returns
Setup partition grid information from a graph that contains table structures
Write back all information from the partition grid