2,2c2,2 < * @(#)BouncingDrawing.java 5.2 --- > * @(#)BouncingDrawing.java 3a4,9 > * Project: JHotdraw - a GUI framework for technical drawings > * http://www.jhotdraw.org > * http://jhotdraw.sourceforge.net > * Copyright: © by the original author(s) and all contributors > * License: Lesser GNU Public License (LGPL) > * http://www.opensource.org/licenses/lgpl-license.html 13a34,34 > } 13a20,22 > /** > * @version <$CURRENT_VERSION$> > */ 14,14d33 < 23a32,32 > !(figure instanceof ConnectionFigure)) { 23,23c31,31 < if (!(figure instanceof AnimationDecorator)) --- > if (!(figure instanceof AnimationDecorator) && 29,29c39,39 < Figure f = super.remove(figure); --- > return super.remove(figure); 30,32d39 < if (f instanceof AnimationDecorator) < return ((AnimationDecorator) f).peelDecoration(); < return f; 34a42,47 > /** > * @param figure figure to be replaced > * @param replacement figure that should replace the specified figure > * @return the figure that has been inserted (might be different from the figure specified) > */ > public synchronized Figure replace(Figure figure, Figure replacement) { 35,35d41 < public synchronized void replace(Figure figure, Figure replacement) { 36a49,49 > !(replacement instanceof ConnectionFigure)) { 36,36c48,48 < if (!(replacement instanceof AnimationDecorator)) --- > if (!(replacement instanceof AnimationDecorator) && 37a51,51 > } 38,38c52,52 < super.replace(figure, replacement); --- > return super.replace(figure, replacement); 43a58,60 > Figure f = (Figure) k.nextElement(); > > if(!(f instanceof ConnectionFigure)) { 43,43c57,57 < while (k.hasMoreElements()) --- > while (k.hasMoreElements()) { 44a62,63 > } > } 44,44c61,61 < ((AnimationDecorator) k.nextElement()).animationStep(); --- > ((AnimationDecorator) f).animationStep();