Package research.figure

Examples of research.figure.RoundRectangleFigure


  }

  public void invokeStep (InputEvent inputEvent, int x, int y, int anchorX, int anchorY, DrawingView view) {
    int dx = x-anchorX;
    int dy = y-anchorY;
    RoundRectangleFigure owner = (RoundRectangleFigure)owner();
    Rectangle r = owner.getDisplayBox();
    Point originalRadius = ((UndoActivity)getUndoActivity()).getOldRadius();
    int rx = Geom.range(0, r.width, 2*(originalRadius.x/2 + dx));
    int ry = Geom.range(0, r.height, 2*(originalRadius.y/2 + dy));
    owner.setArc(rx, ry);
  }
View Full Code Here


      setUndoActivity(null);
    }
  }

  public Point locate() {
    RoundRectangleFigure owner = (RoundRectangleFigure)owner();
    Point radius = owner.getArc();
    Rectangle r = owner.getDisplayBox();
    return new Point(r.x+radius.x/2+OFFSET, r.y+radius.y/2+OFFSET);
  }
View Full Code Here

    protected boolean resetRadius() {
      FigureEnumeration fe = getAffectedFigures();
      if (!fe.hasMoreElements()) {
        return false;
      }
      RoundRectangleFigure currentFigure = (RoundRectangleFigure)fe.nextFigure();
      Point figureRadius = currentFigure.getArc();
      currentFigure.setArc(getOldRadius().x, getOldRadius().y);
      setOldRadius(figureRadius);
      return true;
    }
View Full Code Here

TOP

Related Classes of research.figure.RoundRectangleFigure

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.