Ejemplo n.º 1
0
 public void setValueAt(Object aValue, int row, int column) {
   data[row][column] = aValue;
   switch (column) {
     case 0: // code
       jl.setCode((String) aValue);
       break;
     case 4: // type
       jl.setType(JunctionLinkRender.getRoadType((String) aValue));
       break;
     case 5: // length
       try {
         jl.setPathLenght(((Double) aValue).doubleValue());
       } catch (Exception ex) {
       }
       break;
   }
   PSRender.repaint_anywhere();
 }
Ejemplo n.º 2
0
 public void load() {
   data =
       new Object[][] {
         {
           jl.getCode(),
           jl,
           jl.firstJunction == null ? null : jl.firstJunction,
           jl.secondJunction == null ? null : jl.secondJunction,
           JunctionLinkRender.getRoadName(jl.getType()),
           new Double(jl.getPathLength())
         }
       };
   /*data=new Object[jl.length][5];
   for(int i=0;i<jl.length;i++){
   data[i][0]=jl[i].getCode();//String
   data[i][1]=jl[i].firstJunc==null?null:Global.getJunction(jl[i].firstJunc);//Junction
   data[i][2]=jl[i].secondJunc==null?null:Global.getJunction(jl[i].secondJunc);//Junction
   data[i][3]=JunctionLinkRender.getRoadName(jl[i].getType());//String
   data[i][4]=new Double (jl[i].getPathLength());//Double
   }
   super.setDataVector(data,names);*/
 }