Packagecom.yworks.yfiles.layout.router.polyline
Classpublic class Grid
InheritanceGrid Inheritance YObject Inheritance Object

Provides support for routing edges on equidistant grid lines.

The grid is defined by its origin and the spacing between the equidistant grid lines.



Public Properties
 PropertyDefined By
  originX : Number
[read-only] Returns the horizontal coordinate of the origin.
Grid
  originY : Number
[read-only] Returns the vertical coordinate of the origin.
Grid
  spacing : Number
[read-only] Returns the spacing between the horizontal and vertical grid lines.
Grid
Public Methods
 MethodDefined By
  
Grid(originX:Number, originY:Number, spacing:Number, init:Boolean = true)
Creates a new instance.
Grid
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
Grid
 Inherited
hashCode():int
YObject
  
newGrid(originX:Number, originY:Number, spacing:Number):Grid
[static] Creates a new instance.
Grid
  
toString():String
Returns a String representation of Grid.
Grid
Protected Methods
 MethodDefined By
  
initGrid(originX:Number, originY:Number, spacing:Number):void
Initializes this object.
Grid
Property Detail
originXproperty
originX:Number  [read-only]

Returns the horizontal coordinate of the origin.


Implementation
    public function get originX():Number
originYproperty 
originY:Number  [read-only]

Returns the vertical coordinate of the origin.


Implementation
    public function get originY():Number
spacingproperty 
spacing:Number  [read-only]

Returns the spacing between the horizontal and vertical grid lines.


Implementation
    public function get spacing():Number
Constructor Detail
Grid()Constructor
public function Grid(originX:Number, originY:Number, spacing:Number, init:Boolean = true)

Creates a new instance. The spacing between the grid lines must be at least 1. If spacing is smaller, 1 is assumed.

Parameters
originX:Number — The horizontal coordinate of the origin.
 
originY:Number — The vertical coordinate of the origin.
 
spacing:Number — The spacing between the grid lines. Must be at least 1.
 
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
getClass()method
override public function getClass():Class

Returns
Class
initGrid()method 
protected final function initGrid(originX:Number, originY:Number, spacing:Number):void

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

Parameters

originX:Number
 
originY:Number
 
spacing:Number

See also

newGrid()method 
public static function newGrid(originX:Number, originY:Number, spacing:Number):Grid

Creates a new instance. The spacing between the grid lines must be at least 1. If spacing is smaller, 1 is assumed.

Parameters

originX:Number — The horizontal coordinate of the origin.
 
originY:Number — The vertical coordinate of the origin.
 
spacing:Number — The spacing between the grid lines. Must be at least 1.

Returns
Grid
toString()method 
public function toString():String

Returns a String representation of Grid.

Returns
String — A String representation of Grid.