/**
* Dialog that lets the user edit the properties of a node.
- *
+ *
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
* @version $Id$
*/
/** The same machine checkbox. */
private JCheckBox sameMachineCheckBox;
-
+
/** The same machine action. */
private I18nAction sameMachineAction;
/**
* Creates a new node edit dialog with the given parent.
- *
+ *
* @param parentDialog
* The parent dialog of this dialog
*/
/**
* Returns the user-given name of the node.
- *
+ *
* @return The user-given name of the node
*/
public String getNodeName() {
/**
* Sets the user-given name of the node.
- *
+ *
* @param name
* The name of the node
*/
/**
* Returns the hostname of the node.
- *
+ *
* @return The hostname of the node
*/
public String getNodeHostname() {
/**
* Sets the hostname of the node.
- *
+ *
* @param hostname
* The hostname of the node
*/
/**
* Returns the FCP port number of the node.
- *
+ *
* @return The FCP port number of the node
*/
public int getNodePort() {
/**
* Sets the FCP port number of the node.
- *
+ *
* @param port
* The FCP port number of the node
*/
/**
* Returns whether the node is on the same machine as jSite.
- *
+ *
* @return <code>true</code> if the node is on the same machine as jSite,
* <code>false</code> otherwise
*/
/**
* Sets whether the node is on the same machine as jSite.
- *
+ *
* @param sameMachine
* <code>true</code> if the node is on the same machine as
* jSite, <code>false</code> otherwise
/**
* Returns whether the dialog was cancelled.
- *
+ *
* @return <code>true</code> if the dialog was cancelled,
* <code>false</code> if the user clicked “okay”
*/
nameTextField = new JTextField();
contentPanel.add(nameLabel = new I18nLabel("editNodeDialog.label.name", nameTextField), new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.LINE_END, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
- contentPanel.add(nameTextField, new GridBagConstraints(1, 0, 1, 1, 1, 0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, new Insets(0, 12, 0, 0), 0, 0));
+ contentPanel.add(nameTextField, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, new Insets(0, 12, 0, 0), 0, 0));
hostnameTextField = new JTextField();
contentPanel.add(hostnameLabel = new I18nLabel("editNodeDialog.label.hostname", hostnameTextField), new GridBagConstraints(0, 1, 1, 1, 0, 0, GridBagConstraints.LINE_END, GridBagConstraints.NONE, new Insets(12, 0, 0, 0), 0, 0));
- contentPanel.add(hostnameTextField, new GridBagConstraints(1, 1, 1, 1, 1, 0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, new Insets(12, 12, 0, 0), 0, 0));
+ contentPanel.add(hostnameTextField, new GridBagConstraints(1, 1, 1, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, new Insets(12, 12, 0, 0), 0, 0));
portTextField = new JTextField();
contentPanel.add(portLabel = new I18nLabel("editNodeDialog.label.port", portTextField), new GridBagConstraints(0, 2, 1, 1, 0, 0, GridBagConstraints.LINE_END, GridBagConstraints.NONE, new Insets(12, 0, 0, 0), 0, 0));
- contentPanel.add(portTextField, new GridBagConstraints(1, 2, 1, 1, 1, 0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, new Insets(12, 12, 0, 0), 0, 0));
+ contentPanel.add(portTextField, new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, new Insets(12, 12, 0, 0), 0, 0));
sameMachineCheckBox = new JCheckBox(sameMachineAction);
- contentPanel.add(sameMachineCheckBox, new GridBagConstraints(0, 3, 2, 1, 1, 1, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(12, 0, 0, 0), 0, 0));
+ contentPanel.add(sameMachineCheckBox, new GridBagConstraints(0, 3, 2, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(12, 0, 0, 0), 0, 0));
+
+ contentPanel.add(new JPanel(), new GridBagConstraints(0, 4, 2, 1, 1.0, 1.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
}
//
/**
* Checks the name textfield for valid input.
- *
+ *
* @return <code>true</code> if the name textfield seem okay,
* <code>false</code> if there is an error
*/
/**
* Verifies the hostname textfield by resolving the given name.
- *
+ *
* @return <code>true</code> if the hostname is not empty and can be
* resolved, <code>false</code> otherwise
*/
/**
* Verifies that the port number is numeric and in the range from
* <code>0</code> to <code>65535</code>.
- *
+ *
* @return <code>true</code> if the port number is okay,
* <code>false</code> otherwise
*/