OSDN Git Service

システムコンフィグの型を変更
authoryukihane <yukihane.feather@gmail.com>
Tue, 30 Aug 2011 04:34:27 +0000 (13:34 +0900)
committeryukihane <yukihane.feather@gmail.com>
Tue, 30 Aug 2011 04:34:27 +0000 (13:34 +0900)
frontend/src/yukihane/inqubus/Config.java
frontend/src/yukihane/inqubus/gui/ConfigDialog.java

index 98072c5..ea651cf 100644 (file)
@@ -446,29 +446,29 @@ public enum Config {
      */
     private static final String SYSTEM_DOWNLOAD_THREAD = "system.download.thread";
 
-    public String getSystemDownloadThread() {
-        return config.getString(SYSTEM_DOWNLOAD_THREAD, "1");
+    public int getSystemDownloadThread() {
+        return config.getInt(SYSTEM_DOWNLOAD_THREAD, 1);
     }
 
-    public void setSystemDownloadThread(String s) {
+    public void setSystemDownloadThread(int s) {
         config.setProperty(SYSTEM_DOWNLOAD_THREAD, s);
     }
     private static final String SYSTEM_DOWNLOAD_WAIT = "system.download.wait";
 
-    public String getSystemDownloadWait() {
-        return config.getString(SYSTEM_DOWNLOAD_WAIT, "30");
+    public int getSystemDownloadWait() {
+        return config.getInt(SYSTEM_DOWNLOAD_WAIT, 30);
     }
 
-    public void setSystemDownloadWait(String s) {
+    public void setSystemDownloadWait(int s) {
         config.setProperty(SYSTEM_DOWNLOAD_WAIT, s);
     }
     private static final String SYSTEM_CONVERT_THREAD = "system.convert.thread";
 
-    public String getSystemConvertThread() {
-        return config.getString(SYSTEM_CONVERT_THREAD, "2");
+    public int getSystemConvertThread() {
+        return config.getInt(SYSTEM_CONVERT_THREAD, 2);
     }
 
-    public void setSystemConvertThread(String s) {
+    public void setSystemConvertThread(int s) {
         config.setProperty(SYSTEM_CONVERT_THREAD, s);
     }
     private static final String SYSTEM_TEMPDIR = "system.tempdir";
index 194be31..44827d0 100644 (file)
@@ -1376,9 +1376,9 @@ public class ConfigDialog extends JDialog {
         /*
          * システム
          */
-        fldSystemThreadDownload.setText(p.getSystemDownloadThread());
-        fldSystemWaitDownload.setText(p.getSystemDownloadWait());
-        fldSystemThreadConvert.setText(p.getSystemConvertThread());
+        fldSystemThreadDownload.setText(Integer.toString(p.getSystemDownloadThread()));
+        fldSystemWaitDownload.setText(Integer.toString(p.getSystemDownloadWait()));
+        fldSystemThreadConvert.setText(Integer.toString(p.getSystemConvertThread()));
         fldSystemTempDir.setText(p.getSystemTempDir());
     }
 
@@ -1485,9 +1485,9 @@ public class ConfigDialog extends JDialog {
         /*
          * システム
          */
-        p.setSystemDownloadThread(fldSystemThreadDownload.getText());
-        p.setSystemDownloadWait(fldSystemWaitDownload.getText());
-        p.setSystemConvertThread(fldSystemThreadConvert.getText());
+        p.setSystemDownloadThread(Integer.parseInt(fldSystemThreadDownload.getText()));
+        p.setSystemDownloadWait(Integer.parseInt(fldSystemWaitDownload.getText()));
+        p.setSystemConvertThread(Integer.parseInt(fldSystemThreadConvert.getText()));
         p.setSystemTempDir(fldSystemTempDir.getText());
 
         try {