KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > languages > dataobject > LanguagesOptionsBeanInfo


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-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.languages.dataobject;
21
22 import org.netbeans.modules.editor.options.BaseOptionsBeanInfo;
23 import org.netbeans.modules.editor.options.OptionSupport;
24 import org.openide.util.NbBundle;
25 import java.util.MissingResourceException JavaDoc;
26
27 /**
28  *
29  * @author Administrator
30  */

31 public class LanguagesOptionsBeanInfo extends BaseOptionsBeanInfo {
32     
33     /**
34      * Constructor. The parameter in the superclass constructor is the
35      * icon prefix.
36      */

37     public LanguagesOptionsBeanInfo() {
38         super("/org/netbeans/modules/languages/options/mfOptions"); // NOI18N
39
}
40     
41     /*
42      * Gets the property names after merging it with the set of properties
43      * available from the BaseOptions from the editor module
44      */

45     protected String JavaDoc[] getPropNames() {
46         return OptionSupport.mergeStringArrays(
47                 super.getPropNames(),
48                 LanguagesOptions.LANGUAGES_PROP_NAMES);
49     }
50     
51     /**
52      * Get the class described by this bean info
53      */

54     protected Class JavaDoc getBeanClass() {
55         return LanguagesOptions.class;
56     }
57     
58     /**
59      * Look up a resource bundle message, if it is not found locally defer to
60      * the super implementation
61      */

62     protected String JavaDoc getString(String JavaDoc key) {
63         try {
64             return NbBundle.getMessage(LanguagesOptionsBeanInfo.class, key);
65         } catch (MissingResourceException JavaDoc e) {
66             return super.getString(key);
67         }
68     }
69 }
Popular Tags