diva.canvas.interactor
Interface PointConstraint

All Known Implementing Classes:
BoundsConstraint, QuadrantConstraint, SnapConstraint

public interface PointConstraint

An interface implemented by classes that can constrain a point to lie within a certain set of values.

Version:
$Id: PointConstraint.java,v 1.5 2004/04/13 06:25:11 cxh Exp $
Author:
John Reekie

Method Summary
 void constrain(java.awt.geom.Point2D point)
          Ask the point constraint to constrain this point.
 boolean snapped()
          Ask the point constraint call to constrain() cause a "snap."
 

Method Detail

constrain

public void constrain(java.awt.geom.Point2D point)
Ask the point constraint to constrain this point. The constraint should directly modify the passed point.


snapped

public boolean snapped()
Ask the point constraint call to constrain() cause a "snap." A snap means that the output value of the point changed from one region to another. If a snap did occur, the caller will probably fire a ConstraintEvent.