1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-29 10:24:12 +01:00

Saving and restoring serial monitor line ending.

This commit is contained in:
David A. Mellis 2010-11-07 22:38:58 -05:00
parent 1cac73c254
commit 5e028ea09d

View File

@ -107,6 +107,14 @@ public class SerialMonitor extends JFrame implements MessageConsumer {
autoscrollBox = new JCheckBox("Autoscroll", true);
lineEndings = new JComboBox(new String[] { "No line ending", "Newline", "Carriage return", "Both NL & CR" });
lineEndings.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
Preferences.setInteger("serial.line_ending", lineEndings.getSelectedIndex());
}
});
if (Preferences.get("serial.line_ending") != null) {
lineEndings.setSelectedIndex(Preferences.getInteger("serial.line_ending"));
}
lineEndings.setMaximumSize(lineEndings.getMinimumSize());
String[] serialRateStrings = {