Packagecom.yworks.yfiles.layout.organic
Classpublic class GRIP
InheritanceGRIP Inheritance CanonicMultiStageLayouter Inheritance YObject Inheritance Object

This class implements a variant of the GRIP algorithm by P Gajer and SG Kobourov: "Graph Drawing with Intelligent Placement". It implements ideas of the GUIDE algorithm, and fixes some bugs from the original algorithm and implementation. Additionally several important parts of the algorithm have been drastically improved. This layout is especially suited for huge diagrams, that would normally be laid out using an Organic layout. It leads to perfect results for mesh-like graph structures.



Public Properties
 PropertyDefined By
 InheritedcomponentLayouter : LayoutStage
Specifies the LayoutStage responsible for laying out the connected components of the graph.
CanonicMultiStageLayouter
 InheritedcomponentLayouterEnabled : Boolean
Getter: Returns whether or not ComponentLayouter is enabled.
CanonicMultiStageLayouter
  deterministic : Boolean
Specifies whether or not GRIP works in a deterministic manner.
GRIP
  finalRounds : int
Getter: returns the number of the final rounds Setter: Sets the number of Fruchtermann Reingold rounds (final)
GRIP
 InheritedgroupNodeHider : LayoutStage
Specifies the LayoutStage that is responsible for hiding away grouping information for the layout algorithm.
CanonicMultiStageLayouter
 InheritedhideGroupNodes : Boolean
Specifies whether or not to hide away group nodes before the layout begins.
CanonicMultiStageLayouter
  initialTemperature : int
Specifies the initial temperature for each round.
GRIP
 InheritedlabelLayouter : LayoutStage
Getter: Returns the algorithm used for placing labels.
CanonicMultiStageLayouter
 InheritedlabelLayouterEnabled : Boolean
Getter: Returns whether or not LabelLayouter is enabled.
CanonicMultiStageLayouter
  laxity : Number
Specifies the current laxity value.
GRIP
 InheritedlayoutOrientation : int
Specifies the main layout orientation.
CanonicMultiStageLayouter
  nodeSizeAware : Boolean
Specifies whether or not GRIP takes average node sizes into account.
GRIP
 InheritedorientationLayouter : LayoutStage
Specifies the LayoutStage that is responsible for changing the orientation of the computed layout.
CanonicMultiStageLayouter
 InheritedorientationLayouterEnabled : Boolean
Getter: Returns whether or not the OrientationLayouter is enabled.
CanonicMultiStageLayouter
 InheritedparallelEdgeLayouter : LayoutStage
Getter: Returns the LayoutStage responsible for routing parallel edges.
CanonicMultiStageLayouter
 InheritedparallelEdgeLayouterEnabled : Boolean
Getter: Returns whether or not the ParallelEdgeLayouter is enabled.
CanonicMultiStageLayouter
  preferredEdgeLength : int
Specifies the desired edge length
GRIP
  rounds : int
Getter: returns the number of the initial rounds Setter: Sets the number of Kamada Kawai rounds (initial)
GRIP
 InheritedselfLoopLayouter : LayoutStage
Getter: Returns the LayoutStage used for routing Self-loops.
CanonicMultiStageLayouter
 InheritedselfLoopLayouterEnabled : Boolean
Getter: Returns whether or not the SelfLoopLayouter is enabled.
CanonicMultiStageLayouter
  smartInitialPlacement : Boolean
Specifies whether or not initial placements are determined in a smart way.
GRIP
 InheritedsubgraphLayouter : LayoutStage
Specifies the LayoutStage that is responsible for constraining the layout process to a subgraph of the target graph.
CanonicMultiStageLayouter
 InheritedsubgraphLayouterEnabled : Boolean
Getter: Returns whether or not the SubgraphLayouter is enabled.
CanonicMultiStageLayouter
Public Methods
 MethodDefined By
  
GRIP(init:Boolean = true)
Creates a new instance of the GRIP layout algorithm
GRIP
 Inherited
Appends a stage to the layout pipeline.
CanonicMultiStageLayouter
 Inherited
Returns a layout for the given layout graph.
CanonicMultiStageLayouter
 Inherited
Returns a layout for the given graph interface and layout.
CanonicMultiStageLayouter
 Inherited
canLayout(graph:LayoutGraph):Boolean
Tests whether or not the given graph can be laid out by this layouter.
CanonicMultiStageLayouter
  
[override]
GRIP
 Inherited
doLayout(layoutGraph:LayoutGraph):void
Calculates a layout for the given graph.
CanonicMultiStageLayouter
 Inherited
Calculates a layout for the given graph interface and layout.
CanonicMultiStageLayouter
  
[override]
GRIP
 Inherited
Disables all layout stages and performs only the core layouter.
CanonicMultiStageLayouter
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
GRIP
 Inherited
hashCode():int
YObject
  
[static] Creates a new instance of the GRIP layout algorithm
GRIP
 Inherited
Prepends a stage to the layout pipeline.
CanonicMultiStageLayouter
 Inherited
Removes a LayoutStage that has been previously added by the methods appendStage() or prependStage().
CanonicMultiStageLayouter
Protected Methods
 MethodDefined By
 Inherited
checkGroupNodeSize(layout:GraphLayout, node:Object):void
This method throws an com.yworks.bridge.util.IllegalArgumentException if the width/height of the given group node object is zero.
CanonicMultiStageLayouter
 Inherited
checkNodeSize(layout:GraphLayout, node:Object):void
This method throws an com.yworks.bridge.util.IllegalArgumentException if the width/height of the given node object is zero.
CanonicMultiStageLayouter
 Inherited
CanonicMultiStageLayouter
  
initGRIP():void
Initializes this object.
GRIP
Property Detail
deterministicproperty
deterministic:Boolean

Specifies whether or not GRIP works in a deterministic manner.


Implementation
    public function get deterministic():Boolean
    public function set deterministic(value:Boolean):void
finalRoundsproperty 
finalRounds:int

Getter: returns the number of the final rounds

Setter: Sets the number of Fruchtermann Reingold rounds (final)


Implementation
    public function get finalRounds():int
    public function set finalRounds(value:int):void
initialTemperatureproperty 
initialTemperature:int

Specifies the initial temperature for each round. This value should lie somewhere in [10..80].


Implementation
    public function get initialTemperature():int
    public function set initialTemperature(value:int):void
laxityproperty 
laxity:Number

Specifies the current laxity value.


Implementation
    public function get laxity():Number
    public function set laxity(value:Number):void
nodeSizeAwareproperty 
nodeSizeAware:Boolean

Specifies whether or not GRIP takes average node sizes into account.


Implementation
    public function get nodeSizeAware():Boolean
    public function set nodeSizeAware(value:Boolean):void
preferredEdgeLengthproperty 
preferredEdgeLength:int

Specifies the desired edge length


Implementation
    public function get preferredEdgeLength():int
    public function set preferredEdgeLength(value:int):void
roundsproperty 
rounds:int

Getter: returns the number of the initial rounds

Setter: Sets the number of Kamada Kawai rounds (initial)


Implementation
    public function get rounds():int
    public function set rounds(value:int):void
smartInitialPlacementproperty 
smartInitialPlacement:Boolean

Specifies whether or not initial placements are determined in a smart way.


Implementation
    public function get smartInitialPlacement():Boolean
    public function set smartInitialPlacement(value:Boolean):void
Constructor Detail
GRIP()Constructor
public function GRIP(init:Boolean = true)

Creates a new instance of the GRIP layout algorithm

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.
Method Detail
canLayoutCore()method
override public function canLayoutCore(g:LayoutGraph):Boolean

Parameters

g:LayoutGraph

Returns
Boolean
doLayoutCore()method 
override public function doLayoutCore(g:LayoutGraph):void

Parameters

g:LayoutGraph

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

Returns
Class
initGRIP()method 
protected final function initGRIP():void

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

See also

newGRIP()method 
public static function newGRIP():GRIP

Creates a new instance of the GRIP layout algorithm

Returns
GRIP