1 4 package com.nightlabs.editor2d.figures; 5 6 import java.awt.Graphics2D ; 7 import java.util.Iterator ; 8 9 import org.eclipse.draw2d.Figure; 10 import org.eclipse.draw2d.Graphics; 11 12 19 public class ContainerDrawComponentFigure extends DrawComponentFigure { 20 21 24 public void paint(Graphics2D graphics) { 25 for (Iterator iter = getChildren().iterator(); iter.hasNext();) { 26 Figure figure = (Figure) iter.next(); 27 if (figure instanceof DrawComponentFigure) { 28 ((DrawComponentFigure)figure).paint(graphics); 29 } 30 } 31 } 32 33 36 public void paint(Graphics graphics) { 37 for (Iterator iter = getChildren().iterator(); iter.hasNext();) { 38 Figure figure = (Figure) iter.next(); 39 figure.paint(graphics); 40 } 41 } 42 43 } 44 | Popular Tags |