|
What this is
Other links
The source code/* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"). You may not use this file except in * compliance with the License. A copy of the License is available at * http://www.sun.com/ * * The Original Code is NetBeans. The Initial Developer of the Original * Code is Sun Microsystems, Inc. Portions Copyright 1997-2001 Sun * Microsystems, Inc. All Rights Reserved. */ package org.netbeans.modules.schema2beans; import java.beans.*; import java.util.*; import java.lang.reflect.*; public class DDBeanInfo extends SimpleBeanInfo { private static final String BEANINFO = "BeanInfo"; // NOI18N private static PropertyDescriptor[] properties = null; //GEN-FIRST:Properties // Here you can add code for customizing the properties array. //GEN-LAST:Properties private static EventSetDescriptor[] eventSets = null; //GEN-FIRST:Events // Here you can add code for customizing the event sets array. //GEN-LAST:Events private static java.awt.Image iconColor16 = null; //GEN-BEGIN:IconsDef private static java.awt.Image iconColor32 = null; private static java.awt.Image iconMono16 = null; private static java.awt.Image iconMono32 = null; //GEN-END:IconsDef private static String iconNameC16 = null; //GEN-BEGIN:Icons private static String iconNameC32 = null; private static String iconNameM16 = null; private static String iconNameM32 = null; //GEN-END:Icons private static int defaultPropertyIndex = -1; //GEN-BEGIN:Idx private static int defaultEventIndex = -1; //GEN-END:Idx private static boolean propertiesInited = false; private void initProperties() { ArrayList al = new ArrayList(); String classname = null; BeanInfo bi; try { classname = this.getClass().getName(); if (!classname.endsWith(BEANINFO)) { return; } classname = classname.substring(0,(classname.length() - BEANINFO.length())); bi = Introspector.getBeanInfo(Class.forName(classname)); } catch (ClassNotFoundException e) { System.err.println("Class name = " + classname); // NOI18N return; } catch (IntrospectionException e) { Thread.dumpStack(); return; } PropertyDescriptor[] pd = bi.getPropertyDescriptors(); Method m = null; for (int i=0;i |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.