Search this API

y.layout.router.polyline
Class Grid

java.lang.Object
  extended by y.layout.router.polyline.Grid

public final class Grid
extends 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.


Constructor Summary
Grid(double originX, double originY, double spacing)
          Creates a new instance.
 
Method Summary
 double getOriginX()
          Returns the horizontal coordinate of the origin.
 double getOriginY()
          Returns the vertical coordinate of the origin.
 double getSpacing()
          Returns the spacing between the horizontal and vertical grid lines.
 String toString()
          Returns a String representation of Grid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Grid

public Grid(double originX,
            double originY,
            double spacing)
Creates a new instance. The spacing between the grid lines must be at least 1. If spacing is smaller, 1 is assumed.

Parameters:
originX - The horizontal coordinate of the origin.
originY - The vertical coordinate of the origin.
spacing - The spacing between the grid lines. Must be at least 1.
Method Detail

getOriginX

public double getOriginX()
Returns the horizontal coordinate of the origin.

Returns:
The horizontal coordinate of the origin.

getOriginY

public double getOriginY()
Returns the vertical coordinate of the origin.

Returns:
The vertical coordinate of the origin.

getSpacing

public double getSpacing()
Returns the spacing between the horizontal and vertical grid lines.

Returns:
The spacing between the horizontal and vertical grid lines.

toString

public String toString()
Returns a String representation of Grid.

Overrides:
toString in class Object
Returns:
A String representation of Grid.

© Copyright 2000-2013,
yWorks GmbH.
All rights reserved.