java.beans
Class SimpleBeanInfo

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.beans.SimpleBeanInfo
All Implemented Interfaces:
BeanInfo sample code for java.beans.BeanInfo definition code for java.beans.BeanInfo

public class SimpleBeanInfo
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements BeanInfo sample code for java.beans.BeanInfo definition code for java.beans.BeanInfo

This is a support class to make it easier for people to provide BeanInfo classes.

It defaults to providing "noop" information, and can be selectively overriden to provide more explicit information on chosen topics. When the introspector sees the "noop" values, it will apply low level introspection and design patterns to automatically analyze the target bean.


Field Summary
 
Fields inherited from interface java.beans.BeanInfo sample code for java.beans.BeanInfo definition code for java.beans.BeanInfo
ICON_COLOR_16x16 sample code for java.beans.BeanInfo.ICON_COLOR_16x16 definition code for java.beans.BeanInfo.ICON_COLOR_16x16 , ICON_COLOR_32x32 sample code for java.beans.BeanInfo.ICON_COLOR_32x32 definition code for java.beans.BeanInfo.ICON_COLOR_32x32 , ICON_MONO_16x16 sample code for java.beans.BeanInfo.ICON_MONO_16x16 definition code for java.beans.BeanInfo.ICON_MONO_16x16 , ICON_MONO_32x32 sample code for java.beans.BeanInfo.ICON_MONO_32x32 definition code for java.beans.BeanInfo.ICON_MONO_32x32
 
Constructor Summary
SimpleBeanInfo sample code for java.beans.SimpleBeanInfo.SimpleBeanInfo() definition code for java.beans.SimpleBeanInfo.SimpleBeanInfo() ()
           
 
Method Summary
 BeanInfo sample code for java.beans.BeanInfo definition code for java.beans.BeanInfo [] getAdditionalBeanInfo sample code for java.beans.SimpleBeanInfo.getAdditionalBeanInfo() definition code for java.beans.SimpleBeanInfo.getAdditionalBeanInfo() ()
          Claim there are no other relevant BeanInfo objects.
 BeanDescriptor sample code for java.beans.BeanDescriptor definition code for java.beans.BeanDescriptor getBeanDescriptor sample code for java.beans.SimpleBeanInfo.getBeanDescriptor() definition code for java.beans.SimpleBeanInfo.getBeanDescriptor() ()
          Deny knowledge about the class and customizer of the bean.
 int getDefaultEventIndex sample code for java.beans.SimpleBeanInfo.getDefaultEventIndex() definition code for java.beans.SimpleBeanInfo.getDefaultEventIndex() ()
          Deny knowledge of a default event.
 int getDefaultPropertyIndex sample code for java.beans.SimpleBeanInfo.getDefaultPropertyIndex() definition code for java.beans.SimpleBeanInfo.getDefaultPropertyIndex() ()
          Deny knowledge of a default property.
 EventSetDescriptor sample code for java.beans.EventSetDescriptor definition code for java.beans.EventSetDescriptor [] getEventSetDescriptors sample code for java.beans.SimpleBeanInfo.getEventSetDescriptors() definition code for java.beans.SimpleBeanInfo.getEventSetDescriptors() ()
          Deny knowledge of event sets.
 Image sample code for java.awt.Image definition code for java.awt.Image getIcon sample code for java.beans.SimpleBeanInfo.getIcon(int) definition code for java.beans.SimpleBeanInfo.getIcon(int) (int iconKind)
          Claim there are no icons available.
 MethodDescriptor sample code for java.beans.MethodDescriptor definition code for java.beans.MethodDescriptor [] getMethodDescriptors sample code for java.beans.SimpleBeanInfo.getMethodDescriptors() definition code for java.beans.SimpleBeanInfo.getMethodDescriptors() ()
          Deny knowledge of methods.
 PropertyDescriptor sample code for java.beans.PropertyDescriptor definition code for java.beans.PropertyDescriptor [] getPropertyDescriptors sample code for java.beans.SimpleBeanInfo.getPropertyDescriptors() definition code for java.beans.SimpleBeanInfo.getPropertyDescriptors() ()
          Deny knowledge of properties.
 Image sample code for java.awt.Image definition code for java.awt.Image loadImage sample code for java.beans.SimpleBeanInfo.loadImage(java.lang.String) definition code for java.beans.SimpleBeanInfo.loadImage(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  resourceName)
          This is a utility method to help in loading icon images.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

SimpleBeanInfo sample code for java.beans.SimpleBeanInfo() definition code for java.beans.SimpleBeanInfo()

public SimpleBeanInfo()
Method Detail

getBeanDescriptor sample code for java.beans.SimpleBeanInfo.getBeanDescriptor() definition code for java.beans.SimpleBeanInfo.getBeanDescriptor()

public BeanDescriptor sample code for java.beans.BeanDescriptor definition code for java.beans.BeanDescriptor  getBeanDescriptor()
Deny knowledge about the class and customizer of the bean. You can override this if you wish to provide explicit info.

Specified by:
getBeanDescriptor sample code for java.beans.BeanInfo.getBeanDescriptor() definition code for java.beans.BeanInfo.getBeanDescriptor() in interface BeanInfo sample code for java.beans.BeanInfo definition code for java.beans.BeanInfo
Returns:
A BeanDescriptor providing overall information about the bean, such as its displayName, its customizer, etc. May return null if the information should be obtained by automatic analysis.

getPropertyDescriptors sample code for java.beans.SimpleBeanInfo.getPropertyDescriptors() definition code for java.beans.SimpleBeanInfo.getPropertyDescriptors()

public PropertyDescriptor sample code for java.beans.PropertyDescriptor definition code for java.beans.PropertyDescriptor [] getPropertyDescriptors()
Deny knowledge of properties. You can override this if you wish to provide explicit property info.

Specified by:
getPropertyDescriptors sample code for java.beans.BeanInfo.getPropertyDescriptors() definition code for java.beans.BeanInfo.getPropertyDescriptors() in interface BeanInfo sample code for java.beans.BeanInfo definition code for java.beans.BeanInfo
Returns:
An array of PropertyDescriptors describing the editable properties supported by this bean. May return null if the information should be obtained by automatic analysis.

If a property is indexed, then its entry in the result array will belong to the IndexedPropertyDescriptor subclass of PropertyDescriptor. A client of getPropertyDescriptors can use "instanceof" to check if a given PropertyDescriptor is an IndexedPropertyDescriptor.


getDefaultPropertyIndex sample code for java.beans.SimpleBeanInfo.getDefaultPropertyIndex() definition code for java.beans.SimpleBeanInfo.getDefaultPropertyIndex()

public int getDefaultPropertyIndex()
Deny knowledge of a default property. You can override this if you wish to define a default property for the bean.

Specified by:
getDefaultPropertyIndex sample code for java.beans.BeanInfo.getDefaultPropertyIndex() definition code for java.beans.BeanInfo.getDefaultPropertyIndex() in interface BeanInfo sample code for java.beans.BeanInfo definition code for java.beans.BeanInfo
Returns:
Index of default property in the PropertyDescriptor array returned by getPropertyDescriptors.

Returns -1 if there is no default property.


getEventSetDescriptors sample code for java.beans.SimpleBeanInfo.getEventSetDescriptors() definition code for java.beans.SimpleBeanInfo.getEventSetDescriptors()

public EventSetDescriptor sample code for java.beans.EventSetDescriptor definition code for java.beans.EventSetDescriptor [] getEventSetDescriptors()
Deny knowledge of event sets. You can override this if you wish to provide explicit event set info.

Specified by:
getEventSetDescriptors sample code for java.beans.BeanInfo.getEventSetDescriptors() definition code for java.beans.BeanInfo.getEventSetDescriptors() in interface BeanInfo sample code for java.beans.BeanInfo definition code for java.beans.BeanInfo
Returns:
An array of EventSetDescriptors describing the kinds of events fired by this bean. May return null if the information should be obtained by automatic analysis.

getDefaultEventIndex sample code for java.beans.SimpleBeanInfo.getDefaultEventIndex() definition code for java.beans.SimpleBeanInfo.getDefaultEventIndex()

public int getDefaultEventIndex()
Deny knowledge of a default event. You can override this if you wish to define a default event for the bean.

Specified by:
getDefaultEventIndex sample code for java.beans.BeanInfo.getDefaultEventIndex() definition code for java.beans.BeanInfo.getDefaultEventIndex() in interface BeanInfo sample code for java.beans.BeanInfo definition code for java.beans.BeanInfo
Returns:
Index of default event in the EventSetDescriptor array returned by getEventSetDescriptors.

Returns -1 if there is no default event.


getMethodDescriptors sample code for java.beans.SimpleBeanInfo.getMethodDescriptors() definition code for java.beans.SimpleBeanInfo.getMethodDescriptors()

public MethodDescriptor sample code for java.beans.MethodDescriptor definition code for java.beans.MethodDescriptor [] getMethodDescriptors()
Deny knowledge of methods. You can override this if you wish to provide explicit method info.

Specified by:
getMethodDescriptors sample code for java.beans.BeanInfo.getMethodDescriptors() definition code for java.beans.BeanInfo.getMethodDescriptors() in interface BeanInfo sample code for java.beans.BeanInfo definition code for java.beans.BeanInfo
Returns:
An array of MethodDescriptors describing the externally visible methods supported by this bean. May return null if the information should be obtained by automatic analysis.

getAdditionalBeanInfo sample code for java.beans.SimpleBeanInfo.getAdditionalBeanInfo() definition code for java.beans.SimpleBeanInfo.getAdditionalBeanInfo()

public BeanInfo sample code for java.beans.BeanInfo definition code for java.beans.BeanInfo [] getAdditionalBeanInfo()
Claim there are no other relevant BeanInfo objects. You may override this if you want to (for example) return a BeanInfo for a base class.

Specified by:
getAdditionalBeanInfo sample code for java.beans.BeanInfo.getAdditionalBeanInfo() definition code for java.beans.BeanInfo.getAdditionalBeanInfo() in interface BeanInfo sample code for java.beans.BeanInfo definition code for java.beans.BeanInfo
Returns:
an array of BeanInfo objects. May return null.

getIcon sample code for java.beans.SimpleBeanInfo.getIcon(int) definition code for java.beans.SimpleBeanInfo.getIcon(int)

public Image sample code for java.awt.Image definition code for java.awt.Image  getIcon(int iconKind)
Claim there are no icons available. You can override this if you want to provide icons for your bean.

Specified by:
getIcon sample code for java.beans.BeanInfo.getIcon(int) definition code for java.beans.BeanInfo.getIcon(int) in interface BeanInfo sample code for java.beans.BeanInfo definition code for java.beans.BeanInfo
Parameters:
iconKind - The kind of icon requested. This should be one of the constant values ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, or ICON_MONO_32x32.
Returns:
An image object representing the requested icon. May return null if no suitable icon is available.

loadImage sample code for java.beans.SimpleBeanInfo.loadImage(java.lang.String) definition code for java.beans.SimpleBeanInfo.loadImage(java.lang.String)

public Image sample code for java.awt.Image definition code for java.awt.Image  loadImage(String sample code for java.lang.String definition code for java.lang.String  resourceName)
This is a utility method to help in loading icon images. It takes the name of a resource file associated with the current object's class file and loads an image object from that file. Typically images will be GIFs.

Parameters:
resourceName - A pathname relative to the directory holding the class file of the current class. For example, "wombat.gif".
Returns:
an image object. May be null if the load failed.