1 19 20 package org.netbeans.core; 21 22 import java.awt.Image ; 23 import java.beans.*; 24 import org.openide.util.Exceptions; 25 26 import org.openide.util.NbBundle; 27 import org.openide.util.Utilities; 28 29 33 public class IDESettingsBeanInfo extends SimpleBeanInfo { 34 35 36 public PropertyDescriptor[] getPropertyDescriptors() { 37 try { 38 PropertyDescriptor[] desc = new PropertyDescriptor[] { 39 new PropertyDescriptor (IDESettings.PROP_CONFIRM_DELETE, IDESettings.class, 40 "getConfirmDelete", "setConfirmDelete"), new PropertyDescriptor (IDESettings.PROP_HOME_PAGE, IDESettings.class, 42 "getHomePage", "setHomePage"), new PropertyDescriptor (IDESettings.PROP_SHOW_FILE_EXTENSIONS, IDESettings.class, 44 "getShowFileExtensions", "setShowFileExtensions"), new PropertyDescriptor (IDESettings.PROP_SHOW_TOOLTIPS_IN_IDE, IDESettings.class, 46 "getShowToolTipsInIDE", "setShowToolTipsInIDE"), new PropertyDescriptor (IDESettings.PROP_IGNORED_FILES, IDESettings.class, 48 "getIgnoredFiles", "setIgnoredFiles"), }; 50 51 desc[0].setDisplayName (NbBundle.getMessage (IDESettingsBeanInfo.class, "PROP_CONFIRM_DELETE")); 52 desc[0].setShortDescription (NbBundle.getMessage (IDESettingsBeanInfo.class, "HINT_CONFIRM_DELETE")); 53 54 desc[1].setHidden (true); 55 56 desc[2].setHidden (true); 57 58 desc[3].setDisplayName (NbBundle.getMessage (IDESettingsBeanInfo.class, "PROP_SHOW_TOOLTIPS_IN_IDE")); 59 desc[3].setShortDescription (NbBundle.getMessage (IDESettingsBeanInfo.class, "HINT_SHOW_TOOLTIPS_IN_IDE")); 60 61 desc[4].setDisplayName (NbBundle.getMessage (IDESettingsBeanInfo.class, "PROP_ignoredFiles")); 62 desc[4].setShortDescription (NbBundle.getMessage (IDESettingsBeanInfo.class,"HINT_ignoredFiles")); 63 64 return desc; 65 } catch (IntrospectionException ex) { 66 Exceptions.printStackTrace(ex); 67 return null; 68 } 69 70 } 71 72 73 public Image getIcon(int type) { 74 if ((type == java.beans.BeanInfo.ICON_COLOR_16x16) || (type == java.beans.BeanInfo.ICON_MONO_16x16)) 75 return Utilities.loadImage("org/netbeans/core/resources/ideSettings.gif"); else 77 return Utilities.loadImage ("org/netbeans/core/resources/ideSettings32.gif"); } 79 80 } 81 | Popular Tags |