JHotDraw 7.0.6

org.jhotdraw.draw
Interface Constrainer

All Known Implementing Classes:
GridConstrainer

public interface Constrainer

Interface to constrain a Point2D.Double. This can be used to implement different kinds of grids.


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.
 boolean isVisible()
          Returns true if the Constrainer grid is visible.
 

Method Detail

constrainPoint

java.awt.geom.Point2D.Double constrainPoint(java.awt.geom.Point2D.Double p)
Constrains the given point. This method changes the point which is passed as a parameter.

Returns:
constrained point.

isVisible

boolean isVisible()
Returns true if the Constrainer grid is visible.


draw

void draw(java.awt.Graphics2D g,
          DrawingView view)
Draws the constrainer grid for the specified drawing view.


Copyright 1996-2006 © JHotDraw.org