[cooja] apps/mrm: Adapted MRM visualizer skin to show adequate

information for multi-selections
This commit is contained in:
Enrico Joerns 2014-04-10 18:33:26 +02:00
parent e69b08f5fd
commit 8e648bcece

View file

@ -81,15 +81,14 @@ public class MRMVisualizerSkin implements VisualizerSkin {
public void paintBeforeMotes(Graphics g) {
Set<Mote> selectedMotes = visualizer.getSelectedMotes();
if (simulation == null || selectedMotes == null || selectedMotes.isEmpty()) {
if (simulation == null || selectedMotes == null) {
return;
}
final Mote selectedMote = visualizer.getSelectedMotes().iterator().next();
for (final Mote selectedMote : selectedMotes) {
if (selectedMote.getInterfaces().getRadio() == null) {
return;
continue;
}
final Position sPos = selectedMote.getInterfaces().getPosition();
/* Paint transmission and interference range for selected mote */
@ -153,6 +152,7 @@ public class MRMVisualizerSkin implements VisualizerSkin {
g.setColor(Color.BLACK);
g.drawString(msg, x - msgWidth/2, y + 2*Visualizer.MOTE_RADIUS + 3);
}
}
public void paintAfterMotes(Graphics g) {
}