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 GraphicalDiffVisualizerBeanInfo extends SimpleBeanInfo { 33 34 41 public BeanDescriptor getBeanDescriptor() { 42 return new BeanDescriptor(GraphicalDiffVisualizer.class); 43 } 44 45 46 58 public PropertyDescriptor[] getPropertyDescriptors() { 59 PropertyDescriptor[] desc; 60 try { 61 PropertyDescriptor colorAdded = new PropertyDescriptor("colorAdded", GraphicalDiffVisualizer.class); 62 colorAdded.setDisplayName (NbBundle.getMessage(GraphicalDiffVisualizerBeanInfo.class, "PROP_colorAdded")); 63 colorAdded.setShortDescription (NbBundle.getMessage(GraphicalDiffVisualizerBeanInfo.class, "HINT_colorAdded")); 64 PropertyDescriptor colorMissing = new PropertyDescriptor("colorMissing", GraphicalDiffVisualizer.class); 65 colorMissing.setDisplayName (NbBundle.getMessage(GraphicalDiffVisualizerBeanInfo.class, "PROP_colorMissing")); 66 colorMissing.setShortDescription (NbBundle.getMessage(GraphicalDiffVisualizerBeanInfo.class, "HINT_colorMissing")); 67 PropertyDescriptor colorChanged = new PropertyDescriptor("colorChanged", GraphicalDiffVisualizer.class); 68 colorChanged.setDisplayName (NbBundle.getMessage(GraphicalDiffVisualizerBeanInfo.class, "PROP_colorChanged")); 69 colorChanged.setShortDescription (NbBundle.getMessage(GraphicalDiffVisualizerBeanInfo.class, "HINT_colorChanged")); 70 desc = new PropertyDescriptor[] { colorAdded, colorMissing, colorChanged }; 71 } catch (IntrospectionException ex) { 72 org.openide.ErrorManager.getDefault().notify(ex); 73 desc = null; 74 } 75 return desc; 76 } 77 78 86 public int getDefaultPropertyIndex() { 87 return 0; 88 } 89 90 111 public java.awt.Image getIcon(int iconKind) { 112 switch (iconKind) { 113 case ICON_COLOR_16x16: 114 return Utilities.loadImage("org/netbeans/modules/diff/diffSettingsIcon.gif", true); } 116 return null; 117 } 118 119 } 120 | Popular Tags |