1 19 20 package org.netbeans.modules.diff.builtin; 21 22 import java.beans.*; 23 24 import org.openide.util.NbBundle; 25 import org.openide.util.Utilities; 26 27 32 public class DefaultDiffBeanInfo extends SimpleBeanInfo { 33 34 41 public BeanDescriptor getBeanDescriptor() { 42 return new BeanDescriptor(DefaultDiff.class); 43 } 44 45 46 58 public PropertyDescriptor[] getPropertyDescriptors() { 59 PropertyDescriptor[] desc; 60 try { 61 PropertyDescriptor showDiffSelector = new PropertyDescriptor("showDiffSelector", DefaultDiff.class); 62 showDiffSelector.setDisplayName (NbBundle.getMessage(DefaultDiffBeanInfo.class, "PROP_showDiffSelector")); 63 showDiffSelector.setShortDescription (NbBundle.getMessage(DefaultDiffBeanInfo.class, "HINT_showDiffSelector")); 64 desc = new PropertyDescriptor[] { showDiffSelector }; 65 } catch (IntrospectionException ex) { 66 org.openide.ErrorManager.getDefault().notify(ex); 67 desc = null; 68 } 69 return desc; 70 } 71 72 80 public int getDefaultPropertyIndex() { 81 return 0; 82 } 83 84 105 public java.awt.Image getIcon(int iconKind) { 106 switch (iconKind) { 107 case ICON_COLOR_16x16: 108 return Utilities.loadImage("org/netbeans/modules/diff/diffSettingsIcon.gif", true); } 110 return null; 111 } 112 113 } 114 | Popular Tags |