1 19 20 package org.netbeans.modules.javadoc.settings; 21 22 import java.awt.Image ; 23 import java.beans.*; 24 25 import org.openide.util.NbBundle; 26 import org.netbeans.modules.javadoc.search.JavadocSearchType; 27 import org.openide.util.Utilities; 28 29 33 public class DocumentationSettingsBeanInfo extends SimpleBeanInfo { 34 35 36 public BeanDescriptor getBeanDescriptor() { 37 BeanDescriptor descr = new BeanDescriptor(org.netbeans.modules.javadoc.search.Jdk12SearchType_japan.class); 38 descr.setDisplayName(NbBundle.getBundle(DocumentationSettings.class).getString("CTL_Documentation_settings")); descr.setValue ("version", "1.1"); descr.setValue ("global", Boolean.FALSE); return descr; 42 } 43 44 47 public PropertyDescriptor[] getPropertyDescriptors () { 48 PropertyDescriptor[] desc; 49 try { 50 desc = new PropertyDescriptor[] { 51 new PropertyDescriptor("autocommentModifierMask", DocumentationSettings.class), new PropertyDescriptor("autocommentPackage", DocumentationSettings.class), new PropertyDescriptor("autocommentErrorMask", DocumentationSettings.class), new PropertyDescriptor("idxSearchSort", DocumentationSettings.class), new PropertyDescriptor("idxSearchNoHtml", DocumentationSettings.class), new PropertyDescriptor("idxSearchSplit", DocumentationSettings.class), new PropertyDescriptor("autocommentSplit", DocumentationSettings.class), new PropertyDescriptor("searchEngine", DocumentationSettings.class), new PropertyDescriptor("fileSystemSettings", DocumentationSettings.class), }; 61 62 desc[0].setDisplayName("autocommentModifierMask"); desc[0].setHidden( true ); 64 desc[1].setDisplayName("autocommentPackage"); desc[1].setHidden( true ); 66 desc[2].setDisplayName("autocommentErrorMask"); desc[2].setHidden( true ); 68 desc[3].setDisplayName("idxSearchSort"); desc[3].setHidden( true ); 70 desc[4].setDisplayName("idxSearchNoHtml"); desc[4].setHidden( true ); 72 desc[5].setDisplayName("idxSearchSplit"); desc[5].setHidden( true ); 74 desc[6].setDisplayName("autocommentSplit"); desc[6].setHidden( true ); 76 desc[7].setDisplayName(NbBundle.getMessage(DocumentationSettingsBeanInfo.class, "PROP_SetDefaultSearchEngine")); desc[7].setShortDescription(NbBundle.getMessage(DocumentationSettingsBeanInfo.class, "HINT_SetDefaultSearchEngine")); desc[7].setValue("superClass", JavadocSearchType.class); desc[8].setDisplayName("fileSystemSettings"); desc[8].setHidden(true); } catch (IntrospectionException ex) { 82 ex.printStackTrace (); 83 return null; 84 } 85 return desc; 86 } 87 88 89 public Image getIcon(int type) { 90 if ((type == java.beans.BeanInfo.ICON_COLOR_16x16) || (type == java.beans.BeanInfo.ICON_MONO_16x16)) { 91 return Utilities.loadImage("org/netbeans/modules/javadoc/resources/JavadocSettings.gif"); } else { 93 return Utilities.loadImage ("org/netbeans/modules/javadoc/resources/JavadocSettings32.gif"); } 95 } 96 } 97 | Popular Tags |