Esempio n. 1
0
 public void setTablaPrincipal(java.util.List val) {
   DefaultTableModel modelo = ((DefaultTableModel) this.tablaPrincipal.getModel());
   for (int i = 0; i < val.size(); i++) {
     modelo.addRow(((java.util.ArrayList) val.get(i)).toArray());
   }
   this.calculaSumas();
 }
Esempio n. 2
0
 void drawScribbles(Graphics g) {
   if ((scribbles == null) || (scribbles.size() == 0)) {
     return;
   }
   DrawObject L = (DrawObject) scribbles.get(0);
   int scribbleCounter = L.scribbleNum;
   g.setColor(scribbleColor);
   ((Graphics2D) g).setStroke(new BasicStroke(2f));
   int prevX = L.scribbleX;
   int prevY = L.scribbleY;
   for (int i = 1; i < scribbles.size(); i++) {
     L = (DrawObject) scribbles.get(i);
     if (L.scribbleNum == scribbleCounter) {
       // Keep drawing.
       g.drawLine(prevX, prevY, L.scribbleX, L.scribbleY);
       prevX = L.scribbleX;
       prevY = L.scribbleY;
     } else {
       scribbleCounter = L.scribbleNum;
       prevX = L.scribbleX;
       prevY = L.scribbleY;
     }
   }
 }