complete new node management
[jSite2.git] / src / net / pterodactylus / jsite / gui / EditNodeDialog.java
index 2e49055..bbb5224 100644 (file)
@@ -29,6 +29,7 @@ import java.awt.event.ActionEvent;
 import javax.swing.BorderFactory;
 import javax.swing.JButton;
 import javax.swing.JDialog;
+import javax.swing.JFrame;
 import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 import javax.swing.JTextField;
@@ -44,7 +45,7 @@ import net.pterodactylus.util.swing.SwingUtils;
 
 /**
  * Dialog that lets the user edit the properties of a node.
- *
+ * 
  * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
  * @version $Id$
  */
@@ -88,15 +89,16 @@ public class EditNodeDialog extends JDialog implements I18nable {
 
        /**
         * Creates a new node edit dialog with the given parent.
-        *
-        * @param parentDialog
-        *            The parent dialog of this dialog
+        * 
+        * @param parentFrame
+        *            The parent frame of this dialog
         */
-       public EditNodeDialog(JDialog parentDialog) {
-               super(parentDialog, I18n.get("editNodeDialog.title") + " – jSite " + Version.getVersion(), true);
+       public EditNodeDialog(JFrame parentFrame) {
+               super(parentFrame, I18n.get("editNodeDialog.title") + " – jSite " + Version.getVersion(), true);
                initActions();
                initComponents();
                pack();
+               setSize(getWidth() * 2, getHeight());
                I18n.registerI18nable(this);
                SwingUtils.center(this);
        }
@@ -107,7 +109,7 @@ public class EditNodeDialog extends JDialog implements I18nable {
 
        /**
         * Returns the user-given name of the node.
-        *
+        * 
         * @return The user-given name of the node
         */
        public String getNodeName() {
@@ -116,7 +118,7 @@ public class EditNodeDialog extends JDialog implements I18nable {
 
        /**
         * Sets the user-given name of the node.
-        *
+        * 
         * @param name
         *            The name of the node
         */
@@ -127,7 +129,7 @@ public class EditNodeDialog extends JDialog implements I18nable {
 
        /**
         * Returns the hostname of the node.
-        *
+        * 
         * @return The hostname of the node
         */
        public String getNodeHostname() {
@@ -136,7 +138,7 @@ public class EditNodeDialog extends JDialog implements I18nable {
 
        /**
         * Sets the hostname of the node.
-        *
+        * 
         * @param hostname
         *            The hostname of the node
         */
@@ -147,7 +149,7 @@ public class EditNodeDialog extends JDialog implements I18nable {
 
        /**
         * Returns the FCP port number of the node.
-        *
+        * 
         * @return The FCP port number of the node
         */
        public int getNodePort() {
@@ -156,7 +158,7 @@ public class EditNodeDialog extends JDialog implements I18nable {
 
        /**
         * Sets the FCP port number of the node.
-        *
+        * 
         * @param port
         *            The FCP port number of the node
         */
@@ -167,7 +169,7 @@ public class EditNodeDialog extends JDialog implements I18nable {
 
        /**
         * Returns whether the dialog was cancelled.
-        *
+        * 
         * @return <code>true</code> if the dialog was cancelled,
         *         <code>false</code> if the user clicked “okay”
         */