summaryrefslogtreecommitdiff
path: root/java/src/IceGrid/TreeNode/NodeViewRoot.java
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2005-06-21 15:26:54 +0000
committerBernard Normier <bernard@zeroc.com>2005-06-21 15:26:54 +0000
commit9a746ddb2e8daa9c64211c57825a178f8c7a3581 (patch)
tree66076e0f6b81aa381799cbe2a3b27ee883fc5dcd /java/src/IceGrid/TreeNode/NodeViewRoot.java
parentadded missing file. (diff)
downloadice-9a746ddb2e8daa9c64211c57825a178f8c7a3581.tar.bz2
ice-9a746ddb2e8daa9c64211c57825a178f8c7a3581.tar.xz
ice-9a746ddb2e8daa9c64211c57825a178f8c7a3581.zip
Initial commit for the IceGrid Admin GUI
Diffstat (limited to 'java/src/IceGrid/TreeNode/NodeViewRoot.java')
-rwxr-xr-xjava/src/IceGrid/TreeNode/NodeViewRoot.java52
1 files changed, 52 insertions, 0 deletions
diff --git a/java/src/IceGrid/TreeNode/NodeViewRoot.java b/java/src/IceGrid/TreeNode/NodeViewRoot.java
new file mode 100755
index 00000000000..5300782b8c4
--- /dev/null
+++ b/java/src/IceGrid/TreeNode/NodeViewRoot.java
@@ -0,0 +1,52 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2005 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+package IceGrid.TreeNode;
+
+import IceGrid.ApplicationDescriptor;
+import IceGrid.TreeModelI;
+
+public class NodeViewRoot extends Parent
+{
+ public NodeViewRoot()
+ {
+ super(TreeModelI.NODE_VIEW);
+ }
+
+ public void init(ApplicationDescriptor[] applications)
+ {
+ assert(_children.size() == 0);
+
+ for(int i = 0; i < applications.length; ++i)
+ {
+ for(int j = 0 ; j < applications[i].nodes.length; ++j)
+ {
+ String nodeName = applications[i].nodes[j].name;
+ if(!_nodeMap.containsKey(nodeName))
+ {
+ Node child = new Node(nodeName);
+ addChild(child);
+ child.addParent(this);
+ _nodeMap.put(nodeName, child);
+ }
+ }
+ }
+ }
+
+ Node findNode(String name)
+ {
+ return (Node)_nodeMap.get(name);
+ }
+
+ public String toString()
+ {
+ return "Nodes";
+ }
+
+ private java.util.Map _nodeMap = new java.util.HashMap();
+}