コード例 #1
0
 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;
 }
コード例 #2
0
 public Point locate() {
   RoundRectangleFigure owner = (RoundRectangleFigure) owner();
   Point radius = owner.getArc();
   Rectangle r = owner.displayBox();
   return new Point(r.x + radius.x / 2 + OFFSET, r.y + radius.y / 2 + OFFSET);
 }