1 19 20 21 package org.netbeans.modules.tasklist.docscan; 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 37 public final class SettingsBeanInfo extends SimpleBeanInfo { 38 39 public BeanDescriptor getBeanDescriptor() { 40 BeanDescriptor bdesc = new BeanDescriptor (Settings.class); 41 bdesc.setDisplayName(NbBundle.getMessage(SettingsBeanInfo.class, 42 "OPTION_TASK_SETTINGS_NAME")); bdesc.setShortDescription(NbBundle.getMessage(SettingsBeanInfo.class, 44 "HINT_TASK_SETTINGS_NAME")); return bdesc; 46 } 47 48 53 public PropertyDescriptor [] getPropertyDescriptors() { 54 55 int i = 0; 56 PropertyDescriptor [] desc = null; 57 try { 58 desc = new PropertyDescriptor []{ 59 new PropertyDescriptor (Settings.PROP_SCAN_SKIP, 60 Settings.class), 61 new PropertyDescriptor (Settings.PROP_SCAN_TAGS, 62 Settings.class), 63 new PropertyDescriptor (Settings.PROP_MODIFICATION_TIME, Settings.class), 64 new PropertyDescriptor (Settings.PROP_USABILITY_LIMIT, Settings.class), 65 }; 66 67 desc[i].setDisplayName(NbBundle.getMessage( 68 SettingsBeanInfo.class, 69 "PROP_SCAN_SKIP")); desc[i++].setShortDescription(NbBundle.getMessage( 71 SettingsBeanInfo.class, 72 "HINT_SCAN_SKIP")); desc[i].setDisplayName(NbBundle.getMessage( 74 SettingsBeanInfo.class, 75 "PROP_SCAN_TAGS")); desc[i].setPropertyEditorClass(TaskTagEditor.class); 77 desc[i++].setShortDescription(NbBundle.getMessage( 78 SettingsBeanInfo.class, 79 "HINT_SCAN_TAGS")); desc[i++].setHidden(true); 81 82 desc[i].setDisplayName(NbBundle.getMessage( 83 SettingsBeanInfo.class,"BK0002")); desc[i].setExpert(true); 85 desc[i++].setShortDescription(NbBundle.getMessage( 86 SettingsBeanInfo.class,"BK0003")); } catch (IntrospectionException ex) { 88 ex.printStackTrace(); 89 throw new InternalError (); 90 } 91 return desc; 92 } 93 94 95 public Image getIcon(int type) { 96 return Utilities.loadImage("org/netbeans/modules/tasklist/docscan/settings.gif"); } 99 } 100 | Popular Tags |