javax.swing
public class: SwingBeanInfoBase [javadoc |
source]
java.lang.Object
java.beans.SimpleBeanInfo
javax.swing.SwingBeanInfoBase
All Implemented Interfaces:
BeanInfo
The superclass for all Swing BeanInfo classes. It provides
default implementations of
getIcon
and
getDefaultPropertyIndex
as well as utility
methods, like createPropertyDescriptor, for writing BeanInfo
implementations. This classes is intended to be used along
with
GenSwingBeanInfo
a BeanInfo class code generator.
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from javax.swing.SwingBeanInfoBase Detail: |
public BeanInfo[] getAdditionalBeanInfo() {
Class superClass = getBeanDescriptor().getBeanClass().getSuperclass();
BeanInfo superBeanInfo = null;
try {
superBeanInfo = Introspector.getBeanInfo(superClass);
} catch (IntrospectionException ie) {}
if (superBeanInfo != null) {
BeanInfo[] ret = new BeanInfo[1];
ret[0] = superBeanInfo;
return ret;
}
return null;
}
Returns the BeanInfo for the superclass of our bean, so that
its PropertyDescriptors will be included. |
public int getDefaultPropertyIndex() {
return 0;
}
The default index is always 0. In other words the first property
listed in the getPropertyDescriptors() method is the one
to show a (JFC builder) user in a situation where just a single
property will be shown. |
public Image getIcon(int kind) {
// PENDING(hmuller) need generic swing icon images.
return null;
}
Returns a generic Swing icon, all icon "kinds" are supported.
Subclasses should defer to this method when they don't have
a particular beans icon kind. |