1 19 20 package org.netbeans.modules.diff.builtin.visualizer; 21 22 import java.beans.*; 23 24 import org.openide.util.NbBundle; 25 import org.openide.util.Utilities; 26 27 32 public class TextDiffVisualizerBeanInfo extends SimpleBeanInfo { 33 34 41 public BeanDescriptor getBeanDescriptor() { 42 return new BeanDescriptor(TextDiffVisualizer.class); 43 } 44 45 46 58 public PropertyDescriptor[] getPropertyDescriptors() { 59 PropertyDescriptor[] desc; 60 try { 61 PropertyDescriptor contextMode = new PropertyDescriptor("contextMode", TextDiffVisualizer.class); 62 contextMode.setDisplayName (NbBundle.getMessage(TextDiffVisualizerBeanInfo.class, "PROP_contextMode")); 63 contextMode.setShortDescription (NbBundle.getMessage(TextDiffVisualizerBeanInfo.class, "HINT_contextMode")); 64 PropertyDescriptor contextNumLines = new PropertyDescriptor("contextNumLines", TextDiffVisualizer.class); 65 contextNumLines.setDisplayName (NbBundle.getMessage(TextDiffVisualizerBeanInfo.class, "PROP_contextNumLines")); 66 contextNumLines.setShortDescription (NbBundle.getMessage(TextDiffVisualizerBeanInfo.class, "HINT_contextNumLines")); 67 desc = new PropertyDescriptor[] { contextMode, contextNumLines }; } catch (IntrospectionException ex) { 69 org.openide.ErrorManager.getDefault().notify(ex); 70 desc = null; 71 } 72 return desc; 73 } 74 75 83 public int getDefaultPropertyIndex() { 84 return 0; 85 } 86 87 108 public java.awt.Image getIcon(int iconKind) { 109 switch (iconKind) { 110 case ICON_COLOR_16x16: 111 return Utilities.loadImage("org/netbeans/modules/diff/diffSettingsIcon.gif", true); } 113 return null; 114 } 115 116 } 117 | Popular Tags |