1 18 19 package org.netbeans.modules.changelog.settings; 20 21 import java.awt.Image ; 22 import java.beans.*; 23 24 import org.openide.util.NbBundle; 25 26 30 public class ChangeLogSettingsBeanInfo extends SimpleBeanInfo { 31 32 33 34 public Image getIcon(int type) { 35 if ((type == java.beans.BeanInfo.ICON_COLOR_16x16) || (type == java.beans.BeanInfo.ICON_MONO_16x16)) { 36 return org.openide.util.Utilities.loadImage("org/netbeans/modules/changelog/resources/setting.gif"); } else { 38 return null; 39 } 40 41 } 42 43 46 public PropertyDescriptor[] getPropertyDescriptors () { 47 try { 48 49 java.util.ResourceBundle bundle = 50 NbBundle.getBundle(ChangeLogSettingsBeanInfo.class); 51 52 53 PropertyDescriptor defaultServer = new PropertyDescriptor ("defaultServerInfo", ChangeLogSettings.class); defaultServer.setDisplayName (bundle.getString("PROP_defaultServerInfo")); defaultServer.setShortDescription (bundle.getString("HINT_defaultServerInfo")); defaultServer.setPropertyEditorClass(DefaultServerInfoPE.class); 57 58 PropertyDescriptor showBranchesByDefault = new PropertyDescriptor ("showBranchesByDefault", ChangeLogSettings.class); showBranchesByDefault.setDisplayName (bundle.getString("PROP_showBranchesByDefault")); showBranchesByDefault.setShortDescription (bundle.getString("HINT_showBranchesByDefault")); 62 return new PropertyDescriptor[] { defaultServer, showBranchesByDefault }; 63 64 } catch (IntrospectionException ie) { 65 org.openide.ErrorManager.getDefault().notify(); 66 return null; 67 } 68 } 69 } 70 71 | Popular Tags |