1 19 20 package org.netbeans.modules.extbrowser; 21 22 import java.awt.Image ; 23 import java.beans.*; 24 25 import org.openide.util.NbBundle; 26 27 public class SystemDefaultBrowserBeanInfo extends SimpleBeanInfo { 28 29 public BeanDescriptor getBeanDescriptor() { 30 BeanDescriptor descr = new BeanDescriptor (SystemDefaultBrowser.class); 31 descr.setDisplayName (NbBundle.getMessage (SystemDefaultBrowserBeanInfo.class, "CTL_SystemDefaultBrowserName")); 32 descr.setShortDescription (NbBundle.getMessage (SystemDefaultBrowserBeanInfo.class, "HINT_SystemDefaultBrowserName")); 33 34 descr.setValue ("helpID", "org.netbeans.modules.extbrowser.ExtWebBrowser"); return descr; 36 } 37 38 public PropertyDescriptor[] getPropertyDescriptors() { 39 PropertyDescriptor[] properties; 40 41 try { 42 properties = new PropertyDescriptor [] { 43 new PropertyDescriptor(ExtWebBrowser.PROP_BROWSER_EXECUTABLE, SystemDefaultBrowser.class, "getBrowserExecutable", null), new PropertyDescriptor(ExtWebBrowser.PROP_DDE_ACTIVATE_TIMEOUT, SystemDefaultBrowser.class), 46 new PropertyDescriptor(ExtWebBrowser.PROP_DDE_OPENURL_TIMEOUT, SystemDefaultBrowser.class) 47 }; 48 49 properties[0].setDisplayName (NbBundle.getMessage (SystemDefaultBrowserBeanInfo.class, "PROP_browserExecutable")); 50 properties[0].setShortDescription (NbBundle.getMessage (SystemDefaultBrowserBeanInfo.class, "HINT_browserExecutable")); 51 52 56 properties[1].setDisplayName (NbBundle.getMessage (SystemDefaultBrowserBeanInfo.class, "PROP_DDE_ACTIVATE_TIMEOUT")); 57 properties[1].setShortDescription (NbBundle.getMessage (SystemDefaultBrowserBeanInfo.class, "HINT_DDE_ACTIVATE_TIMEOUT")); 58 properties[1].setExpert(Boolean.TRUE.booleanValue()); 59 properties[1].setHidden(true); 60 61 properties[2].setDisplayName (NbBundle.getMessage (SystemDefaultBrowserBeanInfo.class, "PROP_DDE_OPENURL_TIMEOUT")); 62 properties[2].setShortDescription (NbBundle.getMessage (SystemDefaultBrowserBeanInfo.class, "HINT_DDE_OPENURL_TIMEOUT")); 63 properties[2].setExpert(Boolean.TRUE.booleanValue()); 64 properties[2].setHidden(true); 65 66 } catch (IntrospectionException ie) { 67 org.openide.ErrorManager.getDefault().notify(ie); 68 return null; 69 } 70 71 return properties; 72 } 73 74 77 public Image getIcon (int type) { 78 return loadImage("/org/netbeans/modules/extbrowser/resources/extbrowser.png"); } 80 81 } 82 | Popular Tags |