KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > web > core > palette > JSPPaletteCustomizerAction


1 /*
2  * HTMLPaletteCustomizerAction.java
3  *
4  * Created on October 27, 2005, 10:49 AM
5  *
6  * To change this template, choose Tools | Options and locate the template under
7  * the Source Creation and Management node. Right-click the template and choose
8  * Open. You can then make changes to the template in the Source Editor.
9  */

10
11 package org.netbeans.modules.web.core.palette;
12
13 import java.io.IOException JavaDoc;
14 import org.openide.ErrorManager;
15 import org.openide.util.HelpCtx;
16 import org.openide.util.NbBundle;
17 import org.openide.util.actions.CallableSystemAction;
18
19 /**
20  *
21  * @author lk155162
22  */

23 public class JSPPaletteCustomizerAction extends CallableSystemAction {
24
25     private static String JavaDoc name;
26     
27     public JSPPaletteCustomizerAction () {
28         putValue("noIconInMenu", Boolean.TRUE); // NOI18N
29
}
30
31     protected boolean asynchronous() {
32         return false;
33     }
34
35     /** Human presentable name of the action. This should be
36      * presented as an item in a menu.
37      * @return the name of the action
38      */

39     public String JavaDoc getName() {
40         if (name == null)
41             name = NbBundle.getBundle(JSPPaletteCustomizerAction.class).getString("ACT_OpenJSPCustomizer"); // NOI18N
42

43         return name;
44     }
45
46     /** Help context where to find more about the action.
47      * @return the help context for this action
48      */

49     public HelpCtx getHelpCtx() {
50         return null;
51     }
52
53     /** This method is called by one of the "invokers" as a result of
54      * some user's action that should lead to actual "performing" of the action.
55      */

56     public void performAction() {
57         try {
58             JSPPaletteFactory.getPalette().showCustomizer();
59         }
60         catch (IOException JavaDoc ioe) {
61             ErrorManager.getDefault().notify(ErrorManager.EXCEPTION, ioe);
62         }
63     }
64
65 }
66
Popular Tags