OSDN Git Service

loggingライブラリをslf4jに変更
[coroid/inqubus.git] / frontend / src / yukihane / inqubus / gui / ConfigDialog.java
index 91a1445..fb734cf 100644 (file)
@@ -12,8 +12,8 @@ import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.io.File;
 import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import javax.swing.BorderFactory;
 import javax.swing.ComboBoxModel;
 import javax.swing.DefaultComboBoxModel;
@@ -33,8 +33,6 @@ import javax.swing.JTabbedPane;
 import javax.swing.JTextField;
 import javax.swing.LayoutStyle.ComponentPlacement;
 import javax.swing.SpinnerNumberModel;
-import javax.swing.UIManager;
-import javax.swing.UnsupportedLookAndFeelException;
 import javax.swing.WindowConstants;
 import org.apache.commons.configuration.ConfigurationException;
 import yukihane.inqubus.config.Config;
@@ -45,7 +43,7 @@ import yukihane.inqubus.config.Config;
  */
 public class ConfigDialog extends JDialog {
     private static final long serialVersionUID = 1L;
-    private static final Logger logger = Logger.getLogger(ConfigDialog.class.getName());
+    private static final Logger logger = LoggerFactory.getLogger(ConfigDialog.class);
     private static final String NEED_REBOOT = "設定を有効にするにはいんきゅばすの再起動が必要です";
 
     /** Creates new form Properties */
@@ -750,36 +748,6 @@ public class ConfigDialog extends JDialog {
         loadConfig();
     }
 
-    /**
-     * @param args the command line arguments
-     */
-    public static void main(String args[]) {
-        /* Set the Nimbus look and feel */
-        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
-         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
-         */
-        try {
-            for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
-                if ("Nimbus".equals(info.getName())) {
-                    UIManager.setLookAndFeel(info.getClassName());
-                    break;
-                }
-            }
-        } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {
-            java.util.logging.Logger.getLogger(ConfigDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
-        }
-
-        /* Create and display the form */
-        java.awt.EventQueue.invokeLater(new Runnable() {
-
-            @Override
-            public void run() {
-                new ConfigDialog().setVisible(true);
-            }
-        });
-    }
-    // Variables declaration - do not modify//GEN-BEGIN:variables
-
     // ネットワーク
     // ネットワーク - アカウント
     private final JTextField fldMail;
@@ -1067,7 +1035,7 @@ public class ConfigDialog extends JDialog {
         try {
             p.save();
         } catch (ConfigurationException ex) {
-            logger.log(Level.SEVERE, "コンフィグファイル保存に失敗", ex);
+            logger.error("コンフィグファイル保存に失敗", ex);
         }
     }
 }