1 19 package org.netbeans.progress.module; 20 21 import org.netbeans.progress.spi.InternalHandle; 22 import org.openide.util.HelpCtx; 23 import org.openide.util.NbBundle; 24 import org.openide.util.actions.CallableSystemAction; 25 26 public final class CancelAction extends CallableSystemAction { 27 28 public void performAction() { 29 InternalHandle handle = Controller.getDefault().getModel().getSelectedHandle(); 31 if (handle != null) { 32 handle.requestCancel(); 33 } 34 } 35 36 public String getName() { 37 return NbBundle.getMessage(CancelAction.class, "CTL_CancelAction"); 38 } 39 40 protected void initialize() { 41 super.initialize(); 42 putValue("noIconInMenu", Boolean.TRUE); 44 } 45 46 public HelpCtx getHelpCtx() { 47 return HelpCtx.DEFAULT_HELP; 48 } 49 50 protected boolean asynchronous() { 51 return true; 52 } 53 54 } 55 | Popular Tags |