1 19 20 package org.netbeans.modules.tasklist.suggestions; 21 22 import java.awt.Dialog ; 23 import java.awt.Dimension ; 24 import org.openide.DialogDescriptor; 25 import org.openide.DialogDisplayer; 26 import org.openide.NotifyDescriptor; 27 import org.openide.util.HelpCtx; 28 import org.openide.util.NbBundle; 29 import org.openide.util.actions.CallableSystemAction; 30 31 36 public final class EditTypesAction extends CallableSystemAction { 37 38 private static final long serialVersionUID = 1; 39 40 public void performAction() { 41 TypesCustomizer panel = new TypesCustomizer(); 42 panel.setPreferredSize(new Dimension (550,550)); 43 DialogDescriptor d = new DialogDescriptor(panel, 44 NbBundle.getMessage(EditTypesAction.class, 45 "TITLE_typecustomizer")); d.setModal(true); 47 d.setMessageType(NotifyDescriptor.PLAIN_MESSAGE); 48 d.setOptionType(NotifyDescriptor.OK_CANCEL_OPTION); 49 Dialog dlg = DialogDisplayer.getDefault().createDialog(d); 51 dlg.pack(); 52 dlg.show(); 53 if (d.getValue() == NotifyDescriptor.OK_OPTION) { 54 panel.apply(); 55 } 56 } 57 58 protected boolean asynchronous() { 59 return false; 60 } 61 62 63 public String getName() { 64 return NbBundle.getMessage(EditTypesAction.class, 65 "EditTypes"); } 67 68 protected String iconResource() { 69 return "org/netbeans/modules/tasklist/suggestions/editTypesAction.gif"; } 71 72 public HelpCtx getHelpCtx() { 73 return HelpCtx.DEFAULT_HELP; 74 } 77 } 78 | Popular Tags |