Renamed simulation visualizers to simulation visualizers, from simulation visualizer skins
This commit is contained in:
parent
13800cb7ec
commit
3286d62eca
@ -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<Class<? extends VisualizerSkin>> visualizerSkins =
|
||||
new ArrayList<Class<? extends VisualizerSkin>>();
|
||||
@ -212,7 +212,7 @@ public class Visualizer extends VisPlugin {
|
||||
for (String skinClass: skins) {
|
||||
Class<? extends VisualizerSkin> 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<? extends VisualizerSkin> 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 {
|
||||
|
Loading…
Reference in New Issue
Block a user