1 19 20 package org.netbeans.modules.xml.catalog.user; 21 22 import java.beans.PropertyDescriptor ; 23 import java.beans.SimpleBeanInfo ; 24 import org.openide.util.NbBundle; 25 26 30 public class UserXMLCatalogBeanInfo extends SimpleBeanInfo { 31 32 public UserXMLCatalogBeanInfo() {} 33 34 private static final int PROPERTY_displayName = 0; 35 private static final int PROPERTY_shortDescription = 1; 36 37 public PropertyDescriptor [] getPropertyDescriptors() { 38 PropertyDescriptor [] properties = new PropertyDescriptor [2]; 39 40 try { 41 properties[PROPERTY_displayName] = new PropertyDescriptor ("displayName", UserXMLCatalog.class, "getDisplayName", null); 42 properties[PROPERTY_displayName].setDisplayName (NbBundle.getMessage(UserXMLCatalog.class,"PROP_catalog_name")); 43 properties[PROPERTY_displayName].setShortDescription (NbBundle.getMessage(UserXMLCatalog.class,"HINT_catalog_name")); 44 properties[PROPERTY_shortDescription] = new PropertyDescriptor ( "shortDescription", UserXMLCatalog.class, "getShortDescription", null ); 45 properties[PROPERTY_shortDescription].setDisplayName (NbBundle.getMessage(UserXMLCatalog.class,"PROP_catalog_desc")); 46 properties[PROPERTY_shortDescription].setShortDescription (NbBundle.getMessage(UserXMLCatalog.class,"HINT_catalog_desc")); 47 } catch( java.beans.IntrospectionException e) { 48 } 49 return properties; 50 } 51 52 } 53 | Popular Tags |