add window title
[jSite2.git] / src / net / pterodactylus / jsite / gui / FileManager.java
index 49d4241..78c24a7 100644 (file)
 package net.pterodactylus.jsite.gui;
 
 import javax.swing.JDialog;
+import javax.swing.JFrame;
 
+import net.pterodactylus.jsite.i18n.I18n;
+import net.pterodactylus.jsite.i18n.I18nable;
 import net.pterodactylus.jsite.project.Project;
 
 /**
@@ -28,7 +31,7 @@ import net.pterodactylus.jsite.project.Project;
  * 
  * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
  */
-public class FileManager extends JDialog {
+public class FileManager extends JDialog implements I18nable {
 
        /** The project whose files to manage. */
        private final Project project;
@@ -36,10 +39,13 @@ public class FileManager extends JDialog {
        /**
         * Creates a new file manager.
         * 
+        * @param parent
+        *            The parent frame
         * @param project
         *            The project whose files to manage
         */
-       public FileManager(Project project) {
+       public FileManager(JFrame parent, Project project) {
+               super(parent, I18n.get("fileManager.title", project.getName()));
                this.project = project;
                initComponents();
        }
@@ -55,4 +61,15 @@ public class FileManager extends JDialog {
                /* TODO. */
        }
 
+       //
+       // INTERFACE I18nable
+       //
+
+       /**
+        * {@inheritDoc}
+        */
+       public void updateI18n() {
+               setTitle(I18n.get("fileManager.title", project.getName()));
+       }
+
 }