All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class CH.ifa.draw.standard.GridConstrainer

java.lang.Object
   |
   +----CH.ifa.draw.standard.GridConstrainer

public class GridConstrainer
extends Object
implements PointConstrainer, Serializable
Constrains a point such that it falls on a grid.

See Also:
DrawingView

Constructor Index

 o GridConstrainer(int, int)

Method Index

 o constrainPoint(Point)
Constrains the given point.
 o getStepX()
Gets the x offset to move an object.
 o getStepY()
Gets the y offset to move an object.

Constructors

 o GridConstrainer
 public GridConstrainer(int x,
                        int y)

Methods

 o constrainPoint
 public Point constrainPoint(Point p)
Constrains the given point.

Returns:
constrained point.
 o getStepX
 public int getStepX()
Gets the x offset to move an object.

 o getStepY
 public int getStepY()
Gets the y offset to move an object.


All Packages  Class Hierarchy  This Package  Previous  Next  Index