diff options
Diffstat (limited to 'java/src')
-rwxr-xr-x | java/src/IceGrid/MainPane.java | 84 | ||||
-rwxr-xr-x | java/src/IceGrid/Model.java | 204 | ||||
-rwxr-xr-x | java/src/IceGrid/TreeNode/Adapter.java | 3 | ||||
-rwxr-xr-x | java/src/IceGrid/TreeNode/CommonBase.java | 11 | ||||
-rwxr-xr-x | java/src/IceGrid/TreeNode/CommonBaseI.java | 4 | ||||
-rwxr-xr-x | java/src/IceGrid/TreeNode/DbEnv.java | 1 | ||||
-rwxr-xr-x | java/src/IceGrid/TreeNode/Node.java | 1 | ||||
-rwxr-xr-x | java/src/IceGrid/TreeNode/NodeEditor.java | 38 | ||||
-rwxr-xr-x | java/src/IceGrid/TreeNode/ReplicaGroup.java | 1 | ||||
-rwxr-xr-x | java/src/IceGrid/TreeNode/ReplicaGroupEditor.java | 4 | ||||
-rwxr-xr-x | java/src/IceGrid/TreeNode/Root.java | 32 | ||||
-rwxr-xr-x | java/src/IceGrid/TreeNode/Server.java | 12 |
12 files changed, 262 insertions, 133 deletions
diff --git a/java/src/IceGrid/MainPane.java b/java/src/IceGrid/MainPane.java index 0c898dd2e76..594b0d69299 100755 --- a/java/src/IceGrid/MainPane.java +++ b/java/src/IceGrid/MainPane.java @@ -43,6 +43,51 @@ import IceGrid.TreeNode.CommonBase; public class MainPane extends JSplitPane { + private class WelcomePanel extends JPanel + { + WelcomePanel() + { + MediaTracker mt = new MediaTracker(this); + _image = Toolkit.getDefaultToolkit().getImage("resources/RedIceCrystal.jpg"); + mt.addImage(_image, 0); + + try + { + mt.waitForAll(); + } + catch(InterruptedException e) + { + } + + _aspectRatio = _image.getWidth(null)/_image.getHeight(null); + } + + protected void paintComponent(Graphics g) + { + super.paintComponent(g); + Dimension d = _rightPane.getSize(null); + + // + // Keep the aspect ratio and make the image fill all the space + // + if(d.height * _aspectRatio < d.width) + { + d.height = (int)((float)d.width / _aspectRatio); + } + else + { + d.width = (int)((float)d.height * _aspectRatio); + } + + g.drawImage(_image, 0, 0, d.width + 100, d.height, null); + } + + private Image _image; + private float _aspectRatio; + } + + + static class PopupListener extends MouseAdapter { public void mousePressed(MouseEvent e) @@ -77,13 +122,8 @@ public class MainPane extends JSplitPane } } - static class SelectionListener implements TreeSelectionListener + class SelectionListener implements TreeSelectionListener { - SelectionListener(Model model) - { - _model = model; - } - public void valueChanged(TreeSelectionEvent e) { TreePath path = null; @@ -96,9 +136,7 @@ public class MainPane extends JSplitPane { if(_model.displayEnabled()) { - // - // TODO: display splash? - // + displayWelcomePanel(); } } else @@ -123,9 +161,7 @@ public class MainPane extends JSplitPane } } } - private CommonBase _previousNode; - private Model _model; } public void updateUI() @@ -163,7 +199,7 @@ public class MainPane extends JSplitPane tree.getSelectionModel().setSelectionMode (TreeSelectionModel.SINGLE_TREE_SELECTION); - SelectionListener appSelectionListener = new SelectionListener(_model); + SelectionListener appSelectionListener = new SelectionListener(); tree.addTreeSelectionListener(appSelectionListener); tree.setRootVisible(false); _model.setTree(tree); @@ -181,10 +217,15 @@ public class MainPane extends JSplitPane // // Right pane // - _rightPane = new SimpleInternalFrame("Properties"); - _emptyPanel = new JPanel(); - _emptyPanel.setBackground(Color.RED); - _rightPane.setContent(_emptyPanel); + _rightPane = new SimpleInternalFrame(""); + + // + // Welcome panel + // + _welcomePanel = new WelcomePanel(); + _welcomePanel.setBackground(Color.RED); + displayWelcomePanel(); + _model.setPropertiesFrame(_rightPane); setLeftComponent(leftPane); @@ -242,8 +283,17 @@ public class MainPane extends JSplitPane } } + private void displayWelcomePanel() + { + _rightPane.setTitle(" "); + _rightPane.setContent(_welcomePanel); + _rightPane.validate(); + _rightPane.repaint(); + } + + private Model _model; private SimpleInternalFrame _rightPane; - static private JPanel _emptyPanel; + private JPanel _welcomePanel; } diff --git a/java/src/IceGrid/Model.java b/java/src/IceGrid/Model.java index 5bc69fe3aae..b26244f1cc9 100755 --- a/java/src/IceGrid/Model.java +++ b/java/src/IceGrid/Model.java @@ -119,40 +119,45 @@ public class Model //
// New sub-menu
//
- JMenu newMenu = new JMenu("New");
- fileMenu.add(newMenu);
- newMenu.add(_newApplication);
- newMenu.addSeparator();
- newMenu.add(_actions[CommonBase.NEW_ADAPTER]);
- newMenu.add(_actions[CommonBase.NEW_DBENV]);
- newMenu.add(_actions[CommonBase.NEW_NODE]);
- newMenu.add(_actions[CommonBase.NEW_REPLICA_GROUP]);
+ _newMenu = new JMenu("New");
+ _newMenu.setEnabled(false);
+ fileMenu.add(_newMenu);
+ _newMenu.add(_newApplicationWithDefaultTemplates);
+ _newMenu.add(_newApplication);
+ _newMenu.addSeparator();
+ _newMenu.add(_actions[CommonBase.NEW_ADAPTER]);
+ _newMenu.add(_actions[CommonBase.NEW_DBENV]);
+ _newMenu.add(_actions[CommonBase.NEW_NODE]);
+ _newMenu.add(_actions[CommonBase.NEW_REPLICA_GROUP]);
//
// New server sub-sub-menu
//
- JMenu newServer = new JMenu("Server");
- newMenu.add(newServer);
- newServer.add(_actions[CommonBase.NEW_SERVER]);
- newServer.add(_actions[CommonBase.NEW_SERVER_ICEBOX]);
- newServer.add(_actions[CommonBase.NEW_SERVER_FROM_TEMPLATE]);
+ _newServerMenu = new JMenu("Server");
+ _newServerMenu.setEnabled(false);
+ _newMenu.add(_newServerMenu);
+ _newServerMenu.add(_actions[CommonBase.NEW_SERVER]);
+ _newServerMenu.add(_actions[CommonBase.NEW_SERVER_ICEBOX]);
+ _newServerMenu.add(_actions[CommonBase.NEW_SERVER_FROM_TEMPLATE]);
//
// New service sub-sub-menu
//
- JMenu newService = new JMenu("Service");
- newMenu.add(newService);
- newService.add(_actions[CommonBase.NEW_SERVICE]);
- newService.add(_actions[CommonBase.NEW_SERVICE_FROM_TEMPLATE]);
+ _newServiceMenu = new JMenu("Service");
+ _newServiceMenu.setEnabled(false);
+ _newMenu.add(_newServiceMenu);
+ _newServiceMenu.add(_actions[CommonBase.NEW_SERVICE]);
+ _newServiceMenu.add(_actions[CommonBase.NEW_SERVICE_FROM_TEMPLATE]);
//
// New template sub-sub-menu
//
- JMenu newTemplate = new JMenu("Template");
- newMenu.add(newTemplate);
- newTemplate.add(_actions[CommonBase.NEW_TEMPLATE_SERVER]);
- newTemplate.add(_actions[CommonBase.NEW_TEMPLATE_SERVER_ICEBOX]);
- newTemplate.add(_actions[CommonBase.NEW_TEMPLATE_SERVICE]);
+ _newTemplateMenu = new JMenu("Template");
+ _newTemplateMenu.setEnabled(false);
+ _newMenu.add(_newTemplateMenu);
+ _newTemplateMenu.add(_actions[CommonBase.NEW_TEMPLATE_SERVER]);
+ _newTemplateMenu.add(_actions[CommonBase.NEW_TEMPLATE_SERVER_ICEBOX]);
+ _newTemplateMenu.add(_actions[CommonBase.NEW_TEMPLATE_SERVICE]);
fileMenu.addSeparator();
fileMenu.add(_connect);
@@ -191,38 +196,41 @@ public class Model //
// Application sub-menu
//
- JMenu appMenu = new JMenu("Application");
- toolsMenu.add(appMenu);
- appMenu.add(_actions[CommonBase.APPLICATION_REFRESH_INSTALLATION]);
- appMenu.add(_actions[CommonBase.APPLICATION_REFRESH_INSTALLATION_NO_SHUTDOWN]);
-
+ _appMenu = new JMenu("Application");
+ _appMenu.setEnabled(false);
+ toolsMenu.add(_appMenu);
+ _appMenu.add(_actions[CommonBase.APPLICATION_REFRESH_INSTALLATION]);
+
//
// Node sub-menu
//
- JMenu nodeMenu = new JMenu("Node");
- toolsMenu.add(nodeMenu);
- nodeMenu.add(_actions[CommonBase.SHUTDOWN_NODE]);
+ _nodeMenu = new JMenu("Node");
+ _nodeMenu.setEnabled(false);
+ toolsMenu.add(_nodeMenu);
+ _nodeMenu.add(_actions[CommonBase.SHUTDOWN_NODE]);
//
// Server sub-menu
//
- JMenu serverMenu = new JMenu("Server");
- toolsMenu.add(serverMenu);
- serverMenu.add(_actions[CommonBase.START]);
- serverMenu.add(_actions[CommonBase.STOP]);
- serverMenu.addSeparator();
- serverMenu.add(_actions[CommonBase.ENABLE]);
- serverMenu.add(_actions[CommonBase.DISABLE]);
- serverMenu.addSeparator();
- serverMenu.add(_actions[CommonBase.SERVER_REFRESH_INSTALLATION]);
- serverMenu.add(_actions[CommonBase.SERVER_REFRESH_INSTALLATION_NO_SHUTDOWN]);
+ _serverMenu = new JMenu("Server");
+ _serverMenu.setEnabled(false);
+ toolsMenu.add(_serverMenu);
+ _serverMenu.add(_actions[CommonBase.START]);
+ _serverMenu.add(_actions[CommonBase.STOP]);
+ _serverMenu.addSeparator();
+ _serverMenu.add(_actions[CommonBase.ENABLE]);
+ _serverMenu.add(_actions[CommonBase.DISABLE]);
+ _serverMenu.addSeparator();
+ _serverMenu.add(_actions[CommonBase.SERVER_REFRESH_INSTALLATION]);
+
//
// Service sub-menu
//
- JMenu serviceMenu = new JMenu("Service");
- toolsMenu.add(serviceMenu);
- serviceMenu.add(_actions[CommonBase.MOVE_UP]);
- serviceMenu.add(_actions[CommonBase.MOVE_DOWN]);
+ _serviceMenu = new JMenu("Service");
+ _serviceMenu.setEnabled(false);
+ toolsMenu.add(_serviceMenu);
+ _serviceMenu.add(_actions[CommonBase.MOVE_UP]);
+ _serviceMenu.add(_actions[CommonBase.MOVE_DOWN]);
//
// Help menu
@@ -680,12 +688,15 @@ public class Model _root.clear();
_sessionManager = null;
_admin = null;
+
+ _newApplication.setEnabled(false);
+ _newApplicationWithDefaultTemplates.setEnabled(false);
+ _newMenu.setEnabled(false);
}
boolean setConnectInfo(ConnectInfo info, Component parent,
Cursor oldCursor)
{
-
//
// Default locator
//
@@ -749,6 +760,10 @@ public class Model return false;
}
+ _newApplication.setEnabled(true);
+ _newApplicationWithDefaultTemplates.setEnabled(true);
+ _newMenu.setEnabled(true);
+
return true;
}
@@ -850,13 +865,24 @@ public class Model // Common actions (nodes not involved)
//
- _newApplication = new AbstractAction("Application")
+ _newApplication = new AbstractAction("Application without default templates")
{
public void actionPerformed(ActionEvent e)
{
newApplication();
}
};
+ _newApplication.setEnabled(false);
+
+ _newApplicationWithDefaultTemplates =
+ new AbstractAction("Application")
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ newApplicationWithDefaultTemplates();
+ }
+ };
+ _newApplicationWithDefaultTemplates.setEnabled(false);
_connect = new AbstractAction("Connect...", Utils.getIcon("/icons/connect.gif"))
{
@@ -1118,15 +1144,7 @@ public class Model {
public void actionPerformed(ActionEvent e)
{
- _actionsTarget.applicationRefreshInstallation(true);
- }
- };
- _actions[CommonBase.APPLICATION_REFRESH_INSTALLATION_NO_SHUTDOWN] =
- new AbstractAction("Refresh installation (no shutdown)")
- {
- public void actionPerformed(ActionEvent e)
- {
- _actionsTarget.applicationRefreshInstallation(false);
+ _actionsTarget.applicationRefreshInstallation();
}
};
_actions[CommonBase.SERVER_REFRESH_INSTALLATION] =
@@ -1134,15 +1152,7 @@ public class Model {
public void actionPerformed(ActionEvent e)
{
- _actionsTarget.serverRefreshInstallation(true);
- }
- };
- _actions[CommonBase.SERVER_REFRESH_INSTALLATION_NO_SHUTDOWN] =
- new AbstractAction("Refresh installation (no shutdown)")
- {
- public void actionPerformed(ActionEvent e)
- {
- _actionsTarget.serverRefreshInstallation(false);
+ _actionsTarget.serverRefreshInstallation();
}
};
}
@@ -1154,6 +1164,29 @@ public class Model {
_root.newApplication();
}
+ private void newApplicationWithDefaultTemplates()
+ {
+ _mainFrame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
+ try
+ {
+ ApplicationDescriptor descriptor = _admin.getDefaultApplicationDescriptor();
+ descriptor.name = "NewApplication";
+ _root.newApplication(descriptor);
+ }
+ catch(Ice.LocalException e)
+ {
+ JOptionPane.showMessageDialog(
+ _mainFrame,
+ "Could not retrieve the default application descriptor from the IceGrid Registry: \n"
+ + e.toString(),
+ "Trouble with IceGrid Registry",
+ JOptionPane.ERROR_MESSAGE);
+ }
+ finally
+ {
+ _mainFrame.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
+ }
+ }
//
// "Connect" action
@@ -1353,9 +1386,37 @@ public class Model _actions[i].setEnabled(availableActions[i]);
}
- //
- // TODO: enable/disable some menus
- //
+
+ _newServerMenu.setEnabled(
+ availableActions[CommonBase.NEW_SERVER] ||
+ availableActions[CommonBase.NEW_SERVER_ICEBOX] ||
+ availableActions[CommonBase.NEW_SERVER_FROM_TEMPLATE]);
+
+ _newServiceMenu.setEnabled(
+ availableActions[CommonBase.NEW_SERVICE] ||
+ availableActions[CommonBase.NEW_SERVICE_FROM_TEMPLATE]);
+
+ _newTemplateMenu.setEnabled(
+ availableActions[CommonBase.NEW_TEMPLATE_SERVER] ||
+ availableActions[CommonBase.NEW_TEMPLATE_SERVER_ICEBOX] ||
+ availableActions[CommonBase.NEW_TEMPLATE_SERVICE]);
+
+ _appMenu.setEnabled(
+ availableActions[CommonBase.APPLICATION_REFRESH_INSTALLATION]);
+
+ _nodeMenu.setEnabled(
+ availableActions[CommonBase.SHUTDOWN_NODE]);
+
+ _serverMenu.setEnabled(
+ availableActions[CommonBase.START] ||
+ availableActions[CommonBase.STOP] ||
+ availableActions[CommonBase.ENABLE] ||
+ availableActions[CommonBase.DISABLE] ||
+ availableActions[CommonBase.SERVER_REFRESH_INSTALLATION]);
+
+ _serviceMenu.setEnabled(
+ availableActions[CommonBase.MOVE_UP] ||
+ availableActions[CommonBase.MOVE_DOWN]);
}
void createMenuBar()
@@ -1399,6 +1460,7 @@ public class Model // Actions
//
private Action _newApplication;
+ private Action _newApplicationWithDefaultTemplates;
private Action _connect;
private Action _save;
private Action _discard;
@@ -1411,4 +1473,12 @@ public class Model private CommonBase _actionsTarget;
+ private JMenu _newMenu;
+ private JMenu _newServerMenu;
+ private JMenu _newServiceMenu;
+ private JMenu _newTemplateMenu;
+ private JMenu _appMenu;
+ private JMenu _nodeMenu;
+ private JMenu _serverMenu;
+ private JMenu _serviceMenu;
}
diff --git a/java/src/IceGrid/TreeNode/Adapter.java b/java/src/IceGrid/TreeNode/Adapter.java index 7062875b55d..915b22e4068 100755 --- a/java/src/IceGrid/TreeNode/Adapter.java +++ b/java/src/IceGrid/TreeNode/Adapter.java @@ -164,12 +164,13 @@ class Adapter extends Leaf _descriptor.name = ad.name; _descriptor.id = ad.id; + _descriptor.replicaGroupId = ad.replicaGroupId; + _descriptor.description = ad.description; _descriptor.registerProcess = ad.registerProcess; _descriptor.waitForActivation = ad.waitForActivation; _descriptor.objects = ad.objects; } - Adapter(String adapterName, AdapterDescriptor descriptor, Utils.Resolver resolver, Model model) { diff --git a/java/src/IceGrid/TreeNode/CommonBase.java b/java/src/IceGrid/TreeNode/CommonBase.java index 87e89ee4743..9c197915028 100755 --- a/java/src/IceGrid/TreeNode/CommonBase.java +++ b/java/src/IceGrid/TreeNode/CommonBase.java @@ -140,12 +140,9 @@ public interface CommonBase extends TreeCellRenderer static final int SHUTDOWN_NODE = 22;
static final int APPLICATION_REFRESH_INSTALLATION = 23;
- static final int APPLICATION_REFRESH_INSTALLATION_NO_SHUTDOWN = 24;
+ static final int SERVER_REFRESH_INSTALLATION = 24;
- static final int SERVER_REFRESH_INSTALLATION = 25;
- static final int SERVER_REFRESH_INSTALLATION_NO_SHUTDOWN = 26;
-
- static public final int ACTION_COUNT = 27;
+ static public final int ACTION_COUNT = 25;
boolean[] getAvailableActions();
@@ -177,8 +174,8 @@ public interface CommonBase extends TreeCellRenderer void shutdownNode();
- void applicationRefreshInstallation(boolean shutdown);
- void serverRefreshInstallation(boolean shutdown);
+ void applicationRefreshInstallation();
+ void serverRefreshInstallation();
JPopupMenu getPopupMenu();
}
diff --git a/java/src/IceGrid/TreeNode/CommonBaseI.java b/java/src/IceGrid/TreeNode/CommonBaseI.java index 19ad6087228..de902256c64 100755 --- a/java/src/IceGrid/TreeNode/CommonBaseI.java +++ b/java/src/IceGrid/TreeNode/CommonBaseI.java @@ -272,11 +272,11 @@ abstract class CommonBaseI implements CommonBase {
assert false;
}
- public void applicationRefreshInstallation(boolean shutdown)
+ public void applicationRefreshInstallation()
{
assert false;
}
- public void serverRefreshInstallation(boolean shutdown)
+ public void serverRefreshInstallation()
{
assert false;
}
diff --git a/java/src/IceGrid/TreeNode/DbEnv.java b/java/src/IceGrid/TreeNode/DbEnv.java index 74441e7202a..736ba83dd92 100755 --- a/java/src/IceGrid/TreeNode/DbEnv.java +++ b/java/src/IceGrid/TreeNode/DbEnv.java @@ -95,6 +95,7 @@ class DbEnv extends Leaf DbEnvDescriptor clone = (DbEnvDescriptor)savedDescriptor;
_descriptor.name = clone.name;
_descriptor.dbHome = clone.dbHome;
+ _descriptor.description = clone.description;
_descriptor.properties = clone.properties;
}
diff --git a/java/src/IceGrid/TreeNode/Node.java b/java/src/IceGrid/TreeNode/Node.java index 30ced966957..8fce172f09f 100755 --- a/java/src/IceGrid/TreeNode/Node.java +++ b/java/src/IceGrid/TreeNode/Node.java @@ -279,6 +279,7 @@ class Node extends EditableParent public void restoreDescriptor(Object savedCopy)
{
NodeDescriptor copy = (NodeDescriptor)savedCopy;
+ _descriptor.description = copy.description;
_descriptor.loadFactor = copy.loadFactor;
_descriptor.variables = copy.variables;
}
diff --git a/java/src/IceGrid/TreeNode/NodeEditor.java b/java/src/IceGrid/TreeNode/NodeEditor.java index 4ac68da44dd..6fc3ced302a 100755 --- a/java/src/IceGrid/TreeNode/NodeEditor.java +++ b/java/src/IceGrid/TreeNode/NodeEditor.java @@ -15,9 +15,12 @@ import javax.swing.Action; import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
import javax.swing.JTextField;
import com.jgoodies.forms.builder.DefaultFormBuilder;
+import com.jgoodies.forms.layout.CellConstraints;
import IceGrid.Model;
import IceGrid.NodeDescriptor;
@@ -142,6 +145,7 @@ class NodeEditor extends Editor NodeEditor(JFrame parentFrame)
{
_name.getDocument().addDocumentListener(_updateListener);
+ _description.getDocument().addDocumentListener(_updateListener);
_variables.setEditable(false);
//
@@ -174,6 +178,18 @@ class NodeEditor extends Editor builder.append("Name");
builder.append(_name, 3);
builder.nextLine();
+
+ builder.append("Description");
+ builder.nextLine();
+ builder.append("");
+ builder.nextRow(-2);
+ CellConstraints cc = new CellConstraints();
+ JScrollPane scrollPane = new JScrollPane(_description);
+ builder.add(scrollPane,
+ cc.xywh(builder.getColumn(), builder.getRow(), 3, 3));
+ builder.nextRow(2);
+ builder.nextLine();
+
builder.append("Variables", _variables);
builder.append(_variablesButton);
builder.nextLine();
@@ -191,6 +207,7 @@ class NodeEditor extends Editor void writeDescriptor()
{
NodeDescriptor descriptor = (NodeDescriptor)_target.getDescriptor();
+ descriptor.description = _description.getText();
descriptor.variables = _variablesMap;
descriptor.loadFactor = _loadFactor.getText();
}
@@ -205,20 +222,11 @@ class NodeEditor extends Editor NodeDescriptor descriptor = (NodeDescriptor)_target.getDescriptor();
- if(descriptor == null)
- {
- _variablesMap = new java.util.TreeMap();
- setVariablesField();
- _loadFactor.setText("");
- }
- else
- {
- _variablesMap = descriptor.variables;
- setVariablesField();
-
- _loadFactor.setText(descriptor.loadFactor);
- }
-
+ _description.setText(descriptor.description);
+ _variablesMap = descriptor.variables;
+ setVariablesField();
+ _loadFactor.setText(descriptor.loadFactor);
+
_applyButton.setEnabled(node.isEphemeral());
_discardButton.setEnabled(node.isEphemeral());
detectUpdates(true);
@@ -234,10 +242,10 @@ class NodeEditor extends Editor private JTextField _name = new JTextField(20);
+ private JTextArea _description = new JTextArea(3, 20);
private JTextField _variables = new JTextField(20);
private JButton _variablesButton;
private TableDialog _variablesDialog;
private java.util.TreeMap _variablesMap;
private JTextField _loadFactor = new JTextField(20);
-
}
diff --git a/java/src/IceGrid/TreeNode/ReplicaGroup.java b/java/src/IceGrid/TreeNode/ReplicaGroup.java index 56e1fb145de..78b465335c2 100755 --- a/java/src/IceGrid/TreeNode/ReplicaGroup.java +++ b/java/src/IceGrid/TreeNode/ReplicaGroup.java @@ -99,6 +99,7 @@ class ReplicaGroup extends EditableLeaf {
ReplicaGroupDescriptor clone = (ReplicaGroupDescriptor)savedDescriptor;
_descriptor.id = clone.id;
+ _descriptor.description = clone.description;
_descriptor.objects = clone.objects;
_descriptor.loadBalancing = clone.loadBalancing;
}
diff --git a/java/src/IceGrid/TreeNode/ReplicaGroupEditor.java b/java/src/IceGrid/TreeNode/ReplicaGroupEditor.java index 434bec75a85..3a13e9301ca 100755 --- a/java/src/IceGrid/TreeNode/ReplicaGroupEditor.java +++ b/java/src/IceGrid/TreeNode/ReplicaGroupEditor.java @@ -225,7 +225,7 @@ class ReplicaGroupEditor extends Editor (ReplicaGroupDescriptor)getReplicaGroup().getDescriptor(); descriptor.id = _id.getText(); - // descriptor.description = _description.getText(); + descriptor.description = _description.getText(); descriptor.objects = AdapterEditor.mapToObjectDescriptorSeq(_objectsMap); Object loadBalancing = _loadBalancing.getSelectedItem(); @@ -313,7 +313,7 @@ class ReplicaGroupEditor extends Editor (ReplicaGroupDescriptor)replicaGroup.getDescriptor(); _id.setText(descriptor.id); - //_description.setText(descriptor.description); + _description.setText(descriptor.description); _objectsMap = AdapterEditor.objectDescriptorSeqToMap(descriptor.objects); setObjectsField(); diff --git a/java/src/IceGrid/TreeNode/Root.java b/java/src/IceGrid/TreeNode/Root.java index 5776d33e2ef..bffaeb7f413 100755 --- a/java/src/IceGrid/TreeNode/Root.java +++ b/java/src/IceGrid/TreeNode/Root.java @@ -56,6 +56,21 @@ public class Root extends Parent ""));
}
+ public void newApplication(ApplicationDescriptor descriptor)
+ {
+ descriptor.name = makeNewChildId(descriptor.name);
+
+ Application application = new Application(descriptor, _model);
+ try
+ {
+ addChild(application, true);
+ }
+ catch(UpdateFailedException e)
+ {
+ assert false;
+ }
+ _model.setSelectionPath(application.getPath());
+ }
public Root(Model model)
{
@@ -406,22 +421,7 @@ public class Root extends Parent }
- private void newApplication(ApplicationDescriptor descriptor)
- {
- descriptor.name = makeNewChildId(descriptor.name);
-
- Application application = new Application(descriptor, _model);
- try
- {
- addChild(application, true);
- }
- catch(UpdateFailedException e)
- {
- assert false;
- }
- _model.setSelectionPath(application.getPath());
- }
-
+
String identify(TreePath path)
{
String result = "";
diff --git a/java/src/IceGrid/TreeNode/Server.java b/java/src/IceGrid/TreeNode/Server.java index a9e07721b4b..9381f08bcc1 100755 --- a/java/src/IceGrid/TreeNode/Server.java +++ b/java/src/IceGrid/TreeNode/Server.java @@ -100,9 +100,9 @@ class Server extends EditableParent "",
new java.util.LinkedList(),
new java.util.LinkedList(),
- "on-demand",
- "",
- "",
+ "manual",
+ "0",
+ "0",
new IceGrid.DistributionDescriptor("", new java.util.LinkedList()));
}
@@ -131,9 +131,9 @@ class Server extends EditableParent "",
new java.util.LinkedList(),
new java.util.LinkedList(),
- "on-demand",
- "",
- "",
+ "manual",
+ "0",
+ "0",
new IceGrid.DistributionDescriptor("", new java.util.LinkedList()),
new java.util.LinkedList()
);
|