Add source and dest

This commit is contained in:
manzerbredes 2016-03-21 18:07:12 +01:00
parent 0e1704bbcb
commit e836f48216

View file

@ -26,9 +26,25 @@ public class MyGraph extends SingleGraph{
// Assign grid
this.grid=grid;
int i=0;
int ll=this.grid.getGrid().size();
// Build node
for(Router r : this.grid.getGrid()){
this.addNode(r.name);
if(i==0){
this.addNode(r.name).setAttribute("ui.label", "Source");
}
else{
if(i==ll-1){
this.addNode(r.name).setAttribute("ui.label", "Destination");
}
else{
this.addNode(r.name);
}
}
i++;
}