1 19 20 package org.netbeans.modules.websvc.registry.nodes; 21 22 import org.openide.actions.*; 23 import org.openide.nodes.*; 24 import org.openide.util.HelpCtx; 25 import org.openide.util.NbBundle; 26 import org.openide.util.Utilities; 27 import org.openide.util.actions.SystemAction; 28 29 import org.netbeans.modules.websvc.registry.actions.*; 30 import org.netbeans.modules.websvc.registry.model.WebServiceGroup; 31 import org.netbeans.modules.websvc.registry.model.WebServiceListModel; 32 import java.awt.Image ; 33 import javax.swing.ImageIcon ; 34 import javax.swing.Action ; 35 36 40 public class WebServicesRootNode extends AbstractNode implements WebServiceGroupCookie , org.netbeans.modules.websvc.registry.netbeans.WebServicesRootNodeInterface{ 41 42 public WebServicesRootNode() { 43 super(Children.LEAF); setName("default"); 45 setDisplayName(NbBundle.getMessage(WebServicesRootNode.class, "Web_Services")); 46 setShortDescription(NbBundle.getMessage(WebServicesRootNode.class, "Web_Services")); 47 setIconBaseWithExtension("org/netbeans/modules/websvc/registry/resources/webservicegroup.png"); 48 getCookieSet().add(this); 49 } 50 51 public WebServiceGroup getWebServiceGroup(){ 52 return WebServiceListModel.getInstance().getWebServiceGroup("default"); 53 } 54 55 56 57 public Action[] getActions(boolean context) { 58 return new SystemAction[] { 59 SystemAction.get(AddWebServiceAction.class), 60 SystemAction.get(AddWebServiceGroupAction.class), 61 }; 62 } 63 64 public Action getPreferredAction() { 65 return SystemAction.get(AddWebServiceAction.class); 66 } 67 68 public HelpCtx getHelpCtx() { 69 return new HelpCtx("server_nav_web_svcs_node"); 70 } 71 72 73 } 74 | Popular Tags |