summaryrefslogtreecommitdiff
path: root/java/src/IceGrid/TreeNode/Application.java
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2005-10-16 22:59:26 +0000
committerBernard Normier <bernard@zeroc.com>2005-10-16 22:59:26 +0000
commit5d13916a52684cdfd4e5e32584191c81c53be709 (patch)
tree4c2a6858e01f7486d623097b37053047183fa711 /java/src/IceGrid/TreeNode/Application.java
parentVariable substitution in Application, Node and Replica Group (diff)
downloadice-5d13916a52684cdfd4e5e32584191c81c53be709.tar.bz2
ice-5d13916a52684cdfd4e5e32584191c81c53be709.tar.xz
ice-5d13916a52684cdfd4e5e32584191c81c53be709.zip
New menu items for grand parents, and table/parameter/list dialogs are not
more intuitive (no more popup menu)
Diffstat (limited to 'java/src/IceGrid/TreeNode/Application.java')
-rwxr-xr-xjava/src/IceGrid/TreeNode/Application.java52
1 files changed, 52 insertions, 0 deletions
diff --git a/java/src/IceGrid/TreeNode/Application.java b/java/src/IceGrid/TreeNode/Application.java
index 04df1e024af..c00be603606 100755
--- a/java/src/IceGrid/TreeNode/Application.java
+++ b/java/src/IceGrid/TreeNode/Application.java
@@ -8,6 +8,7 @@
// **********************************************************************
package IceGrid.TreeNode;
+import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JPopupMenu;
@@ -63,6 +64,13 @@ public class Application extends EditableParent
actions[APPLICATION_INSTALL_DISTRIBUTION] =
!_descriptor.distrib.icepatch.equals("");
}
+
+ actions[NEW_NODE] = (_nodes != null);
+ actions[NEW_REPLICA_GROUP] = (_replicaGroups != null);
+ actions[NEW_TEMPLATE_SERVER] = (_serverTemplates != null);
+ actions[NEW_TEMPLATE_SERVER_ICEBOX] = (_serverTemplates != null);
+ actions[NEW_TEMPLATE_SERVICE] = (_serviceTemplates != null);
+
return actions;
}
public JPopupMenu getPopupMenu()
@@ -70,6 +78,30 @@ public class Application extends EditableParent
if(_popup == null)
{
_popup = new PopupMenu(_model);
+
+ JMenuItem newNodeItem = new JMenuItem(_model.getActions()[NEW_NODE]);
+ newNodeItem.setText("New node");
+ _popup.add(newNodeItem);
+
+ JMenuItem newReplicaGroupItem = new JMenuItem(_model.getActions()[NEW_REPLICA_GROUP]);
+ newReplicaGroupItem.setText("New replica group");
+ _popup.add(newReplicaGroupItem);
+ _popup.addSeparator();
+
+ JMenuItem newServerItem = new JMenuItem(_model.getActions()[NEW_TEMPLATE_SERVER]);
+ newServerItem.setText("New server template");
+ _popup.add(newServerItem);
+ JMenuItem newIceBoxItem =
+ new JMenuItem(_model.getActions()[NEW_TEMPLATE_SERVER_ICEBOX]);
+ newIceBoxItem.setText("New IceBox server template");
+ _popup.add(newIceBoxItem);
+ _popup.addSeparator();
+
+ JMenuItem newServiceItem = new JMenuItem(_model.getActions()[NEW_TEMPLATE_SERVICE]);
+ newServiceItem.setText("New service template");
+ _popup.add(newServiceItem);
+ _popup.addSeparator();
+
_popup.add(_model.getActions()[APPLICATION_INSTALL_DISTRIBUTION]);
}
return _popup;
@@ -83,6 +115,26 @@ public class Application extends EditableParent
{
_parent.paste();
}
+ public void newNode()
+ {
+ _nodes.newNode();
+ }
+ public void newReplicaGroup()
+ {
+ _replicaGroups.newReplicaGroup();
+ }
+ public void newTemplateServer()
+ {
+ _serverTemplates.newTemplateServer();
+ }
+ public void newTemplateServerIceBox()
+ {
+ _serverTemplates.newTemplateServerIceBox();
+ }
+ public void newTemplateService()
+ {
+ _serviceTemplates.newTemplateService();
+ }
public ApplicationUpdateDescriptor createUpdateDescriptor()
{