1 19 package org.netbeans.tests.j2eeserver.plugin.jsr88; 20 21 import org.netbeans.tests.j2eeserver.plugin.jsr88.ui.EarConfigBeanPanel; 22 import java.beans.*; 23 24 public class EarConfigBeanBeanInfo extends SimpleBeanInfo { 25 26 27 28 30 private static BeanDescriptor getBdescriptor(){ 31 BeanDescriptor beanDescriptor = new BeanDescriptor ( EarConfigBean.class , EarConfigBeanPanel.class ); 33 return beanDescriptor; } 35 36 private static final int PROPERTY_securityLevel = 0; 38 private static final int PROPERTY_sessionParam = 1; 39 40 42 private static PropertyDescriptor[] getPdescriptor(){ 43 PropertyDescriptor[] properties = new PropertyDescriptor[2]; 44 45 try { 46 properties[PROPERTY_securityLevel] = new PropertyDescriptor ( "securityLevel", EarConfigBean.class, "getSecurityLevel", "setSecurityLevel" ); 47 properties[PROPERTY_sessionParam] = new PropertyDescriptor ( "sessionParam", EarConfigBean.class, "getSessionParam", "setSessionParam" ); 48 } 49 catch( IntrospectionException e) {} 51 53 return properties; } 55 private static final int EVENT_propertyChangeListener = 0; 57 58 60 private static EventSetDescriptor[] getEdescriptor(){ 61 EventSetDescriptor[] eventSets = new EventSetDescriptor[1]; 62 63 try { 64 eventSets[EVENT_propertyChangeListener] = new EventSetDescriptor ( org.netbeans.tests.j2eeserver.plugin.jsr88.EarConfigBean.class, "propertyChangeListener", java.beans.PropertyChangeListener .class, new String [] {"propertyChange"}, "addPropertyChangeListener", "removePropertyChangeListener" ); 65 } 66 catch( IntrospectionException e) {} 68 70 return eventSets; } 72 74 76 private static MethodDescriptor[] getMdescriptor(){ 77 MethodDescriptor[] methods = new MethodDescriptor[0]; 79 81 return methods; } 83 84 private static final int defaultPropertyIndex = -1; private static final int defaultEventIndex = -1; 87 88 90 92 94 101 public BeanDescriptor getBeanDescriptor() { 102 return getBdescriptor(); 103 } 104 105 117 public PropertyDescriptor[] getPropertyDescriptors() { 118 return getPdescriptor(); 119 } 120 121 128 public EventSetDescriptor[] getEventSetDescriptors() { 129 return getEdescriptor(); 130 } 131 132 139 public MethodDescriptor[] getMethodDescriptors() { 140 return getMdescriptor(); 141 } 142 143 151 public int getDefaultPropertyIndex() { 152 return defaultPropertyIndex; 153 } 154 155 162 public int getDefaultEventIndex() { 163 return defaultEventIndex; 164 } 165 166 170 public java.awt.Image getIcon(int iconKind) { 171 java.awt.Image retValue; 172 173 retValue = super.getIcon(iconKind); 174 return retValue; 175 } 176 177 } 178 179 | Popular Tags |