org.tigris.gef.base
Class Guide

java.lang.Object
  extended by org.tigris.gef.base.Guide
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
GuideGrid

public abstract class Guide
extends java.lang.Object
implements java.io.Serializable

Constrains interactions to certain coordinates. For example GuideGrid makes objects snap to a grid. Other subclasses might implement other snapping rules, for example, a polar grid or gravity (objects cling to other objects when they get close).

See Also:
GuideGrid, Serialized Form

Constructor Summary
Guide()
           
 
Method Summary
 void adjust()
          Bring up a dialog box to set the parameters for this guide.
abstract  void snap(java.awt.Point p)
          Modify the given point to satisfy guide conditions (e.g.
 java.awt.Point snapTo(java.awt.Point p)
          Return a NEW Point that is close to p and on the guideline (e.g., gridline).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Guide

public Guide()
Method Detail

snapTo

public final java.awt.Point snapTo(java.awt.Point p)
Return a NEW Point that is close to p and on the guideline (e.g., gridline).


snap

public abstract void snap(java.awt.Point p)
Modify the given point to satisfy guide conditions (e.g. be on a gridline).


adjust

public void adjust()
Bring up a dialog box to set the parameters for this guide. E.g., set the size of a grid.