1 19 20 package org.netbeans.modules.db.explorer; 21 22 import java.beans.*; 23 import java.awt.*; 24 import java.util.ResourceBundle ; 25 import org.openide.util.Exceptions; 26 import org.openide.util.NbBundle; 27 import org.openide.util.Utilities; 28 29 31 public class DatabaseOptionBeanInfo extends SimpleBeanInfo { 32 33 public PropertyDescriptor[] getPropertyDescriptors () 34 { 35 PropertyDescriptor[] desc = new PropertyDescriptor[1]; 36 try { 37 desc[0] = new PropertyDescriptor("debugMode", DatabaseOption.class); ResourceBundle bundle = NbBundle.getBundle("org.netbeans.modules.db.resources.Bundle"); desc[0].setDisplayName(bundle.getString("PROP_DEBUG_MODE")); desc[0].setShortDescription(bundle.getString ("HINT_DEBUG_MODE")); } catch (Exception e) { 42 Exceptions.printStackTrace(e); 43 } 44 return desc; 45 } 46 47 public Image getIcon(int type) 48 { 49 if (type == BeanInfo.ICON_COLOR_16x16) { 50 return Utilities.loadImage("/org/netbeans/modules/db/resources/optionIcon.gif"); } else if (type == BeanInfo.ICON_COLOR_32x32) { 52 return Utilities.loadImage("/org/netbeans/modules/db/resources/optionIcon32.gif"); } 54 55 return super.getIcon(type); 56 } 57 } 58 | Popular Tags |