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$
*/
/** The “edit node” dialog. */
private EditNodeDialog editNodeDialog;
+ /** The warning label. */
+ private I18nLabel immediatelyEffectiveLabel;
+
/** The node list. */
private JList nodeList;
/**
* Creates a new node manager dialog.
- *
+ *
* @param swingInterface
* The Swing interface
*/
/**
* Expose the edit node dialog for the simple mode.
- *
+ *
* @return The edit node dialog
*/
EditNodeDialog getEditNodeDialog() {
/**
* Returns the list of nodes.
- *
+ *
* @return The list of nodes
*/
public List<Node> getNodeList() {
/**
* Sets the list of nodes.
- *
+ *
* @param nodeList
* The list of nodes
*/
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));
/**
* Checks whether the list of nodes is not empty.
- *
+ *
* @return <code>true</code> if there is at least one node defined,
* <code>false</code> otherwise
*/
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$
*/
/**
* Adds the given node to the list model.
- *
+ *
* @see Collection#add(Object)
* @param node
* The node to add
/**
* Removes the given node from the list model.
- *
+ *
* @see Collection#remove(Object)
* @param node
* The node to remove
/**
* Removes all nodes from the list model.
- *
+ *
* @see Collection#clear()
*/
public void clear() {