示例#1
0
 public void paint(Graphics g) {
   g.setColor(getForeground());
   g.setPaintMode();
   for (Enumeration e = lines.elements(); e.hasMoreElements(); ) {
     CanvasLine l = (CanvasLine) e.nextElement();
     l.draw(g);
   }
 }
示例#2
0
 public void createLine(Vector coords, CanvasProp prop) {
   CanvasLine l = new CanvasLine(this);
   l.coords = coords;
   l.prop = prop;
   lines.addElement(l);
 }