Logo Search packages:      
Sourcecode: wims version File versions  Download package

DeleteTool.java

package rene.zirkel.tools;

// file: Hider.java

import java.awt.event.*;

import rene.zirkel.Zirkel;
import rene.zirkel.ZirkelCanvas;
import rene.zirkel.constructors.*;
import rene.zirkel.objects.ConstructionObject;

public class DeleteTool extends ObjectConstructor
{     public void mousePressed (MouseEvent e, ZirkelCanvas zc)
      {     double x=zc.x(e.getX()),y=zc.y(e.getY());
            ConstructionObject o=zc.selectObject(e.getX(),e.getY());
            if (o==null) return;
            zc.delete(o);
            zc.repaint();
      }
      public void mouseMoved (MouseEvent e, ZirkelCanvas zc, boolean simple)
      {     zc.indicateObjects(e.getX(),e.getY());
      }

      public void showStatus (ZirkelCanvas zc)
      {     zc.showStatus(
                  Zirkel.name("message.delete","Delete: Select an object!"));
      }
}

Generated by  Doxygen 1.6.0   Back to index