Back to index

wims  3.65+svn20090927
DeleteTool.java
Go to the documentation of this file.
00001 package rene.zirkel.tools;
00002 
00003 // file: Hider.java
00004 
00005 import java.awt.event.*;
00006 
00007 import rene.zirkel.Zirkel;
00008 import rene.zirkel.ZirkelCanvas;
00009 import rene.zirkel.constructors.*;
00010 import rene.zirkel.objects.ConstructionObject;
00011 
00012 public class DeleteTool extends ObjectConstructor
00013 {      public void mousePressed (MouseEvent e, ZirkelCanvas zc)
00014        {      double x=zc.x(e.getX()),y=zc.y(e.getY());
00015               ConstructionObject o=zc.selectObject(e.getX(),e.getY());
00016               if (o==null) return;
00017               zc.delete(o);
00018               zc.repaint();
00019        }
00020        public void mouseMoved (MouseEvent e, ZirkelCanvas zc, boolean simple)
00021        {      zc.indicateObjects(e.getX(),e.getY());
00022        }
00023 
00024        public void showStatus (ZirkelCanvas zc)
00025        {      zc.showStatus(
00026                      Zirkel.name("message.delete","Delete: Select an object!"));
00027        }
00028 }