public void mouseDrag(MouseEvent e, int x, int y) {
    super.mouseDrag(e, x, y);
    fMoved = (Math.abs(x - fAnchorX) > 4) || (Math.abs(y - fAnchorY) > 4);

    if (fMoved) {
      FigureEnumeration figures = getUndoActivity().getAffectedFigures();
      while (figures.hasMoreElements()) {
        figures.nextFigure().moveBy(x - fLastX, y - fLastY);
      }
    }
    fLastX = x;
    fLastY = y;
  }
  public void mouseDown(MouseEvent e, int x, int y) {
    super.mouseDown(e, x, y);
    fLastX = x;
    fLastY = y;

    if (e.isShiftDown()) {
      view().toggleSelection(fAnchorFigure);
      fAnchorFigure = null;
    } else if (!view().isFigureSelected(fAnchorFigure)) {
      view().clearSelection();
      view().addToSelection(fAnchorFigure);
    }
  }
 public void mouseDown(MouseEvent e, int x, int y) {
   super.mouseDown(e, x, y);
   fAnchorHandle.invokeStart(x, y, view());
 }
 public void mouseUp(MouseEvent e, int x, int y) {
   super.mouseDrag(e, x, y);
   fAnchorHandle.invokeEnd(x, y, fAnchorX, fAnchorY, view());
 }
Exemple #5
0
 public void deactivate(DrawingView view) {
   super.deactivate();
   endEdit();
 }