Packagecom.yworks.graph.model
Classpublic class TableLayoutConfigurator
InheritanceTableLayoutConfigurator Inheritance Object

Support class that correctly configures a PartitionGrid information from a given table configuration.

See also

com.yworks.yfiles.layout.hierarchic.incremental.PartitionGrid
ITable


Public Properties
 PropertyDefined By
  compactionEnabled : Boolean
Specifies whether or not to enable size compaction for table nodes.
TableLayoutConfigurator
  fromSketch : Boolean
Specifies whether or not from sketch mode should be enabled.
TableLayoutConfigurator
  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.
TableLayoutConfigurator
  minimalTableDistance : Number
The minimal distance between two different table nodes.
TableLayoutConfigurator
Public Methods
 MethodDefined By
  
cleanUp(graph:IGraph):void
Destroy all information that results from a previous prepareAll() and a subsequent layout.
TableLayoutConfigurator
  
getColumnLayout(originalTable:ITable, nodeLayout:IRectangle):Vector.<Number>
Return the sizes of all leaf rows.
TableLayoutConfigurator
  
getRowLayout(originalTable:ITable, nodeLayout:IRectangle):Vector.<Number>
Return the sizes of all leaf rows.
TableLayoutConfigurator
  
prepareAll(graph:IGraph):void
Set up the partition grid information from a graph that contains table structures.
TableLayoutConfigurator
  
restoreAll(graph:IGraph):void
Write back all information from the partition grid.
TableLayoutConfigurator
Property Detail
compactionEnabledproperty
compactionEnabled:Boolean

Specifies whether or not to enable size compaction for table nodes.

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 is true;.


Implementation
    public function get compactionEnabled():Boolean
    public function set compactionEnabled(value:Boolean):void
fromSketchproperty 
fromSketch:Boolean

Specifies whether or not from sketch mode should be enabled.

If enabled, the positions of the table group nodes are considered, i.e., for horizontal layout configuration these nodes are sorted according to their y-coordinate and for vertical layout configuration according to their x-coordinate.

The default value is false.


Implementation
    public function get fromSketch():Boolean
    public function set fromSketch(value:Boolean):void
horizontalLayoutproperty 
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.

The default value is false.


Implementation
    public function get horizontalLayout():Boolean
    public function set horizontalLayout(value:Boolean):void
minimalTableDistanceproperty 
minimalTableDistance:Number

The minimal distance between two different table nodes.


Implementation
    public function get minimalTableDistance():Number
    public function set minimalTableDistance(value:Number):void
Method Detail
cleanUp()method
public function cleanUp(graph:IGraph):void

Destroy all information that results from a previous prepareAll() and a subsequent layout.

Parameters

graph:IGraph — The graph to restore.

getColumnLayout()method 
public function getColumnLayout(originalTable:ITable, nodeLayout:IRectangle):Vector.<Number>

Return the sizes of all leaf rows.

This method does not modify originalTable. You also need to call cleanUp explicitly if you don't need the TableLayoutConfigurator anymore.

Parameters

originalTable:ITable — The table.
 
nodeLayout:IRectangle — The final layout of the node that owns the table.

Returns
Vector.<Number> — The sizes of all leaf rows in originalTable, in their natural order.
getRowLayout()method 
public function getRowLayout(originalTable:ITable, nodeLayout:IRectangle):Vector.<Number>

Return the sizes of all leaf rows.

This method does not modify originalTable. You also need to call cleanUp() explicitly if you don't need the TableLayoutConfigurator anymore.

Parameters

originalTable:ITable — The table.
 
nodeLayout:IRectangle — The final layout of the node that owns the table.

Returns
Vector.<Number> — The sizes of all leaf rows in originalTable, in their natural order.
prepareAll()method 
public function prepareAll(graph:IGraph):void

Set up the partition grid information from a graph that contains table structures.

Parameters

graph:IGraph — The graph to prepare.

restoreAll()method 
public function restoreAll(graph:IGraph):void

Write back all information from the partition grid.

Note that it is not safe to call this method without a previous prepareAll(). This method calls cleanUp() implicitly.

Parameters

graph:IGraph — The graph to restore.

See also