make clean method public
This commit is contained in:
parent
2a86f7a5ad
commit
08ba0b83dc
1 changed files with 15 additions and 13 deletions
|
@ -620,26 +620,28 @@ public class TimeLine extends VisPlugin {
|
||||||
};
|
};
|
||||||
|
|
||||||
private Action clearAction = new AbstractAction("Clear logs") {
|
private Action clearAction = new AbstractAction("Clear logs") {
|
||||||
private static final long serialVersionUID = -4592530582786872403L;
|
private static final long serialVersionUID = -4592530582786872403L;
|
||||||
private void clearLogs() {
|
|
||||||
for (MoteEvents me : allMoteEvents) {
|
|
||||||
me.clear();
|
|
||||||
}
|
|
||||||
repaint();
|
|
||||||
}
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
if (simulation.isRunning()) {
|
if (simulation.isRunning()) {
|
||||||
simulation.invokeSimulationThread(new Runnable() {
|
simulation.invokeSimulationThread(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
clearLogs();
|
clear();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
clearLogs();
|
clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public void clear() {
|
||||||
|
for (MoteEvents me : allMoteEvents) {
|
||||||
|
me.clear();
|
||||||
|
}
|
||||||
|
repaint();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private class MoteStatistics {
|
private class MoteStatistics {
|
||||||
Mote mote;
|
Mote mote;
|
||||||
long onTimeRedLED = 0, onTimeGreenLED = 0, onTimeBlueLED = 0;
|
long onTimeRedLED = 0, onTimeGreenLED = 0, onTimeBlueLED = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue