sclass CircleDoubleClicker extends MouseAdapter { CirclesAndLines cal; Canvas canvas; O onClick; *(CirclesAndLines *cal, Canvas *canvas, O *onClick) { if (containsInstance(canvas.tools, CircleDoubleClicker)) ret; canvas.tools.add(this); canvas.addMouseListener(this); } public void mouseClicked(MouseEvent e) { if (e.getButton() == MouseEvent.BUTTON1 && e.getClickCount() == 2) { Pt p = canvas.pointFromEvent(e); Circle c = cal.findCircle(canvas, p); if (c != null) pcallF(onClick, c); } } }