Back to index

wims  3.65+svn20090927
HiderTool.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 HiderTool 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               if (e.isShiftDown()) o.setSuperHidden(true);
00018               else o.setHidden(!o.isHidden());
00019               zc.repaint();
00020               zc.reloadCD();
00021        }
00022        public void mouseMoved (MouseEvent e, ZirkelCanvas zc, boolean simple)
00023        {      zc.indicateObjects(e.getX(),e.getY());
00024        }
00025 
00026        public void showStatus (ZirkelCanvas zc)
00027        {      zc.showStatus(
00028                      Zirkel.name("message.hide","Hide: Select an object!"));
00029        }
00030 }