Changeset 9
- Timestamp:
- 03/08/07 19:53:51 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
SIGBIO/edu/uiuc/acm/sigbio/visualizer/MapPanelVisualizer.java
r8 r9 15 15 16 16 import edu.uiuc.acm.sigbio.CellularAutomata.Coordinate; 17 import edu.uiuc.acm.sigbio.CellularAutomata.Element; 17 18 18 19 public class MapPanelVisualizer extends Panel { … … 22 23 private static List<Shape> previousShapes; // @jve:decl-index=0: 23 24 private Hashtable<Shape,Color> colorTable; 24 private static Color backColor; 25 private static Color backColor; // @jve:decl-index=0: 26 27 public final static int NOFILL = 0; 28 public final static int FILL = 1; 29 public final static int NOROUND = 0; 30 public final static int ROUND = 1; 31 private static List<Element> elementList; // @jve:decl-index=0: 25 32 26 33 /** … … 42 49 public void paint(Graphics g){ 43 50 Graphics2D g2 = (Graphics2D)g; 44 51 g2.setColor(backColor); 52 //flesh 53 g2.fill3DRect(0, 0, this.getWidth(), this.getHeight(), true); 54 /* 55 for (element : elements) { 56 element.paint(g2); 57 } 45 58 if(previousShapes !=null){ 46 59 g2.setColor(backColor); … … 55 68 } 56 69 } 70 */ 71 if(elementList!=null){ 72 for(Element e:elementList){ 73 /* 74 if(((int)e.getFillOption())==FILL){ 75 g2.getColor(e.getFillColor()); 76 g2.fill(e.getShape()); 77 } 78 if(((int)e.getRoundOption())==ROUND){ 79 g2.getColor(e.getRoundColor()); 80 g2.draw(e.getShape()); 81 } 82 */ 83 e.paint(g2); 84 } 85 } 57 86 } 58 87 … … 62 91 shapeList = newShapes; 63 92 colorTable = colors; 93 } 94 95 public void drawMap(List<Element> lst){ 96 elementList = lst; 64 97 } 65 98
