/** * This method should be called during the mouse is dragged, if the mouse * event should result in a rotation. * * @param e */ public void rotate(final MouseEvent e) { final int dx = xLast - e.getX(); final int dy = yLast - e.getY(); rotateXY(dy * ONE_RAD, dx * ONE_RAD); xLast = e.getX(); yLast = e.getY(); }