Пример #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);
 }