1 19 20 package org.netbeans.modules.j2ee.jboss4.nodes; 21 22 import javax.enterprise.deploy.shared.ModuleType ; 23 import org.openide.nodes.AbstractNode; 24 import org.openide.nodes.Children; 25 import org.openide.nodes.Node; 26 import org.openide.util.Lookup; 27 import org.openide.util.NbBundle; 28 29 34 public class JBApplicationsChildren extends Children.Keys { 35 36 JBApplicationsChildren(Lookup lookup) { 37 setKeys(new Object [] {createEarApplicationsNode(lookup), 38 createEjbModulesNode(lookup), 39 createWebApplicationsNode(lookup)}); 40 } 41 42 protected void addNotify() { 43 } 44 45 protected void removeNotify() { 46 } 47 48 protected org.openide.nodes.Node[] createNodes(Object key) { 49 if (key instanceof AbstractNode){ 50 return new Node[]{(AbstractNode)key}; 51 } 52 53 return null; 54 } 55 56 59 public static JBItemNode createEarApplicationsNode(Lookup lookup) { 60 return new JBItemNode(new JBEarApplicationsChildren(lookup), NbBundle.getMessage(JBTargetNode.class, "LBL_EarApps"), ModuleType.EAR); 61 } 62 63 66 public static JBItemNode createWebApplicationsNode(Lookup lookup) { 67 return new JBItemNode(new JBWebApplicationsChildren(lookup), NbBundle.getMessage(JBTargetNode.class, "LBL_WebApps"), ModuleType.WAR); 68 } 69 70 73 public static JBItemNode createEjbModulesNode(Lookup lookup) { 74 return new JBItemNode(new JBEjbModulesChildren(lookup), NbBundle.getMessage(JBTargetNode.class, "LBL_EjbModules"), ModuleType.EJB); 75 } 76 } | Popular Tags |