Back to index

wims  3.65+svn20090927
RenamerTool.java
Go to the documentation of this file.
00001 package rene.zirkel.tools;
00002 
00003 // file: Hider.java
00004 
00005 import java.awt.event.MouseEvent;
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 RenamerTool extends ObjectConstructor
00013 {      boolean Enforce=false,Started=false;
00014        
00015        public void mousePressed (MouseEvent e, ZirkelCanvas zc)
00016        {      ConstructionObject o=zc.selectObject(e.getX(),e.getY());
00017               if (o==null) return;
00018               if (o.isKeep()) return;
00019               if (e.isShiftDown())
00020               {      zc.renameABC(o,true,!Started);
00021                      Started=true;
00022               }
00023               else zc.renameABC(o,false,false);
00024        }
00025        
00026        public void mouseMoved (MouseEvent e, ZirkelCanvas zc, boolean simple)
00027        {      zc.indicateObjects(e.getX(),e.getY(),true);
00028        }
00029 
00030        public void showStatus (ZirkelCanvas zc)
00031        {      zc.showStatus(Zirkel.name("message.rename"));
00032        }
00033        
00034        public boolean useSmartBoard ()
00035        {      return false;
00036        }
00037        
00038        public void reset (ZirkelCanvas zc)
00039        {      Started=false;
00040        }
00041 }