|
JHotDraw 7.0.6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jhotdraw.draw.GridConstrainer
public class GridConstrainer
Constrains a point such that it falls on a grid.
| Constructor Summary | |
|---|---|
GridConstrainer(double width,
double height)
Creates a new instance. |
|
| Method Summary | |
|---|---|
java.awt.geom.Point2D.Double |
constrainPoint(java.awt.geom.Point2D.Double p)
Constrains the given point. |
void |
draw(java.awt.Graphics2D g,
DrawingView view)
Draws the constrainer grid for the specified drawing view. |
double |
getHeight()
|
double |
getWidth()
|
boolean |
isVisible()
Returns true if the Constrainer grid is visible. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GridConstrainer(double width,
double height)
width - The width of a grid cell.height - The height of a grid cell.| Method Detail |
|---|
public double getWidth()
public double getHeight()
public java.awt.geom.Point2D.Double constrainPoint(java.awt.geom.Point2D.Double p)
Constrainer
constrainPoint in interface Constrainerpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean isVisible()
Constrainer
isVisible in interface Constrainer
public void draw(java.awt.Graphics2D g,
DrawingView view)
Constrainer
draw in interface Constrainer
|
Copyright 1996-2006 © JHotDraw.org | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||