@Override
 public void mousePressed(MouseEvent evt) {
   // handle.mousePressed(evt);
   anchor = new Point(evt.getX(), evt.getY());
   multicaster.trackStart(anchor, evt.getModifiersEx(), getView());
   clearHoverHandles();
 }
 @Override
 public void mouseClicked(MouseEvent evt) {
   if (evt.getClickCount() == 2) {
     multicaster.trackDoubleClick(
         new Point(evt.getX(), evt.getY()), evt.getModifiersEx(), getView());
   }
   evt.consume();
 }
  @Override
  public void mouseReleased(MouseEvent evt) {
    dragLocation = new Point(evt.getX(), evt.getY());
    multicaster.trackEnd(anchor, dragLocation, evt.getModifiersEx(), getView());

    // Note: we must not fire "Tool Done" in this method, because then we can not
    // listen to keyboard events for the handle.

    Rectangle r = new Rectangle(anchor.x, anchor.y, 0, 0);
    r.add(evt.getX(), evt.getY());
    maybeFireBoundsInvalidated(r);
    dragLocation = null;
  }
 @Override
 public void mouseDragged(MouseEvent evt) {
   dragLocation = new Point(evt.getX(), evt.getY());
   multicaster.trackStep(anchor, dragLocation, evt.getModifiersEx(), getView());
   clearHoverHandles();
 }