togglePause
This commit is contained in:
parent
d0fc3379dc
commit
653773dc22
|
|
@ -137,8 +137,12 @@ public class Simulator extends Thread {
|
||||||
*/
|
*/
|
||||||
public void togglePause() {
|
public void togglePause() {
|
||||||
// TODO : actually toggle the corresponding flag
|
// TODO : actually toggle the corresponding flag
|
||||||
|
pauseFlag=!pauseFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* method called when clicking on a cell in the interface
|
* method called when clicking on a cell in the interface
|
||||||
*/
|
*/
|
||||||
|
|
@ -263,6 +267,17 @@ public class Simulator extends Thread {
|
||||||
|
|
||||||
public void setLoopDelay(int delay) {
|
public void setLoopDelay(int delay) {
|
||||||
//TODO : complete method
|
//TODO : complete method
|
||||||
|
// this.loopDelay = delay;
|
||||||
|
// if (pauseFlag) {
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// try {
|
||||||
|
// Thread.sleep(loopDelay);
|
||||||
|
// } catch (InterruptedException e) {
|
||||||
|
// Thread.currentThread().interrupt(); // Restore interrupted status.
|
||||||
|
// System.err.println("Simulation step was interrupted.");
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
public void toggleClickAction() {
|
public void toggleClickAction() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue