From 1b556148d8881bef74975a2d223c1dfb54ec843b Mon Sep 17 00:00:00 2001 From: Fredrik Osterlind Date: Wed, 14 Aug 2013 12:33:44 +0200 Subject: [PATCH] added 200% simulation speed alternative --- .../java/se/sics/cooja/plugins/SimControl.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tools/cooja/java/se/sics/cooja/plugins/SimControl.java b/tools/cooja/java/se/sics/cooja/plugins/SimControl.java index 309bda1b4..3a617db60 100644 --- a/tools/cooja/java/se/sics/cooja/plugins/SimControl.java +++ b/tools/cooja/java/se/sics/cooja/plugins/SimControl.java @@ -120,9 +120,13 @@ public class SimControl extends VisPlugin implements HasQuickHelp { speedlimitButtonGroup.add(limitMenuItem2); speedMenu.add(limitMenuItem2); JRadioButtonMenuItem limitMenuItem3 = new JRadioButtonMenuItem( - new ChangeMaxSpeedLimitAction("100%", 1.0)); - speedlimitButtonGroup.add(limitMenuItem3); - speedMenu.add(limitMenuItem3); + new ChangeMaxSpeedLimitAction("100%", 1.0)); + speedlimitButtonGroup.add(limitMenuItem3); + speedMenu.add(limitMenuItem3); + JRadioButtonMenuItem limitMenuItem200 = new JRadioButtonMenuItem( + new ChangeMaxSpeedLimitAction("200%", 2.0)); + speedlimitButtonGroup.add(limitMenuItem200); + speedMenu.add(limitMenuItem200); JRadioButtonMenuItem limitMenuItem4 = new JRadioButtonMenuItem( new ChangeMaxSpeedLimitAction("1000%", 10.0)); speedlimitButtonGroup.add(limitMenuItem4); @@ -135,7 +139,9 @@ public class SimControl extends VisPlugin implements HasQuickHelp { } else if (simulation.getSpeedLimit().doubleValue() == 0.10) { limitMenuItem2.setSelected(true); } else if (simulation.getSpeedLimit().doubleValue() == 1.0) { - limitMenuItem3.setSelected(true); + limitMenuItem3.setSelected(true); + } else if (simulation.getSpeedLimit().doubleValue() == 2.0) { + limitMenuItem200.setSelected(true); } else if (simulation.getSpeedLimit().doubleValue() == 10) { limitMenuItem4.setSelected(true); }