super(parent, objectToObserve);
myMote = mote;
}
public void update(Observable obs, Object obj) {
final MoteInterface moteInterface = (MoteInterface) obs;
int moteID = myMote.getID();
myParent.actOnChange("'" + Cooja.getDescriptionOf(moteInterface.getClass())
+ "'" + " of mote '" + (moteID > 0 ? Integer.toString(moteID) : "?")
+ "'" + " changed at time "
+ myParent.mySimulation.getSimulationTime(), new AbstractAction(
"View interface visualizer") {
public void actionPerformed(ActionEvent e) {
MoteInterfaceViewer plugin =
(MoteInterfaceViewer) mySimulation.getCooja().tryStartPlugin(
MoteInterfaceViewer.class, mySimulation.getCooja(), mySimulation, myMote);
plugin.setSelectedInterface(Cooja.getDescriptionOf(moteInterface.getClass()));
}
});
}