Closed
Description
Many times, your Arduino is spitting out a ton of data and you want to manually clear the monitor. The only way currently (AFAIK) is to restart the app. I'd like to see a "Clear" button on the GUI that when pressed clears the monitor.
I looked at the code and this could be easily added to SerialMonitor and AbstractTextMonitor with some code similar to below:
protected JButton clearButton;
protected void onCreateWindow(Container mainPane) {
// after adding send button
clearButton = new JButton(tr("Clear"));
upperPane.add(clearButton);
}
public void onClearCommand(ActionListener listener) {
clearButton.addActionListener(listener);
}
protected void onEnableWindow(boolean enable) {
// other code
clearButton.setEnabled(enable);
}
// and in Serial Monitor.java
onClearCommand(new ActionListener() {
public void actionPerformed(ActionEvent e) {
textArea.setText("");
}
});