chiark / gitweb /
debug output option
[jarrg-ian.git] / src / com / tedpearson / ypp / market / ControlPanel.java
index 57ed140fe967bdc4ea48819c43c092e376c1b06d..bbd75f6c71bcd33b19605e363dcb232600a57380 100644 (file)
@@ -15,10 +15,11 @@ public class ControlPanel extends JFrame {
        }
        
        public ControlPanel() {
        }
        
        public ControlPanel() {
-               super("PCTB Control Panel");
+               super("Jarrg Control Panel");
                final Preferences prefs = Preferences.userNodeForPackage(getClass());
                final JCheckBox toPCTB = new JCheckBox("Upload to PCTB?", prefs.getBoolean("uploadToPCTB", true));
                final JCheckBox toYarrg = new JCheckBox("Upload to Yarrg?", prefs.getBoolean("uploadToYarrg", true));
                final Preferences prefs = Preferences.userNodeForPackage(getClass());
                final JCheckBox toPCTB = new JCheckBox("Upload to PCTB?", prefs.getBoolean("uploadToPCTB", true));
                final JCheckBox toYarrg = new JCheckBox("Upload to Yarrg?", prefs.getBoolean("uploadToYarrg", true));
+               final JCheckBox showArbitrage = new JCheckBox("Show arbitrage?", prefs.getBoolean("showArbitrage", false));
 
                final JRadioButton live = new JRadioButton("Use live servers");
                final JRadioButton testing = new JRadioButton("Use testing servers");
 
                final JRadioButton live = new JRadioButton("Use live servers");
                final JRadioButton testing = new JRadioButton("Use testing servers");
@@ -34,12 +35,16 @@ public class ControlPanel extends JFrame {
                    com.tedpearson.ypp.market.Version.version;
                JLabel version = new JLabel(version_label);
 
                    com.tedpearson.ypp.market.Version.version;
                JLabel version = new JLabel(version_label);
 
-               setLayout(new GridLayout(6,1));
-               //add(toPCTB);
+               final JCheckBox enableDebug = new JCheckBox("Write debug files?", prefs.getBoolean("writeDebugFiles", false));
+
+               setLayout(new GridLayout(8,1));
+               add(toPCTB);
                add(toYarrg);
                add(toYarrg);
+               add(showArbitrage);
                add(live);
                add(testing);
                add(version);
                add(live);
                add(testing);
                add(version);
+               add(enableDebug);
 
                final int exitstatus = Integer.parseInt(System.getProperty("com.tedpearson.ypp.market.controlpanel.exitstatus", "0"));
 
 
                final int exitstatus = Integer.parseInt(System.getProperty("com.tedpearson.ypp.market.controlpanel.exitstatus", "0"));
 
@@ -49,7 +54,9 @@ public class ControlPanel extends JFrame {
                        public void actionPerformed(ActionEvent e) {
                                prefs.putBoolean("uploadToPCTB", toPCTB.isSelected());
                                prefs.putBoolean("uploadToYarrg", toYarrg.isSelected());
                        public void actionPerformed(ActionEvent e) {
                                prefs.putBoolean("uploadToPCTB", toPCTB.isSelected());
                                prefs.putBoolean("uploadToYarrg", toYarrg.isSelected());
+                               prefs.putBoolean("showArbitrage", showArbitrage.isSelected());
                                prefs.putBoolean("useLiveServers", live.isSelected());
                                prefs.putBoolean("useLiveServers", live.isSelected());
+                               prefs.putBoolean("writeDebugFiles", enableDebug.isSelected());
                                System.exit(exitstatus);
                        }
                });
                                System.exit(exitstatus);
                        }
                });