KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > css > options > CssOptions


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 /*
21  * CssOptions.java
22  *
23  * Created on December 9, 2004, 5:02 PM
24  */

25
26 package org.netbeans.modules.css.options;
27
28 import org.netbeans.modules.css.editor.CssEditorKit;
29 import java.util.MissingResourceException JavaDoc;
30 import org.netbeans.editor.LocaleSupport;
31 import org.netbeans.modules.editor.options.BaseOptions;
32 import org.openide.util.HelpCtx;
33 import org.openide.util.NbBundle;
34
35 /**
36  * Options for the CSS Editor
37  * @author Winston Prakash
38  * @version 1.0
39  */

40 public class CssOptions extends BaseOptions {
41     private static final String JavaDoc HELP_ID = "editing.editor.css"; // NOI18N
42

43     /**
44      * CSS option editor gets the locale for the Coloring Token Names displayed
45      * in the Option Editor
46      */

47     public static final LocaleSupport.Localizer localizer = new LocaleSupport.Localizer() {
48         public String JavaDoc getString(String JavaDoc key) {
49             try {
50                 return NbBundle.getBundle(CssOptions.class).getString(key);
51             } catch(MissingResourceException JavaDoc mre) {
52                 return null;
53             }
54         }
55     };
56
57     /** Creates a new instance of CssOptions */
58     public CssOptions() {
59         super(CssEditorKit.class, "CSS"); //NOI18N
60
LocaleSupport.addLocalizer(localizer);
61     }
62
63 // protected Class getDefaultIndentEngineClass() {
64
// return CssIndentEngine.class;
65
// }
66

67     /** Set the display name that will appear in the option editor*/
68     public String JavaDoc displayName() {
69         return NbBundle.getMessage(CssOptions.class, "OPTIONS_CSS");
70     }
71
72     public HelpCtx getHelpCtx() {
73         return new HelpCtx(HELP_ID);
74     }
75
76 }
77
Popular Tags