1 19 20 package org.netbeans.modules.j2ee.sun.share.configbean; 21 22 import java.beans.*; 23 import org.openide.util.Exceptions; 24 25 public class SecurityRoleMappingBeanInfo extends SimpleBeanInfo { 26 27 29 public java.awt.Image getIcon(int iconKind) { 30 return loadImage("resources/SecurityRoleMappingIcon16.gif"); } 32 33 40 public BeanDescriptor getBeanDescriptor() { 41 BeanDescriptor beanDescriptor = new BeanDescriptor ( SecurityRoleMapping.class , org.netbeans.modules.j2ee.sun.share.configbean.customizers.SecurityRoleMappingCustomizer.class ); return beanDescriptor; 43 } 44 45 57 public PropertyDescriptor[] getPropertyDescriptors() { 58 int PROPERTY_groupName = 0; 59 int PROPERTY_identity = 1; 60 int PROPERTY_principalName = 2; 61 int PROPERTY_roleName = 3; 62 PropertyDescriptor[] properties = new PropertyDescriptor[4]; 63 64 try { 65 properties[PROPERTY_groupName] = new IndexedPropertyDescriptor ( "groupName", SecurityRoleMapping.class, null, null, "getGroupName", null ); 66 properties[PROPERTY_groupName].setBound ( true ); 67 properties[PROPERTY_groupName].setConstrained ( true ); 68 properties[PROPERTY_identity] = new PropertyDescriptor ( "identity", SecurityRoleMapping.class, "getIdentity", null ); 69 properties[PROPERTY_identity].setBound ( true ); 70 properties[PROPERTY_identity].setConstrained ( true ); 71 properties[PROPERTY_principalName] = new IndexedPropertyDescriptor ( "principalName", SecurityRoleMapping.class, null, null, "getPrincipalName", null ); 72 properties[PROPERTY_principalName].setBound ( true ); 73 properties[PROPERTY_principalName].setConstrained ( true ); 74 properties[PROPERTY_roleName] = new PropertyDescriptor ( "roleName", SecurityRoleMapping.class, "getRoleName", null ); 75 properties[PROPERTY_roleName].setBound ( true ); 76 properties[PROPERTY_roleName].setConstrained ( true ); 77 } 78 catch( IntrospectionException e) { 79 Exceptions.printStackTrace(e); 80 } 81 return properties; 82 } 83 84 91 public EventSetDescriptor[] getEventSetDescriptors() { 92 int EVENT_propertyChangeListener = 0; 93 int EVENT_vetoableChangeListener = 1; 94 EventSetDescriptor[] eventSets = new EventSetDescriptor[2]; 95 96 try { 97 eventSets[EVENT_propertyChangeListener] = new EventSetDescriptor ( org.netbeans.modules.j2ee.sun.share.configbean.SecurityRoleMapping.class, "propertyChangeListener", java.beans.PropertyChangeListener .class, new String [] {"propertyChange"}, "addPropertyChangeListener", "removePropertyChangeListener" ); 98 eventSets[EVENT_vetoableChangeListener] = new EventSetDescriptor ( org.netbeans.modules.j2ee.sun.share.configbean.SecurityRoleMapping.class, "vetoableChangeListener", java.beans.VetoableChangeListener .class, new String [] {"vetoableChange"}, "addVetoableChangeListener", "removeVetoableChangeListener" ); 99 } 100 catch( IntrospectionException e) { 101 Exceptions.printStackTrace(e); 102 } 103 return eventSets; 104 } 105 106 113 public MethodDescriptor[] getMethodDescriptors() { 114 return new MethodDescriptor[0]; 115 } 116 117 } 118 119 | Popular Tags |