diff --git a/src/org/dclermonte/siba/SibaException.java b/src/org/dclermonte/siba/SibaException.java index 63c93f0..4700f71 100644 --- a/src/org/dclermonte/siba/SibaException.java +++ b/src/org/dclermonte/siba/SibaException.java @@ -29,6 +29,9 @@ public class SibaException extends Exception { private static final long serialVersionUID = 2909630770291570845L; + /** + * + */ public SibaException() { super(); diff --git a/src/org/dclermonte/siba/gui/AboutDialog.java b/src/org/dclermonte/siba/gui/AboutDialog.java index e8fa176..99a6cba 100644 --- a/src/org/dclermonte/siba/gui/AboutDialog.java +++ b/src/org/dclermonte/siba/gui/AboutDialog.java @@ -22,11 +22,17 @@ package org.dclermonte.siba.gui; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Cursor; +import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Font; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.util.ResourceBundle; import javax.swing.ImageIcon; import javax.swing.JButton; @@ -46,13 +52,18 @@ import org.slf4j.LoggerFactory; public class AboutDialog extends JDialog { private static final long serialVersionUID = 8868109575782482455L; + private static ResourceBundle BUNDLE = ResourceBundle.getBundle("org.dclermonte.siba.gui.messages"); //$NON-NLS-1$ public static final Logger logger = LoggerFactory.getLogger(AboutDialog.class); /** * This is the constructor for the dialog. + * + * @throws IOException */ - public AboutDialog() + public AboutDialog() throws IOException { + setMinimumSize(new Dimension(600, 350)); + setMaximumSize(new Dimension(600, 500)); setIconImage(Toolkit.getDefaultToolkit() .getImage(AboutDialog.class.getResource("/org/dclermonte/siba/gui/SibaLogo.png"))); setBackground(Color.GREEN); @@ -84,18 +95,36 @@ public class AboutDialog extends JDialog JPanel panel = new JPanel(); panel.setBackground(Color.GREEN); getContentPane().add(panel, BorderLayout.CENTER); - { - JLabel lblNewLabel = new JLabel(""); - lblNewLabel.setIcon(new ImageIcon(AboutDialog.class.getResource("/org/dclermonte/siba/gui/SibaLogo.png"))); - panel.add(lblNewLabel); - } + panel.setLayout(new BorderLayout(0, 0)); JTextPane txtpnSimpleBackupDveloppeur = new JTextPane(); txtpnSimpleBackupDveloppeur.setBackground(Color.GREEN); txtpnSimpleBackupDveloppeur.setFont(new Font("Dialog", Font.BOLD, 14)); - txtpnSimpleBackupDveloppeur.setText( - "Simple Backup\n\nDéveloppeur Christian Pierre Momon et Didier Clermonté\n\nLicence GNU Affero General Public License 2016"); + txtpnSimpleBackupDveloppeur.setContentType("text/html"); + String path = System.getProperty("user.dir"); + String about = BUNDLE.getString("AboutDialog"); + File aboutFile = new File(path + "/src/org/dclermonte/siba/gui/" + about); + FileReader in = new FileReader(aboutFile); + BufferedReader bufferedReader = new BufferedReader(in); + StringBuilder stringBuilder = new StringBuilder(); + String lines; + String line; + while ((line = bufferedReader.readLine()) != null) + { + stringBuilder.append(line); + } + lines = stringBuilder.toString(); + txtpnSimpleBackupDveloppeur.setText(lines); + System.out.println("texte = " + lines); + // "Simple Backup\n\nDéveloppeur Christian Pierre Momon et Didier + // Clermonté\n\nLicence GNU Affero General Public License 2016"); panel.add(txtpnSimpleBackupDveloppeur); + { + JLabel lblNewLabel = new JLabel(""); + lblNewLabel + .setIcon(new ImageIcon(AboutDialog.class.getResource("/org/dclermonte/siba/gui/SibaLogo_256.png"))); + panel.add(lblNewLabel, BorderLayout.WEST); + } } /** diff --git a/src/org/dclermonte/siba/gui/CheckPanel.java b/src/org/dclermonte/siba/gui/CheckPanel.java index 921c753..7077dea 100644 --- a/src/org/dclermonte/siba/gui/CheckPanel.java +++ b/src/org/dclermonte/siba/gui/CheckPanel.java @@ -60,6 +60,9 @@ public class CheckPanel extends JPanel public static final Logger logger = LoggerFactory.getLogger(CheckPanel.class); private JTextField fileToCheckField; + /** + * + */ public CheckPanel() { setLayout(new BorderLayout(0, 0)); diff --git a/src/org/dclermonte/siba/gui/SibaLogo_256.png b/src/org/dclermonte/siba/gui/SibaLogo_256.png new file mode 100644 index 0000000..1a19ef5 Binary files /dev/null and b/src/org/dclermonte/siba/gui/SibaLogo_256.png differ diff --git a/src/org/dclermonte/siba/gui/about_en.html b/src/org/dclermonte/siba/gui/about_en.html new file mode 100644 index 0000000..4c37f3d --- /dev/null +++ b/src/org/dclermonte/siba/gui/about_en.html @@ -0,0 +1,21 @@ + +
++SimpleBackup
+
+
Create Archive tar of a directory and calculate the MD5 hash
+
+
Developpers :
+ Christian Pierre Momon et Didier Clermonté
+
Licence + GNU Affero General Public License 2016
+
+
+
+
+SimpleBackup
+
+
Crée une archive .tar d'un répertoire +et calcule son hash MD5
+
+
Développeurs :
+ Christian Pierre Momon et Didier Clermonté
+
Licence + GNU Affero General Public License 2016
+
+
+
+