1 19 20 23 24 package org.netbeans.modules.j2ee.sun.ws7.nodes; 25 26 import javax.enterprise.deploy.spi.DeploymentManager ; 27 import javax.enterprise.deploy.spi.Target ; 28 29 import org.openide.nodes.AbstractNode; 30 import org.openide.nodes.Node; 31 import org.openide.nodes.Children; 32 import org.openide.util.Lookup; 33 import org.openide.nodes.Sheet; 34 import org.openide.util.actions.SystemAction; 35 import org.openide.actions.PropertiesAction; 36 import org.netbeans.modules.j2ee.sun.ws7.nodes.actions.UndeployAction; 37 import org.netbeans.modules.j2ee.sun.ws7.nodes.actions.EnableDisableModuleAction; 38 39 import java.util.Collection ; 40 import javax.swing.Action ; 41 45 public class WS70WebModuleNode extends AbstractNode implements Node.Cookie{ 46 47 private WS70WebModule webModule; 48 49 public WS70WebModuleNode(WS70WebModule module) { 50 super(Children.LEAF); 51 this.webModule = module; 52 setDisplayName(module.getName()); 53 getCookieSet().add(module); 54 setIconBaseWithExtension("org/netbeans/modules/j2ee/sun/ws7/resources/DeployedModuleWarIcon.gif"); 55 } 56 public Action getPreferredAction() { 57 return SystemAction.get(PropertiesAction.class); 58 } 59 public Action[] getActions(boolean context) { 60 return new SystemAction[] { 61 SystemAction.get(EnableDisableModuleAction.class), 62 SystemAction.get(UndeployAction.class), 63 SystemAction.get(PropertiesAction.class) 64 }; 65 } 66 public Sheet createSheet() { 67 Sheet sheet = Sheet.createDefault(); 68 69 Sheet.Set ssProp = sheet.get (Sheet.PROPERTIES); 71 if (ssProp == null) { 72 ssProp = Sheet.createPropertiesSet (); 73 sheet.put (ssProp); 74 } 75 return webModule.updateSheet(sheet); 76 } 77 78 } 79 | Popular Tags |