super(parent, objectToObserve);
myMote = mote;
}
public void update(Observable obs, Object obj) {
final MoteInterface moteInterface = (MoteInterface) obs;
int moteID = myMote.getID();
myParent.actOnChange("'" + GUI.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.getGUI().tryStartPlugin(
MoteInterfaceViewer.class, mySimulation.getGUI(), mySimulation, myMote);
plugin.setSelectedInterface(GUI.getDescriptionOf(moteInterface.getClass()));
}
});
}