int repeat = 0; if(e.getClickCount() != 1) repeat = 1;
  public void mousePressed(MouseEvent e)  {    if (ren.VisibleActorCount() == 0) return;    Lock();     rw.SetDesiredUpdateRate(5.0);    lastX = e.getX();    lastY = e.getY();    ctrlPressed = (e.getModifiers() & InputEvent.CTRL_MASK) == InputEvent.CTRL_MASK ? 1:0;    shiftPressed = (e.getModifiers() & InputEvent.SHIFT_MASK) == InputEvent.SHIFT_MASK ? 1:0;    iren.SetEventInformationFlipY(e.getX(), e.getY(),                                   ctrlPressed, shiftPressed, '0', 0, "0");    if ((e.getModifiers() & InputEvent.BUTTON1_MASK) ==         InputEvent.BUTTON1_MASK)       {        iren.LeftButtonPressEvent();      }    else if ((e.getModifiers() & InputEvent.BUTTON2_MASK) ==         InputEvent.BUTTON2_MASK) {      {        iren.MiddleButtonPressEvent();      }    }    else if ((e.getModifiers() & InputEvent.BUTTON3_MASK) ==           InputEvent.BUTTON3_MASK) {      {        iren.RightButtonPressEvent();      }    }    UnLock();  }