aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--structure/Graph.java18
1 files changed, 17 insertions, 1 deletions
diff --git a/structure/Graph.java b/structure/Graph.java
index 3092a4f..fde99f8 100644
--- a/structure/Graph.java
+++ b/structure/Graph.java
@@ -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++;
}