1 19 20 package org.openide.nodes; 21 22 import java.beans.*; 23 24 public class Bean21341HiddenBeanInfo extends SimpleBeanInfo { 25 26 28 private static BeanDescriptor getBdescriptor(){ 29 BeanDescriptor beanDescriptor = new BeanDescriptor ( Bean21341Hidden.class , null ); 30 beanDescriptor.setShortDescription ( "ShortDescription" ); beanDescriptor.setValue("helpID", "HelpID" ); 32 beanDescriptor.setValue("propertiesHelpID", "PropertiesHelpID" ); 33 beanDescriptor.setValue("expertHelpID", "ExpertHelpID" ); 34 36 return beanDescriptor; } 38 39 private static final int PROPERTY_karel = 0; 41 private static final int PROPERTY_indexedProperty = 1; 42 43 45 private static PropertyDescriptor[] getPdescriptor(){ 46 PropertyDescriptor[] properties = new PropertyDescriptor[2]; 47 48 try { 49 properties[PROPERTY_karel] = new PropertyDescriptor ( "karel", Bean21341Hidden.class, "getKarel", "setKarel" ); 50 properties[PROPERTY_karel].setExpert ( true ); 51 properties[PROPERTY_indexedProperty] = new IndexedPropertyDescriptor ( "indexedProperty", Bean21341Hidden.class, null, null, "getIndexedProperty", null ); 52 } 53 catch( IntrospectionException e) {} 55 57 return properties; } 59 61 63 private static EventSetDescriptor[] getEdescriptor(){ 64 EventSetDescriptor[] eventSets = new EventSetDescriptor[0]; 66 68 return eventSets; } 70 72 74 private static MethodDescriptor[] getMdescriptor(){ 75 MethodDescriptor[] methods = new MethodDescriptor[0]; 77 79 return methods; } 81 82 private static final int defaultPropertyIndex = -1; private static final int defaultEventIndex = -1; 85 86 88 90 92 99 public BeanDescriptor getBeanDescriptor() { 100 return getBdescriptor(); 101 } 102 103 115 public PropertyDescriptor[] getPropertyDescriptors() { 116 return getPdescriptor(); 117 } 118 119 126 public EventSetDescriptor[] getEventSetDescriptors() { 127 return getEdescriptor(); 128 } 129 130 137 public MethodDescriptor[] getMethodDescriptors() { 138 return getMdescriptor(); 139 } 140 141 149 public int getDefaultPropertyIndex() { 150 return defaultPropertyIndex; 151 } 152 153 160 public int getDefaultEventIndex() { 161 return defaultEventIndex; 162 } 163 } 164 165 | Popular Tags |