Packagecom.yworks.yfiles.layout.transformer
Classpublic class GraphZoomer
InheritanceGraphZoomer Inheritance YObject Inheritance Object
Implements Layouter

This class contains algorithms which allow for zooming parts of a diagram only in a so-called fish-eye (radial) style. This type of zoom however will not introduce new bends for edges but will move the node centers and bends only.



Public Methods
 MethodDefined By
  
GraphZoomer(init:Boolean = true)
Creates a new instance of GraphZoomer.
GraphZoomer
  
addRadialZoom(center:YPoint, innerRadius:Number, outerRadius:Number, zoomFactor:Number):void
Adds a zoom operation to the list of operations to be performed on the graph during the doLayout phase.
GraphZoomer
  
addRectangularZoom(center:YPoint, innerRadius:Number, outerRadius:Number, ratio:Number, zoomFactor:Number):void
Adds a zoom operation to the list of operations performed during the doLayout phase.
GraphZoomer
  
canLayout(graph:LayoutGraph):Boolean
Returns true iff the given graph can be laid out by this algorithm.
GraphZoomer
  
doLayout(graph:LayoutGraph):void
Assigns a new graph layout to the given layout graph.
GraphZoomer
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
GraphZoomer
 Inherited
hashCode():int
YObject
  
[static] Creates a new instance of GraphZoomer.
GraphZoomer
  
[static] Convenience method which applies a custom zoom to the graph
GraphZoomer
  
zoomRadial(graph:LayoutGraph, centerX:Number, centerY:Number, innerRadius:Number, outerRadius:Number, zoomFactor:Number):void
[static] Convenience method which applies a radial zoom to the graph
GraphZoomer
  
zoomRectangular(graph:LayoutGraph, centerX:Number, centerY:Number, innerRadius:Number, outerRadius:Number, ratio:Number, zoomFactor:Number):void
[static] Convenience method which applies a rectangular zoom to the graph
GraphZoomer
Protected Methods
 MethodDefined By
  
Initializes this object.
GraphZoomer
Constructor Detail
GraphZoomer()Constructor
public function GraphZoomer(init:Boolean = true)

Creates a new instance of GraphZoomer.

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
addRadialZoom()method
public function addRadialZoom(center:YPoint, innerRadius:Number, outerRadius:Number, zoomFactor:Number):void

Adds a zoom operation to the list of operations to be performed on the graph during the doLayout phase.

Parameters

center:YPoint — the center of the zoom
 
innerRadius:Number — the radius of the circle around the center inside which the zoom level is constantly set to zoomFactor
 
outerRadius:Number — the radius of the outer circle around the center outside of which the zoomFactor should be unchanged. This value must be greater than innerRadius
 
zoomFactor:Number — the zoomFactor inside the inner circle

addRectangularZoom()method 
public function addRectangularZoom(center:YPoint, innerRadius:Number, outerRadius:Number, ratio:Number, zoomFactor:Number):void

Adds a zoom operation to the list of operations performed during the doLayout phase. This performs a zoom on a rectangular shape using the given radii and the ratio defining the rectangle.

Parameters

center:YPoint — the center of the zoom
 
innerRadius:Number — the radius of the rectangular shape around the center inside which the zoom level is constantly set to zoomFactor
 
outerRadius:Number — the radius of the outer rectangular shape around the center outside of which the zoomFactor should be unchanged. This value must be greater than innerRadius
 
ratio:Number
 
zoomFactor:Number — the zoomFactor inside the inner rectangle

canLayout()method 
public function canLayout(graph:LayoutGraph):Boolean

Returns true iff the given graph can be laid out by this algorithm. Calling doLayout with the given graph as it's argument will only success if this method returns true.

Parameters

graph:LayoutGraph

Returns
Boolean
doLayout()method 
public function doLayout(graph:LayoutGraph):void

Assigns a new graph layout to the given layout graph.

Parameters

graph:LayoutGraph

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

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

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

See also

newGraphZoomer()method 
public static function newGraphZoomer():GraphZoomer

Creates a new instance of GraphZoomer.

Returns
GraphZoomer
zoom()method 
public static function zoom(graph:LayoutGraph, zoom:GraphZoomer_Zoom):void

Convenience method which applies a custom zoom to the graph

Parameters

graph:LayoutGraph
 
zoom:GraphZoomer_Zoom

zoomRadial()method 
public static function zoomRadial(graph:LayoutGraph, centerX:Number, centerY:Number, innerRadius:Number, outerRadius:Number, zoomFactor:Number):void

Convenience method which applies a radial zoom to the graph

Parameters

graph:LayoutGraph
 
centerX:Number
 
centerY:Number
 
innerRadius:Number
 
outerRadius:Number
 
zoomFactor:Number

zoomRectangular()method 
public static function zoomRectangular(graph:LayoutGraph, centerX:Number, centerY:Number, innerRadius:Number, outerRadius:Number, ratio:Number, zoomFactor:Number):void

Convenience method which applies a rectangular zoom to the graph

Parameters

graph:LayoutGraph
 
centerX:Number
 
centerY:Number
 
innerRadius:Number
 
outerRadius:Number
 
ratio:Number
 
zoomFactor:Number