KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > java > editor > options > JavaOptionsBeanInfo


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.java.editor.options;
21
22 import java.beans.*;
23 import java.util.MissingResourceException JavaDoc;
24 import org.netbeans.modules.editor.options.BaseOptions;
25 import org.netbeans.modules.editor.options.BaseOptionsBeanInfo;
26 import org.openide.util.NbBundle;
27
28 import org.openide.util.NbBundle;
29
30 /** BeanInfo for plain options
31 *
32 * @author Miloslav Metelka
33 * @version 1.00
34 */

35 public class JavaOptionsBeanInfo extends BaseOptionsBeanInfo {
36
37     private static final String JavaDoc[] EXPERT_PROP_NAMES = new String JavaDoc[] {
38         JavaOptions.JAVADOC_BGCOLOR,
39         JavaOptions.JAVADOC_AUTO_POPUP_DELAY_PROP,
40         JavaOptions.JAVADOC_PREFERRED_SIZE_PROP,
41         JavaOptions.JAVADOC_AUTO_POPUP_PROP,
42         JavaOptions.COMPLETION_CASE_SENSITIVE_PROP,
43         JavaOptions.SHOW_DEPRECATED_MEMBERS_PROP,
44         JavaOptions.COMPLETION_INSTANT_SUBSTITUTION_PROP,
45         JavaOptions.COMPLETION_NATURAL_SORT_PROP,
46         JavaOptions.FAST_IMPORT_PACKAGE_PROP,
47     JavaOptions.PAIR_CHARACTERS_COMPLETION
48             };
49
50     
51     public JavaOptionsBeanInfo() {
52         super("/org/netbeans/modules/java/editor/resources/javaOptions"); // NOI18N
53

54     }
55
56     protected String JavaDoc[] getPropNames() {
57         return JavaOptions.JAVA_PROP_NAMES;
58     }
59
60     protected void updatePropertyDescriptors() {
61         super.updatePropertyDescriptors();
62
63         setExpert(EXPERT_PROP_NAMES);
64         setHidden(new String JavaDoc[] {
65             JavaOptions.FORMAT_SPACE_BEFORE_PARENTHESIS_PROP,
66             JavaOptions.FORMAT_COMPOUND_BRACKET_ADD_NL_PROP,
67             JavaOptions.FAST_IMPORT_PACKAGE_PROP,
68             JavaOptions.GOTO_CLASS_CASE_SENSITIVE_PROP,
69             JavaOptions.GOTO_CLASS_SHOW_INNER_CLASSES_PROP,
70             JavaOptions.GOTO_CLASS_SHOW_LIBRARY_CLASSES_PROP
71         });
72         setPropertyEditor(BaseOptions.CODE_FOLDING_PROPS_PROP, CodeFoldingEditor.class, false);
73     }
74
75     protected Class JavaDoc getBeanClass() {
76         return JavaOptions.class;
77     }
78
79     /**
80      * Get localized string
81      */

82     protected String JavaDoc getString(String JavaDoc key) {
83         try {
84             return NbBundle.getMessage(JavaOptionsBeanInfo.class, key);
85         } catch (MissingResourceException JavaDoc e) {
86             return super.getString(key);
87         }
88     }
89
90 }
91
Popular Tags