mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-01 12:24:14 +01:00
Saving and restoring serial monitor line ending.
This commit is contained in:
parent
1cac73c254
commit
5e028ea09d
@ -107,6 +107,14 @@ public class SerialMonitor extends JFrame implements MessageConsumer {
|
|||||||
autoscrollBox = new JCheckBox("Autoscroll", true);
|
autoscrollBox = new JCheckBox("Autoscroll", true);
|
||||||
|
|
||||||
lineEndings = new JComboBox(new String[] { "No line ending", "Newline", "Carriage return", "Both NL & CR" });
|
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());
|
lineEndings.setMaximumSize(lineEndings.getMinimumSize());
|
||||||
|
|
||||||
String[] serialRateStrings = {
|
String[] serialRateStrings = {
|
||||||
|
Loading…
Reference in New Issue
Block a user