1 19 20 package org.netbeans.modules.merge.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 GraphicalMergeVisualizerBeanInfo extends SimpleBeanInfo { 33 34 41 public BeanDescriptor getBeanDescriptor() { 42 return new BeanDescriptor(GraphicalMergeVisualizer.class); 43 } 44 45 46 58 public PropertyDescriptor[] getPropertyDescriptors() { 59 PropertyDescriptor[] desc; 60 try { 61 PropertyDescriptor colorUnresolvedConflict = new PropertyDescriptor("colorUnresolvedConflict", GraphicalMergeVisualizer.class); 62 colorUnresolvedConflict.setDisplayName (NbBundle.getMessage(GraphicalMergeVisualizerBeanInfo.class, "PROP_colorUnresolvedConflict")); 63 colorUnresolvedConflict.setShortDescription (NbBundle.getMessage(GraphicalMergeVisualizerBeanInfo.class, "HINT_colorUnresolvedConflict")); 64 PropertyDescriptor colorResolvedConflict = new PropertyDescriptor("colorResolvedConflict", GraphicalMergeVisualizer.class); 65 colorResolvedConflict.setDisplayName (NbBundle.getMessage(GraphicalMergeVisualizerBeanInfo.class, "PROP_colorResolvedConflict")); 66 colorResolvedConflict.setShortDescription (NbBundle.getMessage(GraphicalMergeVisualizerBeanInfo.class, "HINT_colorResolvedConflict")); 67 PropertyDescriptor colorOtherConflict = new PropertyDescriptor("colorOtherConflict", GraphicalMergeVisualizer.class); 68 colorOtherConflict.setDisplayName (NbBundle.getMessage(GraphicalMergeVisualizerBeanInfo.class, "PROP_colorOtherConflict")); 69 colorOtherConflict.setShortDescription (NbBundle.getMessage(GraphicalMergeVisualizerBeanInfo.class, "HINT_colorOtherConflict")); 70 desc = new PropertyDescriptor[] { colorUnresolvedConflict, colorResolvedConflict, colorOtherConflict }; 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/merge/builtin/visualizer/mergeModeIcon.gif", true); } 116 return null; 117 } 118 119 } 120 | Popular Tags |