private void addNode() {
Node node = new Node("localhost", 9481, I18n.getMessage("jsite.node-manager.new-node"));
nodeListModel.addElement(node);
+ deleteNodeAction.setEnabled(nodeListModel.size() > 1);
wizard.setNextEnabled(true);
fireNodesUpdated(getNodes());
}
nodeListModel.removeElement(node);
nodeList.repaint();
fireNodesUpdated(getNodes());
+ deleteNodeAction.setEnabled(nodeListModel.size() > 1);
wizard.setNextEnabled(nodeListModel.size() > 0);
}
nodeNameTextField.setEnabled(enabled);
nodeHostnameTextField.setEnabled(enabled);
nodePortSpinner.setEnabled(enabled);
- deleteNodeAction.setEnabled(enabled);
+ deleteNodeAction.setEnabled(enabled && (nodeListModel.size() > 1));
if (enabled) {
nodeNameTextField.setText(node.getName());
nodeHostnameTextField.setText(node.getHostname());