|
@@ -90,7 +90,9 @@ public class MyCanvas extends JPanel implements MouseListener, MouseMotionListen
|
|
|
int animDuration = 500; // animation Duration
|
|
|
int animDelay = animDuration/animFPS; // animation Delay
|
|
|
int animSteps = animDuration / animDelay; // animation Steps;
|
|
|
-
|
|
|
+ long start = 0;
|
|
|
+ long elapsedTime = 0;
|
|
|
+
|
|
|
// contains the value of the Capacity for new created Edges
|
|
|
|
|
|
/**
|
|
@@ -168,7 +170,6 @@ public class MyCanvas extends JPanel implements MouseListener, MouseMotionListen
|
|
|
repaint();
|
|
|
animDuration -= animDelay;
|
|
|
animSteps--;
|
|
|
- controller.addTextToConsole("" + animDuration);
|
|
|
} else {
|
|
|
animDuration = 500;
|
|
|
animSteps = animDuration / animDelay;
|
|
@@ -180,9 +181,12 @@ public class MyCanvas extends JPanel implements MouseListener, MouseMotionListen
|
|
|
controller.addUpperNode("NodeOfNode", null);
|
|
|
controller.calculateStateForCurrentTimeStep();
|
|
|
repaint();
|
|
|
+ elapsedTime = System.currentTimeMillis() - start;
|
|
|
+ controller.addTextToConsole(elapsedTime+"");
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
+ start = System.currentTimeMillis();
|
|
|
animT.start();
|
|
|
}
|
|
|
});
|
|
@@ -641,7 +645,7 @@ public class MyCanvas extends JPanel implements MouseListener, MouseMotionListen
|
|
|
tempSelected.clear();
|
|
|
}
|
|
|
|
|
|
- if (doubleClick() && tempCps != null && tempCps instanceof HolonSwitch) {
|
|
|
+ if (doubleClick() && tempCps != null && tempCps instanceof HolonSwitch && MouseEvent.BUTTON3 != e.getButton()) {
|
|
|
((HolonSwitch) tempCps).switchState();
|
|
|
}
|
|
|
|