1 19 package org.netbeans.modules.websvc.core.jaxws.nodes; 20 21 import java.awt.Image ; 22 import org.netbeans.modules.websvc.api.jaxws.wsdlmodel.WsdlPort; 23 import org.openide.filesystems.FileObject; 24 import org.openide.nodes.AbstractNode; 25 import org.openide.nodes.Children; 26 import org.openide.util.HelpCtx; 27 import org.openide.util.Utilities; 28 import org.openide.util.lookup.AbstractLookup; 29 import org.openide.util.lookup.InstanceContent; 30 31 35 public class PortNode extends AbstractNode { 36 WsdlPort port; 37 FileObject srcRoot; 38 39 public PortNode(WsdlPort port) { 40 this(port, new InstanceContent()); 41 } 42 43 private PortNode(WsdlPort port, InstanceContent content) { 44 super(new PortChildren(port),new AbstractLookup(content)); 45 this.port=port; 46 setName(port.getName()); 47 setDisplayName(port.getName()); 48 content.add(port); 49 } 50 51 public Image getIcon(int type){ 52 return Utilities.loadImage("org/netbeans/modules/websvc/core/webservices/ui/resources/wsport.png"); } 54 55 public Image getOpenedIcon(int type){ 56 return getIcon( type); 57 } 58 59 public HelpCtx getHelpCtx() { 60 return HelpCtx.DEFAULT_HELP; 61 } 62 63 public boolean canDestroy() { 65 return false; 66 } 67 68 } | Popular Tags |