1 19 20 21 package org.netbeans.modules.tasklist.copyright; 22 23 import java.awt.Image ; 24 import java.beans.BeanDescriptor ; 25 import java.beans.IntrospectionException ; 26 import java.beans.PropertyDescriptor ; 27 import java.beans.SimpleBeanInfo ; 28 29 import org.openide.util.NbBundle; 30 import org.openide.util.Utilities; 31 32 36 public class CopyrightSettingsBeanInfo extends SimpleBeanInfo { 37 38 public BeanDescriptor getBeanDescriptor() { 39 BeanDescriptor bdesc = new BeanDescriptor (CopyrightSettings.class); 40 bdesc.setDisplayName(NbBundle.getMessage(CopyrightSettingsBeanInfo.class, 41 "OPTION_COPYRIGHT_SETTINGS_NAME")); bdesc.setShortDescription(NbBundle.getMessage(CopyrightSettingsBeanInfo.class, 43 "HINT_COPYRIGHT_SETTINGS_NAME")); return bdesc; 45 } 46 47 52 public PropertyDescriptor [] getPropertyDescriptors() { 53 54 int i = 0; 55 PropertyDescriptor [] desc = null; 56 try { 57 desc = new PropertyDescriptor []{ 58 new PropertyDescriptor (CopyrightSettings.PROP_SCAN_COPYRIGHT, 59 CopyrightSettings.class) 60 }; 61 62 desc[i].setDisplayName(NbBundle.getMessage( 63 CopyrightSettingsBeanInfo.class, 64 "PROP_SCAN_COPYRIGHT")); desc[i++].setShortDescription(NbBundle.getMessage( 66 CopyrightSettingsBeanInfo.class, 67 "HINT_SCAN_COPYRIGHT")); } catch (IntrospectionException ex) { 69 ex.printStackTrace(); 70 throw new InternalError (); 71 } 72 return desc; 73 } 74 75 76 public Image getIcon(int type) { 77 return Utilities.loadImage("org/netbeans/modules/tasklist/copyright/settings.gif"); } 80 } 81 | Popular Tags |