From 5c91174fd4f63ea0442484691279699786f65c49 Mon Sep 17 00:00:00 2001 From: fros4943 Date: Thu, 7 Feb 2008 10:47:56 +0000 Subject: [PATCH] renamed variable --- .../se/sics/cooja/plugins/EventListener.java | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/tools/cooja/java/se/sics/cooja/plugins/EventListener.java b/tools/cooja/java/se/sics/cooja/plugins/EventListener.java index b4922fc3a..66057aa5b 100644 --- a/tools/cooja/java/se/sics/cooja/plugins/EventListener.java +++ b/tools/cooja/java/se/sics/cooja/plugins/EventListener.java @@ -24,7 +24,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: EventListener.java,v 1.6 2008/01/08 12:19:25 fros4943 Exp $ + * $Id: EventListener.java,v 1.7 2008/02/07 10:47:56 fros4943 Exp $ */ package se.sics.cooja.plugins; @@ -147,43 +147,43 @@ public class EventListener extends VisPlugin { mySimulation = simulationToControl; myPlugin = this; - // Create selectable interfaces list (only supports Contiki mote types) - Vector> allMoteTypes = new Vector>(); - Vector> allMoteTypesDups = new Vector>(); + /* Create selectable interfaces list (only supports Contiki mote types) */ + Vector> allInterfaces = new Vector>(); + Vector> allInterfacesDups = new Vector>(); // Add standard interfaces - allMoteTypesDups.add(Button.class); - allMoteTypesDups.add(LED.class); - allMoteTypesDups.add(Log.class); - allMoteTypesDups.add(PIR.class); - allMoteTypesDups.add(Position.class); - allMoteTypesDups.add(Radio.class); + allInterfacesDups.add(Button.class); + allInterfacesDups.add(LED.class); + allInterfacesDups.add(Log.class); + allInterfacesDups.add(PIR.class); + allInterfacesDups.add(Position.class); + allInterfacesDups.add(Radio.class); for (MoteType moteType : simulationToControl.getMoteTypes()) { if (moteType instanceof ContikiMoteType) { - allMoteTypesDups.addAll(((ContikiMoteType) moteType) + allInterfacesDups.addAll(((ContikiMoteType) moteType) .getMoteInterfaces()); } } - for (Class moteTypeClass : allMoteTypesDups) { - if (!allMoteTypes.contains(moteTypeClass)) { - allMoteTypes.add(moteTypeClass); + for (Class moteTypeClass : allInterfacesDups) { + if (!allInterfaces.contains(moteTypeClass)) { + allInterfaces.add(moteTypeClass); } } interfacePanel = new JPanel(); interfacePanel.setLayout(new BoxLayout(interfacePanel, BoxLayout.Y_AXIS)); interfacePanel.setBorder(BorderFactory.createEmptyBorder(10, 5, 10, 5)); - for (Class moteTypeClass : allMoteTypes) { - JCheckBox checkBox = new JCheckBox(GUI.getDescriptionOf(moteTypeClass), + for (Class interfaceClass : allInterfaces) { + JCheckBox checkBox = new JCheckBox(GUI.getDescriptionOf(interfaceClass), false); - checkBox.setToolTipText(moteTypeClass.getName()); - checkBox.putClientProperty("interface_class", moteTypeClass); + checkBox.setToolTipText(interfaceClass.getName()); + checkBox.putClientProperty("interface_class", interfaceClass); checkBox.addActionListener(interfaceCheckBoxListener); interfacePanel.add(checkBox); } - if (allMoteTypes.isEmpty()) { + if (allInterfaces.isEmpty()) { interfacePanel.add(new JLabel("No used interface classes detected")); }