1 19 20 21 package org.netbeans.modules.pdf; 22 23 24 import java.awt.Image ; 25 import java.beans.BeanInfo ; 26 import java.beans.BeanDescriptor ; 27 import java.beans.IntrospectionException ; 28 import java.beans.PropertyDescriptor ; 29 import java.beans.SimpleBeanInfo ; 30 31 import org.openide.ErrorManager; 32 import org.openide.util.NbBundle; 33 import org.openide.util.Utilities; 34 35 36 40 public class SettingsBeanInfo extends SimpleBeanInfo { 41 42 43 public PropertyDescriptor [] getPropertyDescriptors () { 44 try { 45 PropertyDescriptor pdfviewer = new PropertyDescriptor ("PDFViewer", Settings.class); 46 pdfviewer.setDisplayName (NbBundle.getMessage (SettingsBeanInfo.class, "PROP_pdfviewer")); 47 pdfviewer.setShortDescription (NbBundle.getMessage (SettingsBeanInfo.class, "HINT_pdfviewer")); 48 return new PropertyDescriptor [] { pdfviewer }; 49 } catch (IntrospectionException ie) { 50 ErrorManager.getDefault().notify(ie); 51 52 return null; 53 } 54 } 55 56 67 public BeanDescriptor getBeanDescriptor () { 68 BeanDescriptor desc = new BeanDescriptor (Settings.class); 69 70 return desc; 71 } 72 73 74 public Image getIcon (int type) { 75 return Utilities.loadImage("org/netbeans/modules/pdf/PDFDataIcon.png"); } 77 78 } 79 | Popular Tags |