1 27 28 package org.nightlabs.editor2d.figures; 29 30 import java.awt.Graphics2D ; 31 import java.util.Iterator ; 32 33 import org.eclipse.draw2d.Figure; 34 import org.eclipse.draw2d.Graphics; 35 36 43 public class ContainerDrawComponentFigure extends DrawComponentFigure { 44 45 48 public void paint(Graphics2D graphics) { 49 for (Iterator iter = getChildren().iterator(); iter.hasNext();) { 50 Figure figure = (Figure) iter.next(); 51 if (figure instanceof DrawComponentFigure) { 52 ((DrawComponentFigure)figure).paint(graphics); 53 } 54 } 55 } 56 57 60 public void paint(Graphics graphics) { 61 for (Iterator iter = getChildren().iterator(); iter.hasNext();) { 62 Figure figure = (Figure) iter.next(); 63 figure.paint(graphics); 64 } 65 } 66 67 } 68 | Popular Tags |