From: David ‘Bombe’ Roden Date: Tue, 13 May 2008 17:54:02 +0000 (+0000) Subject: add warning to manage nodes dialog X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=7e16d0a3b4f15da04f665fc011f78af2bc93a13d;p=jSite2.git add warning to manage nodes dialog git-svn-id: http://trooper/svn/projects/jSite/trunk@866 c3eda9e8-030b-0410-8277-bc7414b0a119 --- diff --git a/src/net/pterodactylus/jsite/gui/ManageNodesDialog.java b/src/net/pterodactylus/jsite/gui/ManageNodesDialog.java index ea2b6c5..cf32cae 100644 --- a/src/net/pterodactylus/jsite/gui/ManageNodesDialog.java +++ b/src/net/pterodactylus/jsite/gui/ManageNodesDialog.java @@ -44,12 +44,13 @@ import net.pterodactylus.jsite.core.Node; import net.pterodactylus.jsite.i18n.I18n; import net.pterodactylus.jsite.i18n.I18nable; import net.pterodactylus.jsite.i18n.gui.I18nAction; +import net.pterodactylus.jsite.i18n.gui.I18nLabel; import net.pterodactylus.jsite.main.Version; import net.pterodactylus.util.swing.SwingUtils; /** * Dialog that lets the user manage her nodes. - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> * @version $Id$ */ @@ -79,6 +80,9 @@ public class ManageNodesDialog extends JDialog implements ListSelectionListener, /** The “edit node” dialog. */ private EditNodeDialog editNodeDialog; + /** The warning label. */ + private I18nLabel immediatelyEffectiveLabel; + /** The node list. */ private JList nodeList; @@ -87,7 +91,7 @@ public class ManageNodesDialog extends JDialog implements ListSelectionListener, /** * Creates a new node manager dialog. - * + * * @param swingInterface * The Swing interface */ @@ -108,7 +112,7 @@ public class ManageNodesDialog extends JDialog implements ListSelectionListener, /** * Expose the edit node dialog for the simple mode. - * + * * @return The edit node dialog */ EditNodeDialog getEditNodeDialog() { @@ -117,7 +121,7 @@ public class ManageNodesDialog extends JDialog implements ListSelectionListener, /** * Returns the list of nodes. - * + * * @return The list of nodes */ public List getNodeList() { @@ -126,7 +130,7 @@ public class ManageNodesDialog extends JDialog implements ListSelectionListener, /** * Sets the list of nodes. - * + * * @param nodeList * The list of nodes */ @@ -218,6 +222,11 @@ public class ManageNodesDialog extends JDialog implements ListSelectionListener, rootPanel.add(contentPanel, BorderLayout.CENTER); contentPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED), BorderFactory.createEmptyBorder(12, 12, 12, 12))); + JPanel warningPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 12, 12)); + warningPanel.setBorder(BorderFactory.createEmptyBorder(-12, -12, -12, -12)); + warningPanel.add(immediatelyEffectiveLabel = new I18nLabel("manageNodesDialog.label.immediatelyEffective")); + contentPanel.add(warningPanel, BorderLayout.PAGE_START); + JPanel listButtonPanel = new JPanel(new FlowLayout(FlowLayout.CENTER, 12, 12)); contentPanel.add(listButtonPanel, BorderLayout.PAGE_END); listButtonPanel.setBorder(BorderFactory.createEmptyBorder(-12, -12, -12, -12)); @@ -299,7 +308,7 @@ public class ManageNodesDialog extends JDialog implements ListSelectionListener, /** * Checks whether the list of nodes is not empty. - * + * * @return true if there is at least one node defined, * false otherwise */ @@ -359,13 +368,14 @@ public class ManageNodesDialog extends JDialog implements ListSelectionListener, addNodeAction.updateI18n(); editNodeAction.updateI18n(); deleteNodeAction.updateI18n(); + immediatelyEffectiveLabel.updateI18n(); setTitle(I18n.get("manageNodesDialog.title") + " – jSite " + Version.getVersion()); SwingUtils.repackCentered(this); } /** * List model for the {@link ManageNodesDialog#nodeList}. TODO - * + * * @author David ‘Bombe’ Roden <bombe@freenetproject.org> * @version $Id$ */ @@ -384,7 +394,7 @@ public class ManageNodesDialog extends JDialog implements ListSelectionListener, /** * Adds the given node to the list model. - * + * * @see Collection#add(Object) * @param node * The node to add @@ -396,7 +406,7 @@ public class ManageNodesDialog extends JDialog implements ListSelectionListener, /** * Removes the given node from the list model. - * + * * @see Collection#remove(Object) * @param node * The node to remove @@ -409,7 +419,7 @@ public class ManageNodesDialog extends JDialog implements ListSelectionListener, /** * Removes all nodes from the list model. - * + * * @see Collection#clear() */ public void clear() { diff --git a/src/net/pterodactylus/jsite/i18n/jSite.properties b/src/net/pterodactylus/jsite/i18n/jSite.properties index f8df8e0..1985633 100644 --- a/src/net/pterodactylus/jsite/i18n/jSite.properties +++ b/src/net/pterodactylus/jsite/i18n/jSite.properties @@ -160,6 +160,8 @@ mainWindow.pane.overview.title: Project Overview manageNodesDialog.title: Manage Nodes +manageNodesDialog.label.immediatelyEffective.name: Any changes you make on this page will immediately be effective! + manageNodesDialog.button.addNode.name: Add Node manageNodesDialog.button.addNode.mnemonic: VK_A manageNodesDialog.button.addNode.accelerator: Ctrl-VK_A diff --git a/src/net/pterodactylus/jsite/i18n/jSite_de.properties b/src/net/pterodactylus/jsite/i18n/jSite_de.properties index 1b0cdf0..271ab48 100644 --- a/src/net/pterodactylus/jsite/i18n/jSite_de.properties +++ b/src/net/pterodactylus/jsite/i18n/jSite_de.properties @@ -160,6 +160,8 @@ mainWindow.pane.overview.title: Projekt\u00fcbersicht manageNodesDialog.title: Nodes verwalten +manageNodesDialog.label.immediatelyEffective.name: Alle hier gemachten \u00c4nderungen treten sofort in Kraft! + manageNodesDialog.button.addNode.name: Node hinzuf\u00fcgen manageNodesDialog.button.addNode.mnemonic: VK_H manageNodesDialog.button.addNode.accelerator: Ctrl-VK_H