uci.gef
Class GuideGrid
java.lang.Object
|
+--uci.gef.Guide
|
+--uci.gef.GuideGrid
- public class GuideGrid
- extends Guide
Constrains interactions to certain coordinates. In this case,
GuideGrid makes objects snap to a grid. Note that GuideGrid is an
invisible object that controls the behavior of the Editor and
Modes. It is conceptually related to the visible grid (implemented
in LayerGrid), but there is no functional relationship between them
in this framework.
- See Also:
- Serialized Form
|
Field Summary |
protected int |
_gridSize
Size of the grid. |
|
Constructor Summary |
GuideGrid(int size)
Make a new GuideGrid instance with the given grid size. |
|
Method Summary |
void |
adjust()
Bring up a dialog box to set the grid snap parameters. |
int |
gridSize()
Reply the size of the grid to snap points to. |
void |
gridSize(int g)
Set the size of the grid. |
void |
snap(Point p)
Modify the given point to be on the guideline (In this case, a
gridline) |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
_gridSize
protected int _gridSize
- Size of the grid.
GuideGrid
public GuideGrid(int size)
- Make a new GuideGrid instance with the given grid size.
gridSize
public int gridSize()
- Reply the size of the grid to snap points to.
gridSize
public void gridSize(int g)
- Set the size of the grid.
snap
public void snap(Point p)
- Modify the given point to be on the guideline (In this case, a
gridline)
- Overrides:
- snap in class Guide
adjust
public void adjust()
- Bring up a dialog box to set the grid snap parameters.
Needs-More-Work: use the property sheet to change guide
parameters.
- Overrides:
- adjust in class Guide