diff --git a/src/org/dclermonte/siba/Siba.java b/src/org/dclermonte/siba/Siba.java index 72bfc77..5d68980 100644 --- a/src/org/dclermonte/siba/Siba.java +++ b/src/org/dclermonte/siba/Siba.java @@ -36,7 +36,7 @@ import org.slf4j.LoggerFactory; */ public class Siba { - public static final Logger logger = LoggerFactory.getLogger(Siba.class); + private static final Logger logger = LoggerFactory.getLogger(Siba.class); public static void main(final String[] args) { diff --git a/src/org/dclermonte/siba/cli/SibaCLI.java b/src/org/dclermonte/siba/cli/SibaCLI.java index 149f97d..6bcbed0 100644 --- a/src/org/dclermonte/siba/cli/SibaCLI.java +++ b/src/org/dclermonte/siba/cli/SibaCLI.java @@ -35,7 +35,7 @@ import org.slf4j.LoggerFactory; */ public class SibaCLI { - public static final Logger logger = LoggerFactory.getLogger(SibaCLI.class); + private static final Logger logger = LoggerFactory.getLogger(SibaCLI.class); private static final ResourceBundle BUNDLE = ResourceBundle.getBundle("org.dclermonte.siba.cli.messages"); //$NON-NLS-1$ public static void backup(final File directoryToSave) throws SibaException diff --git a/src/org/dclermonte/siba/gui/AboutDialog.java b/src/org/dclermonte/siba/gui/AboutDialog.java index c34684b..4649f64 100644 --- a/src/org/dclermonte/siba/gui/AboutDialog.java +++ b/src/org/dclermonte/siba/gui/AboutDialog.java @@ -50,7 +50,7 @@ import org.slf4j.LoggerFactory; public class AboutDialog extends JDialog { private static final long serialVersionUID = 8868109575782482455L; - public static final Logger logger = LoggerFactory.getLogger(AboutDialog.class); + private static final Logger logger = LoggerFactory.getLogger(AboutDialog.class); /** * This is the constructor for the dialog. diff --git a/src/org/dclermonte/siba/gui/BackupPanel.java b/src/org/dclermonte/siba/gui/BackupPanel.java index afd4cc3..6aa8791 100644 --- a/src/org/dclermonte/siba/gui/BackupPanel.java +++ b/src/org/dclermonte/siba/gui/BackupPanel.java @@ -70,8 +70,8 @@ public class BackupPanel extends JPanel JPanel helpPanel = new JPanel(); add(helpPanel, BorderLayout.NORTH); - JLabel HelpLabel = new JLabel(BUNDLE.getString("BackupPanel.lblNewLabel_2.text")); //$NON-NLS-1$ - helpPanel.add(HelpLabel); + JLabel lblHelp = new JLabel(BUNDLE.getString("BackupPanel.lblNewLabel_2.text")); //$NON-NLS-1$ + helpPanel.add(lblHelp); JPanel choosePanel = new JPanel(); add(choosePanel); @@ -92,9 +92,9 @@ public class BackupPanel extends JPanel choosePanel.add(this.sourceDirectoryField, "4, 2"); this.sourceDirectoryField.setColumns(10); - JButton btnNewButton = new JButton(BUNDLE.getString("BackupPanel.btnNewButton.text")); //$NON-NLS-1$ - btnNewButton.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); - btnNewButton.addActionListener(new ActionListener() + JButton btnSourceDirectory = new JButton(BUNDLE.getString("BackupPanel.btnNewButton.text")); //$NON-NLS-1$ + btnSourceDirectory.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); + btnSourceDirectory.addActionListener(new ActionListener() { @Override public void actionPerformed(final ActionEvent e) @@ -108,7 +108,7 @@ public class BackupPanel extends JPanel } }); - choosePanel.add(btnNewButton, "6, 2"); + choosePanel.add(btnSourceDirectory, "6, 2"); JLabel lblTargetDirectory = new JLabel(BUNDLE.getString("BackupPanel.lblTargetDirectory.text")); //$NON-NLS-1$ choosePanel.add(lblTargetDirectory, "2, 4"); @@ -119,9 +119,9 @@ public class BackupPanel extends JPanel choosePanel.add(this.targetDirectoryField, "4, 4"); this.targetDirectoryField.setColumns(10); - JButton ButtonTarget = new JButton(BUNDLE.getString("BackupPanel.btnNewButton_1.text")); //$NON-NLS-1$ - ButtonTarget.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); - ButtonTarget.addActionListener(new ActionListener() + JButton btnTarget = new JButton(BUNDLE.getString("BackupPanel.btnNewButton_1.text")); //$NON-NLS-1$ + btnTarget.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); + btnTarget.addActionListener(new ActionListener() { @Override public void actionPerformed(final ActionEvent e) @@ -135,9 +135,9 @@ public class BackupPanel extends JPanel } }); - choosePanel.add(ButtonTarget, "6, 4"); + choosePanel.add(btnTarget, "6, 4"); - ButtonTarget.setHorizontalAlignment(SwingConstants.RIGHT); + btnTarget.setHorizontalAlignment(SwingConstants.RIGHT); JPanel actionPanel = new JPanel(); @@ -154,16 +154,16 @@ public class BackupPanel extends JPanel Component horizontalGlue = Box.createHorizontalGlue(); buttonActionPanel.add(horizontalGlue); - JButton ButtonBackup = new JButton(BUNDLE.getString("BackupPanel.btnNewButton_2.text")); //$NON-NLS-1$ - ButtonBackup.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); - buttonActionPanel.add(ButtonBackup); + JButton btnBackup = new JButton(BUNDLE.getString("BackupPanel.btnNewButton_2.text")); //$NON-NLS-1$ + btnBackup.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); + buttonActionPanel.add(btnBackup); Component horizontalGlue1 = Box.createHorizontalGlue(); buttonActionPanel.add(horizontalGlue1); Component verticalStrut = Box.createVerticalStrut(20); actionPanel.add(verticalStrut); - ButtonBackup.addActionListener(new ActionListener() + btnBackup.addActionListener(new ActionListener() { @Override public void actionPerformed(final ActionEvent e) diff --git a/src/org/dclermonte/siba/gui/CheckDirectorySelector.java b/src/org/dclermonte/siba/gui/CheckDirectorySelector.java index 8a4245f..f327e0f 100644 --- a/src/org/dclermonte/siba/gui/CheckDirectorySelector.java +++ b/src/org/dclermonte/siba/gui/CheckDirectorySelector.java @@ -21,7 +21,7 @@ public class CheckDirectorySelector extends JFileChooser { private static final long serialVersionUID = 3782597353602048214L; private static final ResourceBundle BUNDLE = ResourceBundle.getBundle("org.dclermonte.siba.gui.messages"); //$NON-NLS-1$ - public static final Logger logger = LoggerFactory.getLogger(CheckDirectorySelector.class); + private static final Logger logger = LoggerFactory.getLogger(CheckDirectorySelector.class); /** * @@ -88,7 +88,7 @@ public class CheckDirectorySelector extends JFileChooser // super.setSelectedFile(file); logger.debug("==== SET SELECTED FILE================="); - logger.debug("SELECED FILE " + file); + logger.debug("SELECED FILE {}", file); } /** diff --git a/src/org/dclermonte/siba/gui/SibaGUI.java b/src/org/dclermonte/siba/gui/SibaGUI.java index c007488..80a156c 100644 --- a/src/org/dclermonte/siba/gui/SibaGUI.java +++ b/src/org/dclermonte/siba/gui/SibaGUI.java @@ -114,10 +114,10 @@ public class SibaGUI UIManager.put("swing.boldMetal", Boolean.FALSE); // Set LookAndFeel. - logger.debug("System lookAndFeel property:" + System.getProperty("swing.defaultlaf")); - logger.debug("Available lookAndFeel: " + GUIToolBox.availableLookAndFeels().toString()); - logger.debug("System lookAndFeel: " + UIManager.getSystemLookAndFeelClassName()); - logger.debug("Current lookAndFeel: " + UIManager.getLookAndFeel().getName()); + logger.debug("System lookAndFeel property: {}", System.getProperty("swing.defaultlaf")); + logger.debug("Available lookAndFeel: {} ", GUIToolBox.availableLookAndFeels().toString()); + logger.debug("System lookAndFeel: {} ", UIManager.getSystemLookAndFeelClassName()); + logger.debug("Current lookAndFeel: {} ", UIManager.getLookAndFeel().getName()); if (!StringUtils.equals(UIManager.getSystemLookAndFeelClassName(), "javax.swing.plaf.metal.MetalLookAndFeel")) { @@ -144,13 +144,12 @@ public class SibaGUI } } /* UIManager.setLookAndFeel("com.sun.java.swing.plaf.metal.MetalLookAndFeel"); */ - logger.debug("Activated lookAndFeel: " + UIManager.getLookAndFeel().getName()); + logger.debug("Activated lookAndFeel: {} ", UIManager.getLookAndFeel().getName()); // Set default locale. this.locale = Locale.getDefault(); updateLanguage(this.locale); logger.debug(this.locale.getDisplayLanguage()); - // System.out.println(this.locale.getDisplayLanguage()); initialize(); } diff --git a/src/org/dclermonte/siba/gui/SourceDirectorySelector.java b/src/org/dclermonte/siba/gui/SourceDirectorySelector.java index 0af2b00..89b041d 100644 --- a/src/org/dclermonte/siba/gui/SourceDirectorySelector.java +++ b/src/org/dclermonte/siba/gui/SourceDirectorySelector.java @@ -84,7 +84,7 @@ public class SourceDirectorySelector extends JFileChooser // super.setSelectedFile(file); logger.debug("==== SET SELECTED FILE================="); - logger.debug("SELECED FILE " + file); + logger.debug("SELECED FILE {} ", file); } /** diff --git a/src/org/dclermonte/siba/gui/TargetDirectorySelector.java b/src/org/dclermonte/siba/gui/TargetDirectorySelector.java index 7ffb180..49f6b16 100644 --- a/src/org/dclermonte/siba/gui/TargetDirectorySelector.java +++ b/src/org/dclermonte/siba/gui/TargetDirectorySelector.java @@ -86,7 +86,7 @@ public class TargetDirectorySelector extends JFileChooser super.setSelectedFile(file); logger.debug("==== SET SELECTED FILE================="); - logger.debug("SELECED FILE " + file); + logger.debug("SELECED FILE {} ", file); } /**