CH.ifa.draw.standard
Class ToggleGridCommand

java.lang.Object
  extended by CH.ifa.draw.util.Command
      extended by CH.ifa.draw.standard.ToggleGridCommand

public class ToggleGridCommand
extends Command

A command to toggle the snap to grid behavior.


Constructor Summary
ToggleGridCommand(java.lang.String name, DrawingView view, java.awt.Point grid)
          Constructs a toggle grid command.
 
Method Summary
 void execute()
          Executes the command.
 
Methods inherited from class CH.ifa.draw.util.Command
isExecutable, name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToggleGridCommand

public ToggleGridCommand(java.lang.String name,
                         DrawingView view,
                         java.awt.Point grid)
Constructs a toggle grid command.

Parameters:
name - the command name
image - the pathname of the image
grid - the grid size. A grid size of 1,1 turns grid snapping off.
Method Detail

execute

public void execute()
Description copied from class: Command
Executes the command.

Specified by:
execute in class Command