2c2 < * @(#)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 14c20,22 < --- > /** > * @version <$CURRENT_VERSION$> > */ 23c31,32 < if (!(figure instanceof AnimationDecorator)) --- > if (!(figure instanceof AnimationDecorator) && > !(figure instanceof ConnectionFigure)) { 24a34 > } 29,32c39 < Figure f = super.remove(figure); < if (f instanceof AnimationDecorator) < return ((AnimationDecorator) f).peelDecoration(); < return f; --- > return super.remove(figure); 35,36c42,49 < public synchronized void replace(Figure figure, Figure replacement) { < if (!(replacement instanceof AnimationDecorator)) --- > /** > * @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) { > if (!(replacement instanceof AnimationDecorator) && > !(replacement instanceof ConnectionFigure)) { 38c51,52 < super.replace(figure, replacement); --- > } > return super.replace(figure, replacement); 43,44c57,63 < while (k.hasMoreElements()) < ((AnimationDecorator) k.nextElement()).animationStep(); --- > while (k.hasMoreElements()) { > Figure f = (Figure) k.nextElement(); > > if(!(f instanceof ConnectionFigure)) { > ((AnimationDecorator) f).animationStep(); > } > }