KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > j2ee > oc4j > nodes > OC4JTargetNode


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19 package org.netbeans.modules.j2ee.oc4j.nodes;
20
21 import org.openide.nodes.AbstractNode;
22 import org.openide.nodes.Children;
23 import org.openide.nodes.Node;
24 import org.openide.util.Lookup;
25 import org.openide.util.NbBundle;
26
27 /**
28  *
29  * @author Michal Mocnak
30  */

31 public class OC4JTargetNode extends AbstractNode {
32     
33     public OC4JTargetNode(Lookup lookup) {
34         super(new Children.Array());
35         
36         // J2EE Applications
37
getChildren().add(new Node[] {
38             new OC4JItemNode(lookup,
39                     new OC4JJ2EEApplicationsChildren(lookup),
40                     NbBundle.getMessage(OC4JTargetNode.class, "LBL_Apps"),
41                     OC4JItemNode.ItemType.J2EE_APPLICATION_FOLDER)
42         });
43         
44         // Native Data Sources
45
getChildren().add(new Node[] {
46             new OC4JItemNode(lookup,
47                     new OC4JNativeDataSourcesChildren(lookup),
48                     NbBundle.getMessage(OC4JTargetNode.class, "LBL_NativeDataSources"),
49                     OC4JItemNode.ItemType.REFRESHABLE_FOLDER)
50         });
51         
52         // Managed Data Sources
53
getChildren().add(new Node[] {
54             new OC4JItemNode(lookup,
55                     new OC4JManagedDataSourcesChildren(lookup),
56                     NbBundle.getMessage(OC4JTargetNode.class, "LBL_ManagedDataSources"),
57                     OC4JItemNode.ItemType.REFRESHABLE_FOLDER)
58         });
59         
60         // Connection Pools
61
getChildren().add(new Node[] {
62             new OC4JItemNode(lookup,
63                     new OC4JConnectionPoolsChildren(lookup),
64                     NbBundle.getMessage(OC4JTargetNode.class, "LBL_ConnectionPools"),
65                     OC4JItemNode.ItemType.REFRESHABLE_FOLDER)
66         });
67     }
68 }
Popular Tags