public boolean mouseDown (Event event, int x, int y) {
    dragStart = new Point (x, y);
    dragged = false;

    if (selectionAllowed && wave != null) {
      if ((event.modifiers & Event.META_MASK) != 0 ||
          (event.modifiers & Event.ALT_MASK) != 0 ||
	  (event.modifiers & Event.CTRL_MASK) != 0)
      {
	selectNone();
	repaint();
      }
      else if (event.clickCount == 2) {
	select (viewStart, viewEnd);
        repaint();
      }
      else if (event.clickCount == 3) {
	selectAll();
        repaint();
      }
      else {
        rubberBand = new BoxStretchRubberBand (x, 1, size().height-2);
        selectingFlag = true;
      }
    }
    else return super.mouseDown (event, x, y);
    return true;
  }