1 19 20 package org.netbeans.core.output; 21 22 import java.awt.Image ; 23 import java.beans.*; 24 25 import org.openide.util.Utilities; 26 import org.openide.ErrorManager; 27 28 32 public class OutputSettingsBeanInfo extends SimpleBeanInfo { 33 34 35 38 public PropertyDescriptor[] getPropertyDescriptors () { 39 try { 40 PropertyDescriptor[] desc = new PropertyDescriptor[] { 41 new PropertyDescriptor (OutputSettings.PROP_TAB_SIZE, OutputSettings.class, "getTabSize", "setTabSize"), new PropertyDescriptor (OutputSettings.PROP_HISTORY_SIZE, OutputSettings.class, "getHistorySize", "setHistorySize"), new PropertyDescriptor (OutputSettings.PROP_REDIRECTION, OutputSettings.class, "isRedirection", "setRedirection"), new PropertyDescriptor (OutputSettings.PROP_DIRECTORY, OutputSettings.class), }; 46 desc[0].setDisplayName (OutputSettings.getString ("PROP_TAB_SIZE")); 47 desc[0].setShortDescription (OutputSettings.getString ("HINT_TAB_SIZE")); 48 desc[1].setDisplayName (OutputSettings.getString ("PROP_HISTORY_SIZE")); 49 desc[1].setShortDescription (OutputSettings.getString ("HINT_HISTORY_SIZE")); 50 desc[2].setDisplayName (OutputSettings.getString ("PROP_REDIRECTION")); 51 desc[2].setShortDescription (OutputSettings.getString ("HINT_REDIRECTION")); 52 desc[3].setDisplayName (OutputSettings.getString ("PROP_REDIR_LOCATION")); 53 desc[3].setShortDescription (OutputSettings.getString ("HINT_REDIR_LOCATION")); 54 desc[3].setValue("files", Boolean.FALSE); 55 return desc; 56 } catch (IntrospectionException ex) { 57 ErrorManager.getDefault().notify(ex); 58 return null; 59 } 60 } 61 62 63 public Image getIcon(int type) { 64 if ((type == java.beans.BeanInfo.ICON_COLOR_16x16) || (type == java.beans.BeanInfo.ICON_MONO_16x16)) 65 return Utilities.loadImage("org/netbeans/core/resources/outputSettings.gif"); else 67 return Utilities.loadImage("org/netbeans/core/resources/outputSettings32.gif"); } 69 70 } 71 | Popular Tags |