1 19 20 package org.netbeans.modules.javadoc.search; 21 22 import java.awt.Image ; 23 import java.beans.BeanDescriptor ; 24 import java.beans.IntrospectionException ; 25 import java.beans.PropertyDescriptor ; 26 import java.beans.SimpleBeanInfo ; 27 28 import org.openide.util.NbBundle; 29 import org.openide.util.Utilities; 30 31 public class Jdk12SearchTypeBeanInfo extends SimpleBeanInfo { 32 33 34 public BeanDescriptor getBeanDescriptor () { 35 BeanDescriptor descr = new BeanDescriptor (org.netbeans.modules.javadoc.search.Jdk12SearchType.class); 36 descr.setName(NbBundle.getMessage(Jdk12SearchTypeBeanInfo.class, "PROP_Jdk12SearchType")); descr.setValue ("version", "1.1"); return descr; 39 } 40 41 44 public PropertyDescriptor [] getPropertyDescriptors () { 45 PropertyDescriptor [] desc; 46 try { 47 desc = new PropertyDescriptor []{ 48 new PropertyDescriptor ("caseSensitive", Jdk12SearchType.class) }; 50 51 desc[0].setDisplayName(NbBundle.getMessage(Jdk12SearchTypeBeanInfo.class, "PROP_CaseSensitive")); desc[0].setShortDescription(NbBundle.getMessage(Jdk12SearchTypeBeanInfo.class, "HINT_CaseSensitive")); } catch (IntrospectionException ex) { 54 ex.printStackTrace (); 55 return null; 56 } 57 return desc; 58 } 59 60 61 public Image getIcon(int type) { 62 return Utilities.loadImage("org/netbeans/modules/javadoc/resources/searchDoc.gif"); } 64 } | Popular Tags |