Back to index

moin  1.9.0~rc2
ToggleGuidesCommand.java
Go to the documentation of this file.
00001 /*
00002  * @(#)ToggleGuidesCommand.java 5.1
00003  *
00004  */
00005 
00006 package CH.ifa.draw.standard;
00007 
00008 import java.util.*;
00009 import java.awt.*;
00010 import CH.ifa.draw.util.*;
00011 import CH.ifa.draw.framework.*;
00012 
00017 public class ToggleGuidesCommand extends Command {
00018     private DrawingView fView;
00019 
00025     public ToggleGuidesCommand(String name, DrawingView view) {
00026         super(name);
00027        fView = view;
00028     }
00029 
00030     public void execute() {
00031        fView.enableGuides(!fView.guidesEnabled());
00032        ((Component)fView).repaint();
00033     }
00034 }
00035 
00036