Search this API

y.layout.router.polyline
Class Grid

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

public final class Grid
extends java.lang.Object

This class 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 Grid instance.
 
Method Summary
 double getOriginX()
          Returns the x-coordinate of the origin.
 double getOriginY()
          Returns the y-coordinate of the origin.
 double getSpacing()
          Returns the spacing between the horizontal and vertical grid lines.
 java.lang.String toString()
          Returns a string representation of the Grid object.
 
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 Grid instance.

The spacing between the grid lines must be at least 1. If the given spacing is smaller, value 1 is assumed.

Parameters:
originX - the x-coordinate of the origin of the grid
originY - the y-coordinate of the origin of the grid
spacing - the spacing between the grid lines
Method Detail

getOriginX

public double getOriginX()
Returns the x-coordinate of the origin.

Returns:
the x-coordinate of the origin

getOriginY

public double getOriginY()
Returns the y-coordinate of the origin.

Returns:
the y-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 java.lang.String toString()
Returns a string representation of the Grid object.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the Grid object.

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