protected boolean resetRadius() { FigureEnumeration fe = getAffectedFigures(); if (!fe.hasNextFigure()) { return false; } RoundRectangleFigure currentFigure = (RoundRectangleFigure) fe.nextFigure(); Point figureRadius = currentFigure.getArc(); currentFigure.setArc(getOldRadius().x, getOldRadius().y); setOldRadius(figureRadius); return true; }
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); }