|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.canvas.interactor.BoundsConstraint
public class BoundsConstraint
Keep a point within a given rectangular bounds.
Field Summary | |
---|---|
private java.awt.geom.Rectangle2D |
_bounds
The bounds |
private double |
_boundsX0
|
private double |
_boundsX1
|
private double |
_boundsY0
|
private double |
_boundsY1
|
Constructor Summary | |
---|---|
BoundsConstraint(java.awt.geom.Rectangle2D bounds)
Create a new BoundsConstraint with the given bounds. |
Method Summary | |
---|---|
void |
constrain(java.awt.geom.Point2D point)
Ask the bounds constraint to constrain this point. |
java.awt.geom.Rectangle2D |
getBounds()
Get the bounds |
void |
setBounds(java.awt.geom.Rectangle2D bounds)
Set the bounds |
boolean |
snapped()
Return false. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.awt.geom.Rectangle2D _bounds
private double _boundsX0
private double _boundsY0
private double _boundsX1
private double _boundsY1
Constructor Detail |
---|
public BoundsConstraint(java.awt.geom.Rectangle2D bounds)
Method Detail |
---|
public void constrain(java.awt.geom.Point2D point)
constrain
in interface PointConstraint
public java.awt.geom.Rectangle2D getBounds()
public boolean snapped()
snapped
in interface PointConstraint
public void setBounds(java.awt.geom.Rectangle2D bounds)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |