1 19 20 package org.netbeans.modules.j2ee.jboss4.nodes; 21 22 import java.awt.Image ; 23 import javax.enterprise.deploy.shared.ModuleType ; 24 import javax.swing.Action ; 25 import org.netbeans.modules.j2ee.deployment.plugins.api.UISupport; 26 import org.netbeans.modules.j2ee.deployment.plugins.api.UISupport.ServerIcon; 27 import org.netbeans.modules.j2ee.jboss4.nodes.actions.UndeployModuleAction; 28 import org.netbeans.modules.j2ee.jboss4.nodes.actions.UndeployModuleCookieImpl; 29 import org.openide.nodes.AbstractNode; 30 import org.openide.util.Lookup; 31 import org.openide.util.actions.SystemAction; 32 33 38 public class JBEarApplicationNode extends AbstractNode { 39 40 public JBEarApplicationNode(String fileName, Lookup lookup) { 41 super(new JBEarModulesChildren(lookup, fileName)); 42 setDisplayName(fileName.substring(0, fileName.indexOf('.'))); 43 getCookieSet().add(new UndeployModuleCookieImpl(fileName, ModuleType.EAR, lookup)); 44 } 45 46 public Action [] getActions(boolean context){ 47 return new SystemAction[] { 48 SystemAction.get(UndeployModuleAction.class) 49 }; 50 } 51 52 public Image getIcon(int type) { 53 return UISupport.getIcon(ServerIcon.EAR_ARCHIVE); 54 } 55 56 public Image getOpenedIcon(int type) { 57 return getIcon(type); 58 } 59 } | Popular Tags |