X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FAltosConfigFCUI.java;h=562c695207613638bb3a61253d04bd3290964a1e;hb=bdf0671cb36daca741c4842a37a3fc71744a63a2;hp=5143b83754754a05edd235c1d4d6313f2f5bc97b;hpb=6b5e5899d174466552a34a4d8574f0439776240d;p=fw%2Faltos diff --git a/altosui/AltosConfigFCUI.java b/altosui/AltosConfigFCUI.java index 5143b837..562c6952 100644 --- a/altosui/AltosConfigFCUI.java +++ b/altosui/AltosConfigFCUI.java @@ -97,6 +97,8 @@ public class AltosConfigFCUI ActionListener listener; + static final String title = "Configure Flight Computer"; + static String[] main_deploy_values_m = { "100", "150", "200", "250", "300", "350", "400", "450", "500" @@ -138,6 +140,9 @@ public class AltosConfigFCUI }; static String[] beep_values = { + "2000", + "2100", + "2200", "3750", "4000", "4250", @@ -346,7 +351,7 @@ public class AltosConfigFCUI /* Build the UI using a grid bag */ public AltosConfigFCUI(JFrame in_owner, boolean remote) { - super (in_owner, "Configure Flight Computer", false); + super (in_owner, title, false); owner = in_owner; GridBagConstraints c; @@ -355,7 +360,8 @@ public class AltosConfigFCUI Insets il = new Insets(4,4,4,4); Insets ir = new Insets(4,4,4,4); - pane = getContentPane(); + pane = getScrollablePane(); + pane.setLayout(new GridBagLayout()); /* Product */ @@ -1044,11 +1050,13 @@ public class AltosConfigFCUI public void set_dirty() { dirty = true; + setTitle(title + " (modified)"); save.setEnabled(true); } public void set_clean() { dirty = false; + setTitle(title); save.setEnabled(false); } @@ -1076,13 +1084,13 @@ public class AltosConfigFCUI if (cmd.equals("Close") || cmd.equals("Reboot")) if (!check_dirty(cmd)) return; + if (cmd.equals("Save")) + save.setEnabled(false); listener.actionPerformed(e); if (cmd.equals("Close") || cmd.equals("Reboot")) { setVisible(false); dispose(); } - if (cmd.equals("Save") || cmd.equals("Reset")) - set_clean(); } /* ItemListener interface method */