X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosui%2FAltosRomconfigUI.java;h=d2fe54d94d9a7f395c189bbc67993835060770e7;hp=e1dc974e67ac4e520b0a0cf89594bf4ac926a243;hb=8ba523cd793f2263bb1acd7a5a10f8964075bdc5;hpb=51c7741040d95c5deece939dae5e4136cc04afc4 diff --git a/altosui/AltosRomconfigUI.java b/altosui/AltosRomconfigUI.java index e1dc974e..d2fe54d9 100644 --- a/altosui/AltosRomconfigUI.java +++ b/altosui/AltosRomconfigUI.java @@ -20,16 +20,11 @@ package altosui; import java.awt.*; import java.awt.event.*; import javax.swing.*; -import javax.swing.filechooser.FileNameExtensionFilter; -import javax.swing.table.*; -import javax.swing.event.*; -import java.io.*; -import java.util.*; -import java.text.*; -import java.util.prefs.*; +import org.altusmetrum.altoslib_4.*; +import org.altusmetrum.altosuilib_2.*; public class AltosRomconfigUI - extends JDialog + extends AltosUIDialog implements ActionListener { Container pane; @@ -74,7 +69,7 @@ public class AltosRomconfigUI c.weightx = 1; c.anchor = GridBagConstraints.LINE_START; c.insets = ir; - serial_value = new JTextField("0"); + serial_value = new JTextField("00000000"); pane.add(serial_value, c); /* Radio calibration value */ @@ -96,7 +91,7 @@ public class AltosRomconfigUI c.anchor = GridBagConstraints.LINE_START; c.insets = ir; c.ipady = 5; - radio_calibration_value = new JTextField("1186611"); + radio_calibration_value = new JTextField("00000000"); pane.add(radio_calibration_value, c); /* Buttons */ @@ -126,6 +121,11 @@ public class AltosRomconfigUI setLocationRelativeTo(owner); } + public AltosRomconfigUI(JFrame frame, AltosRomconfig config) { + this(frame); + set(config); + } + boolean selected; /* Listen for events from our buttons */ @@ -183,4 +183,9 @@ public class AltosRomconfigUI return romconfig(); return null; } + + public static AltosRomconfig show(JFrame frame, AltosRomconfig config) { + AltosRomconfigUI ui = new AltosRomconfigUI(frame, config); + return ui.showDialog(); + } }