Packagecom.yworks.yfiles.layout.grouping
Classpublic class InsetsGroupBoundsCalculator
InheritanceInsetsGroupBoundsCalculator Inheritance YObject Inheritance Object
Implements GroupBoundsCalculator
Subclasses MinimumSizeGroupBoundsCalculator

Convenience implementation which allows for custom insets for each group node. Insets are provided through a DataProvider which must be registered with the graph prior to the invocation of the layout algorithm.



Public Properties
 PropertyDefined By
  considerEdgeLabels : Boolean
Specifies whether the bounds calculation for group nodes takes labels of the group's content edges into account.
InsetsGroupBoundsCalculator
  considerNodeHalos : Boolean
Specifies whether the bounds calculation for group nodes should take node halos of the group's content nodes into account.
InsetsGroupBoundsCalculator
  considerNodeLabelsEnabled : Boolean
Specifies whether the bounds calculation for group nodes should take labels of the group's content nodes into account.
InsetsGroupBoundsCalculator
  defaultInsets : Insets
Specifies the default insets.
InsetsGroupBoundsCalculator
  groupNodeInsetsDPKey : Object
Specifies the DataProvider key that is used to get the insets for the nodes.
InsetsGroupBoundsCalculator
Public Methods
 MethodDefined By
  
InsetsGroupBoundsCalculator(init:Boolean = true)
Constructs an instance that uses insets provided through the data provider registered at the input graph with the public key com.yworks.yfiles.layout.grouping.GroupingKeys.GROUP_NODE_INSETS_DPKEY.
InsetsGroupBoundsCalculator
  
InsetsGroupBoundsCalculator
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
InsetsGroupBoundsCalculator
 Inherited
hashCode():int
YObject
  
[static] Constructs an instance that uses insets provided through the data provider registered at the input graph with the public key com.yworks.yfiles.layout.grouping.GroupingKeys.GROUP_NODE_INSETS_DPKEY.
InsetsGroupBoundsCalculator
  
[static] Constructs an instance that uses the specified insets as the default if the data provider contains no insets information for a specific node.
InsetsGroupBoundsCalculator
  
[static] Constructs an instance using the given DataProvider key.
InsetsGroupBoundsCalculator
  
newInsetsGroupBoundsCalculator4(insetsDataProviderKey:Object, defaultInsets:Insets):InsetsGroupBoundsCalculator
[static] Constructs an instance using the given DataProvider key and default insets.
InsetsGroupBoundsCalculator
Protected Methods
 MethodDefined By
  
This method enlarges the given graph bounds by the insets associated with the given group node.
InsetsGroupBoundsCalculator
  
Calculates and returns the united bounds of the given nodes only, no labels or adjacent edges are considered.
InsetsGroupBoundsCalculator
  
Initializes this object.
InsetsGroupBoundsCalculator
  
Initializes this object.
InsetsGroupBoundsCalculator
  
initInsetsGroupBoundsCalculator3(insetsDataProviderKey:Object):void
Initializes this object.
InsetsGroupBoundsCalculator
  
initInsetsGroupBoundsCalculator4(insetsDataProviderKey:Object, defaultInsets:Insets):void
Initializes this object.
InsetsGroupBoundsCalculator
Property Detail
considerEdgeLabelsproperty
considerEdgeLabels:Boolean

Specifies whether the bounds calculation for group nodes takes labels of the group's content edges into account.

Defaults to false


Implementation
    public function get considerEdgeLabels():Boolean
    public function set considerEdgeLabels(value:Boolean):void
considerNodeHalosproperty 
considerNodeHalos:Boolean

Specifies whether the bounds calculation for group nodes should take node halos of the group's content nodes into account.

Defaults to true.


Implementation
    public function get considerNodeHalos():Boolean
    public function set considerNodeHalos(value:Boolean):void
considerNodeLabelsEnabledproperty 
considerNodeLabelsEnabled:Boolean

Specifies whether the bounds calculation for group nodes should take labels of the group's content nodes into account.

Defaults to false.


Implementation
    public function get considerNodeLabelsEnabled():Boolean
    public function set considerNodeLabelsEnabled(value:Boolean):void
defaultInsetsproperty 
defaultInsets:Insets

Specifies the default insets.


Implementation
    public function get defaultInsets():Insets
    public function set defaultInsets(value:Insets):void
groupNodeInsetsDPKeyproperty 
groupNodeInsetsDPKey:Object

Specifies the DataProvider key that is used to get the insets for the nodes.


Implementation
    public function get groupNodeInsetsDPKey():Object
    public function set groupNodeInsetsDPKey(value:Object):void
Constructor Detail
InsetsGroupBoundsCalculator()Constructor
public function InsetsGroupBoundsCalculator(init:Boolean = true)

Constructs an instance that uses insets provided through the data provider registered at the input graph with the public key com.yworks.yfiles.layout.grouping.GroupingKeys.GROUP_NODE_INSETS_DPKEY.

Parameters
init:Boolean (default = true) — An internally used switch to help handle proper instance initialization in inheritance chains where classes can have multiple constructor-like factory methods. This parameter can safely be ignored/omitted when calling the constructor.

See also

Method Detail
calculateBounds()method
public function calculateBounds(graph:LayoutGraph, groupNode:Node, children:NodeList):Rectangle2D

Parameters

graph:LayoutGraph
 
groupNode:Node
 
children:NodeList

Returns
Rectangle2D
createEnlargedBounds()method 
protected function createEnlargedBounds(graph:LayoutGraph, groupNode:Node, children:NodeList, bounds:Rectangle2D):Rectangle2D

This method enlarges the given graph bounds by the insets associated with the given group node.

Parameters

graph:LayoutGraph
 
groupNode:Node
 
children:NodeList
 
bounds:Rectangle2D

Returns
Rectangle2D
getClass()method 
override public function getClass():Class

Returns
Class
getNodeBounds()method 
protected function getNodeBounds(graph:LayoutGraph, nodes:NodeList):Rectangle2D

Calculates and returns the united bounds of the given nodes only, no labels or adjacent edges are considered.

Parameters

graph:LayoutGraph
 
nodes:NodeList

Returns
Rectangle2D
initInsetsGroupBoundsCalculator1()method 
protected final function initInsetsGroupBoundsCalculator1():void

Initializes this object. See the documentation of the corresponding factory method newInsetsGroupBoundsCalculator1() for details.

See also

initInsetsGroupBoundsCalculator2()method 
protected final function initInsetsGroupBoundsCalculator2(insets:Insets):void

Initializes this object. See the documentation of the corresponding factory method newInsetsGroupBoundsCalculator2() for details.

Parameters

insets:Insets

See also

initInsetsGroupBoundsCalculator3()method 
protected final function initInsetsGroupBoundsCalculator3(insetsDataProviderKey:Object):void

Initializes this object. See the documentation of the corresponding factory method newInsetsGroupBoundsCalculator3() for details.

Parameters

insetsDataProviderKey:Object

See also

initInsetsGroupBoundsCalculator4()method 
protected final function initInsetsGroupBoundsCalculator4(insetsDataProviderKey:Object, defaultInsets:Insets):void

Initializes this object. See the documentation of the corresponding factory method newInsetsGroupBoundsCalculator4() for details.

Parameters

insetsDataProviderKey:Object
 
defaultInsets:Insets

See also

newInsetsGroupBoundsCalculator1()method 
public static function newInsetsGroupBoundsCalculator1():InsetsGroupBoundsCalculator

Constructs an instance that uses insets provided through the data provider registered at the input graph with the public key com.yworks.yfiles.layout.grouping.GroupingKeys.GROUP_NODE_INSETS_DPKEY.

Returns
InsetsGroupBoundsCalculator

See also

newInsetsGroupBoundsCalculator2()method 
public static function newInsetsGroupBoundsCalculator2(insets:Insets):InsetsGroupBoundsCalculator

Constructs an instance that uses the specified insets as the default if the data provider contains no insets information for a specific node.

Parameters

insets:Insets

Returns
InsetsGroupBoundsCalculator
newInsetsGroupBoundsCalculator3()method 
public static function newInsetsGroupBoundsCalculator3(insetsDataProviderKey:Object):InsetsGroupBoundsCalculator

Constructs an instance using the given DataProvider key.

Parameters

insetsDataProviderKey:Object

Returns
InsetsGroupBoundsCalculator
newInsetsGroupBoundsCalculator4()method 
public static function newInsetsGroupBoundsCalculator4(insetsDataProviderKey:Object, defaultInsets:Insets):InsetsGroupBoundsCalculator

Constructs an instance using the given DataProvider key and default insets.

Parameters

insetsDataProviderKey:Object
 
defaultInsets:Insets

Returns
InsetsGroupBoundsCalculator