make clean method public

This commit is contained in:
Fredrik Osterlind 2012-01-26 16:03:01 +01:00
parent 2a86f7a5ad
commit 08ba0b83dc
1 changed files with 15 additions and 13 deletions

View File

@ -620,26 +620,28 @@ public class TimeLine extends VisPlugin {
};
private Action clearAction = new AbstractAction("Clear logs") {
private static final long serialVersionUID = -4592530582786872403L;
private void clearLogs() {
for (MoteEvents me : allMoteEvents) {
me.clear();
}
repaint();
}
private static final long serialVersionUID = -4592530582786872403L;
public void actionPerformed(ActionEvent e) {
if (simulation.isRunning()) {
simulation.invokeSimulationThread(new Runnable() {
public void run() {
clearLogs();
}
});
simulation.invokeSimulationThread(new Runnable() {
public void run() {
clear();
}
});
} else {
clearLogs();
clear();
}
}
};
public void clear() {
for (MoteEvents me : allMoteEvents) {
me.clear();
}
repaint();
}
private class MoteStatistics {
Mote mote;
long onTimeRedLED = 0, onTimeGreenLED = 0, onTimeBlueLED = 0;