From 3286d62eca5f463dd566e7f98e42f9e7458c46cc Mon Sep 17 00:00:00 2001 From: Adam Dunkels Date: Thu, 31 May 2012 18:14:36 +0200 Subject: [PATCH] Renamed simulation visualizers to simulation visualizers, from simulation visualizer skins --- .../se/sics/cooja/plugins/Visualizer.java | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/tools/cooja/java/se/sics/cooja/plugins/Visualizer.java b/tools/cooja/java/se/sics/cooja/plugins/Visualizer.java index bc5769381..ca69ea6df 100644 --- a/tools/cooja/java/se/sics/cooja/plugins/Visualizer.java +++ b/tools/cooja/java/se/sics/cooja/plugins/Visualizer.java @@ -112,10 +112,10 @@ import se.sics.cooja.plugins.skins.TrafficVisualizerSkin; import se.sics.cooja.plugins.skins.UDGMVisualizerSkin; /** - * Simulation visualizer supporting visualization skins. + * Simulation visualizer supporting different visualizers * Motes are painted in the XY-plane, as seen from positive Z axis. * - * Supports drag-n-drop motes, right-click popup menu, and visualization skins. + * Supports drag-n-drop motes, right-click popup menu, and visualizers * * Observes the simulation and all mote positions. * @@ -157,7 +157,7 @@ public class Visualizer extends VisPlugin { private boolean moveConfirm; private Cursor moveCursor = new Cursor(Cursor.MOVE_CURSOR); - /* Visualizer skins */ + /* Visualizers */ private final JButton skinButton = new JButton("Select visualizer skins"); private static ArrayList> visualizerSkins = new ArrayList>(); @@ -212,7 +212,7 @@ public class Visualizer extends VisPlugin { for (String skinClass: skins) { Class skin = gui.tryLoadClass(this, VisualizerSkin.class, skinClass); if (registerVisualizerSkin(skin)) { - logger.info("Registered external visualizer skin: " + skinClass); + logger.info("Registered external visualizer: " + skinClass); } } } @@ -489,7 +489,7 @@ public class Visualizer extends VisPlugin { private void generateAndActivateSkin(Class skinClass) { for (VisualizerSkin skin: currentSkins) { if (skinClass == skin.getClass()) { - logger.warn("Selected skin already active: " + skinClass); + logger.warn("Selected visualizer already active: " + skinClass); return; } } @@ -505,7 +505,7 @@ public class Visualizer extends VisPlugin { e1.printStackTrace(); } - skinButton.setText("Select visualizer skins " + + skinButton.setText("Select visualizer " + "(" + currentSkins.size() + "/" + visualizerSkins.size() + ")"); repaint(); } @@ -583,7 +583,6 @@ public class Visualizer extends VisPlugin { private void handlePopupRequest(final int x, final int y) { JPopupMenu menu = new JPopupMenu(); - menu.add(new JLabel("Select action:")); /* Mote specific actions */ final Mote[] motes = findMotesAtPosition(x, y); @@ -637,10 +636,10 @@ public class Visualizer extends VisPlugin { /* Visualizer skin actions */ menu.add(new JSeparator()); - JMenu skinMenu = new JMenu("Visualizer skins"); + JMenu skinMenu = new JMenu("Visualizers"); populateSkinMenu(skinMenu); menu.add(skinMenu); - makeSkinsDefaultAction.putValue(Action.NAME, "Make current skins default"); + makeSkinsDefaultAction.putValue(Action.NAME, "Set default visualizers"); JMenuItem skinDefaultItem = new JMenuItem(makeSkinsDefaultAction); menu.add(skinDefaultItem); @@ -695,13 +694,13 @@ public class Visualizer extends VisPlugin { } } if (skinToDeactivate == null) { - logger.fatal("Unknown visualizer skin to deactivate: " + skinClass); + logger.fatal("Unknown visualizer to deactivate: " + skinClass); return; } skinToDeactivate.setInactive(); repaint(); currentSkins.remove(skinToDeactivate); - skinButton.setText("Select visualizer skins " + + skinButton.setText("Select visualizers " + "(" + currentSkins.size() + "/" + visualizerSkins.size() + ")"); } } @@ -1229,7 +1228,7 @@ public class Visualizer extends VisPlugin { } } if (wanted != null) { - logger.warn("Could not load skin: " + element.getText()); + logger.warn("Could not load visualizer: " + element.getText()); } } else if (element.getName().equals("viewport")) { try {