|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.canvas.interactor.QuadrantConstraint
public class QuadrantConstraint
Keep a point within one of the four quadrants relative to some reference point.
Constructor Summary | |
---|---|
QuadrantConstraint(Point2D origin,
int quadrant)
Create a new QuadrantConstraint with the given origin and quadrant. |
Method Summary | |
---|---|
void |
constrain(Point2D point)
Ask the bounds constraint to constrain this point. |
Point2D |
getOrigin()
Get the origin |
int |
getQuadrant()
Get the quadrant |
void |
setOrigin(Point2D origin)
Set the origin |
void |
setQuadrant(int quadrant)
Set the quadrant |
boolean |
snapped()
Return false. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QuadrantConstraint(Point2D origin, int quadrant)
Method Detail |
---|
public void constrain(Point2D point)
constrain
in interface PointConstraint
public Point2D getOrigin()
public int getQuadrant()
public void setOrigin(Point2D origin)
public void setQuadrant(int quadrant)
public boolean snapped()
snapped
in interface PointConstraint
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |