diff options
author | Bernard Normier <bernard@zeroc.com> | 2005-06-21 15:26:54 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2005-06-21 15:26:54 +0000 |
commit | 9a746ddb2e8daa9c64211c57825a178f8c7a3581 (patch) | |
tree | 66076e0f6b81aa381799cbe2a3b27ee883fc5dcd /java/src/IceGrid/TreeNode/ApplicationViewRoot.java | |
parent | added missing file. (diff) | |
download | ice-9a746ddb2e8daa9c64211c57825a178f8c7a3581.tar.bz2 ice-9a746ddb2e8daa9c64211c57825a178f8c7a3581.tar.xz ice-9a746ddb2e8daa9c64211c57825a178f8c7a3581.zip |
Initial commit for the IceGrid Admin GUI
Diffstat (limited to 'java/src/IceGrid/TreeNode/ApplicationViewRoot.java')
-rwxr-xr-x | java/src/IceGrid/TreeNode/ApplicationViewRoot.java | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/java/src/IceGrid/TreeNode/ApplicationViewRoot.java b/java/src/IceGrid/TreeNode/ApplicationViewRoot.java new file mode 100755 index 00000000000..752bcf89327 --- /dev/null +++ b/java/src/IceGrid/TreeNode/ApplicationViewRoot.java @@ -0,0 +1,53 @@ +// **********************************************************************
+//
+// 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 ApplicationViewRoot extends Parent
+{
+ public ApplicationViewRoot(NodeViewRoot nodeViewRoot)
+ {
+ super(TreeModelI.APPLICATION_VIEW);
+ _nodeViewRoot = nodeViewRoot;
+ }
+
+ //
+ // The node view root must be (re-)initialized before the application view root
+ //
+ public void init(ApplicationDescriptor[] descriptors)
+ {
+ assert(_children.size() == 0);
+
+ _descriptors = descriptors;
+
+ for(int i = 0; i < descriptors.length; ++i)
+ {
+ Application child = new Application(descriptors[i], _nodeViewRoot);
+ addChild(child);
+ child.addParent(this);
+ }
+
+ //
+ // Fire structure change for both application and node views
+ //
+ fireStructureChanged(this);
+ _nodeViewRoot.fireStructureChanged(this);
+ }
+
+
+ public String toString()
+ {
+ return "Applications";
+ }
+
+ private ApplicationDescriptor[] _descriptors;
+ private NodeViewRoot _nodeViewRoot;
+}
|