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