1 19 20 package org.netbeans.modules.xml.wsdl.ui.view.treeeditor; 21 22 import java.awt.Image ; 23 24 import javax.swing.Action ; 25 26 import org.openide.actions.PropertiesAction; 27 import org.openide.nodes.AbstractNode; 28 import org.openide.nodes.Children; 29 import org.openide.util.Utilities; 30 import org.openide.util.actions.SystemAction; 31 32 38 public class PropertyNode extends AbstractNode { 39 40 private Image ICON = Utilities.loadImage 41 ("org/netbeans/modules/xml/wsdl/ui/view/resources/property.png"); 42 43 44 protected Property mWSDLConstruct; 45 46 public PropertyNode(Property wsdlConstruct) { 47 super(Children.LEAF); 48 mWSDLConstruct = wsdlConstruct; 49 this.setDisplayName(mWSDLConstruct.getName()); 50 } 51 52 public Image getIcon(int type) { 53 return ICON; 54 } 55 56 public Image getOpenedIcon(int type) { 57 return ICON; 58 } 59 60 public Action [] getActions(boolean context) { 61 SystemAction[] sysAction = new SystemAction[]{ 62 SystemAction.get(PropertiesAction.class) 63 }; 64 65 return sysAction; 66 } 67 68 public Object getWSDLConstruct() { 69 return mWSDLConstruct; 70 } 71 72 } 73 | Popular Tags |