org.graffiti.plugin.view
Class NoGrid

java.lang.Object
  extended by org.graffiti.plugin.view.AbstractGrid
      extended by org.graffiti.plugin.view.NoGrid
All Implemented Interfaces:
Grid

public class NoGrid
extends AbstractGrid

A Grid class, which represents an empty grid without any grid lines.

Version:
$Revision$ $Date$
Author:
Andreas Gleißner

Field Summary
 
Fields inherited from class org.graffiti.plugin.view.AbstractGrid
origin
 
Fields inherited from interface org.graffiti.plugin.view.Grid
DESCRIPTION_PATTERN, NAME_PATTERN
 
Constructor Summary
NoGrid()
           
 
Method Summary
 List<Shape> getShapes(Rectangle2D area)
          Returns a list of shapes to present the grid in the specified area.
 Point2D snap(Point2D point, double tolerance)
          Returns the new position of a node or bend that was previously located at the specified point and snap in the grid.
 
Methods inherited from class org.graffiti.plugin.view.AbstractGrid
getOrigin, getSnapTolerance, isBendSnap, setBendSnap, setOrigin, setSnapTolerance, snapBend, snapNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoGrid

public NoGrid()
Method Detail

getShapes

public List<Shape> getShapes(Rectangle2D area)
Returns a list of shapes to present the grid in the specified area. This implementation returns an empty list.

Specified by:
getShapes in interface Grid
Specified by:
getShapes in class AbstractGrid
Parameters:
area - the area.
Returns:
a list of shapes to present the grid in the specified area.

snap

public Point2D snap(Point2D point,
                    double tolerance)
Returns the new position of a node or bend that was previously located at the specified point and snap in the grid. This implementation simply rounds point to integer coordinates.

Specified by:
snap in class AbstractGrid
Parameters:
point - the previous position of the node or bend.
Returns:
the new position of the node or bend.


Generated at 2012-05-30 11:00:36 PM CEST