1 19 20 package org.netbeans.modules.form; 21 22 import org.openide.nodes.*; 23 import org.openide.util.HelpCtx; 24 import org.openide.util.actions.CookieAction; 25 26 30 31 public class DefaultRADAction extends CookieAction { 32 33 37 public String getName() { 38 return "DefaultRADAction"; } 40 41 44 public HelpCtx getHelpCtx() { 45 return new HelpCtx(DefaultRADAction.class); 46 } 47 48 50 protected int mode() { 51 return MODE_EXACTLY_ONE; 52 } 53 54 58 protected Class [] cookieClasses() { 59 return new Class [] { RADComponentCookie.class }; 60 } 61 62 protected boolean asynchronous() { 63 return false; 64 } 65 66 74 87 92 protected void performAction(Node[] activatedNodes) { 93 if (activatedNodes.length == 0) 94 return; 95 96 RADComponentCookie radCookie = (RADComponentCookie) 97 activatedNodes[0].getCookie(RADComponentCookie.class); 98 if (radCookie == null) 99 return; 100 101 radCookie.getRADComponent().attachDefaultEvent(); 105 } 106 } 107 | Popular Tags |