1 19 20 package org.netbeans.lib.jmi.mapping; 21 22 import java.beans.*; 23 import org.openide.util.NbBundle; 24 25 public class JMIMapperImplBeanInfo extends SimpleBeanInfo { 26 27 29 private static BeanDescriptor getBdescriptor(){ 30 BeanDescriptor beanDescriptor = new BeanDescriptor ( JMIMapperImpl.class , null ); 32 34 return beanDescriptor; } 36 37 private static final int PROPERTY_header = 0; 39 40 42 private static PropertyDescriptor[] getPdescriptor(){ 43 PropertyDescriptor[] properties = new PropertyDescriptor[1]; 44 45 try { 46 properties[PROPERTY_header] = new PropertyDescriptor ( "header", JMIMapperImpl.class, "getHeader", "setHeader" ); 47 properties[PROPERTY_header].setDisplayName ( NbBundle.getMessage(JMIMapperImpl.class,"PROP_HEADER") ); 48 properties[PROPERTY_header].setShortDescription ( NbBundle.getMessage(JMIMapperImpl.class,"HINT_HEADER") ); 49 } 50 catch( IntrospectionException e) {} 52 54 return properties; } 56 private static EventSetDescriptor[] eventSets = null; 58 private static EventSetDescriptor[] getEdescriptor(){ 60 62 return eventSets; } 64 private static MethodDescriptor[] methods = null; 66 private static MethodDescriptor[] getMdescriptor(){ 68 70 return methods; } 72 73 private static final int defaultPropertyIndex = -1; private static final int defaultEventIndex = -1; 76 77 79 81 83 90 public BeanDescriptor getBeanDescriptor() { 91 return getBdescriptor(); 92 } 93 94 106 public PropertyDescriptor[] getPropertyDescriptors() { 107 return getPdescriptor(); 108 } 109 110 117 public EventSetDescriptor[] getEventSetDescriptors() { 118 return getEdescriptor(); 119 } 120 121 128 public MethodDescriptor[] getMethodDescriptors() { 129 return getMdescriptor(); 130 } 131 132 140 public int getDefaultPropertyIndex() { 141 return defaultPropertyIndex; 142 } 143 144 151 public int getDefaultEventIndex() { 152 return defaultEventIndex; 153 } 154 } 155 156 | Popular Tags |