Generated by
JDiff

java.beans Documentation Differences

This file contains all the changes in documentation in the package java.beans as colored differences. Deletions are shown like this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.

Class AppletInitializer

This interface is designed to work in collusion with java.beans.Beans.instantiate. The interafce is intended to provide mechanism to allow the proper initialization of JavaBeans that are also Applets during their instantiation by java.beans.Beans.instantiate().

@see java.beans.Bean.Beans#instantiate @version 1.38 02/02/00 @since JDK11.2

Class BeanInfo, int getDefaultEventIndex()

A bean may have a "default" event that is the event that will mostly commonly be used by human'shumans when using the bean. @return Index of default event in the EventSetDescriptor array returned by getEventSetDescriptors.

Returns -1 if there is no default event.


Class Beans, Object instantiate(ClassLoader, String, BeanContext, AppletInitializer)

Instantiate a bean.

The bean is created based on a name relative to a class-loader. This name should be a dot-separated name such as "a.b.c".

In Beans 1.0 the given name can indicate either a serialized object or a class. Other mechanisms may be added in the future. In beans 1.0 we first try to treat the beanName as a serialized object name then as a class name.

When using the beanName as a serialized object name we convert the given beanName to a resource pathname and add a trailing ".ser" suffix. We then try to load a serialized object from that resource.

For example given a beanName of "x.y" Beans.instantiate would first try to read a serialized object from the resource "x/y.ser" and if that failed it would try to load the class "x.y" and create an instance of that class.

If the bean is a subtype of java.applet.Applet then it is given some special initialization. First it is supplied with a default AppletStub and AppletContext. Second if it was instantiated from a classname the applet's "init" method is called. (If the bean was deserialized this step is skipped.)

Note that for beans which are applets it is the caller's responsiblity to call "start" on the applet. For correct behaviour this should be done after the applet has been added into a visible AWT container.

Note that applets created via beans.instantiate run in a slightly different environment than applets running inside browsers. In particular bean applets have no access to "parameters" so they may wish to provide property get/set methods to set parameter values. We advise bean-applet developers to test their bean-applets against both the JDKSDK appletviewer (for a reference browser environment) and the BDK BeanBox (for a reference bean container). @param classLoader the class-loader from which we should create the bean. If this is null then the system class-loader is used. @param beanName the name of the bean within the class-loader. For example "sun.beanbox.foobah" @param beanContext The BeanContext in which to nest the new bean @param initializer The AppletInitializer for the new bean @exception java.lang.ClassNotFoundException if the class of a serialized object could not be found. @exception java.io.IOException if an I/O error occurs.

Class Beans, boolean isGuiAvailable()

Determines whether beans can assume a GUI is available. @return True if we are running in an environment where beans can assume that an interactive GUI is available so they can pop up dialog boxes etc. This will normally return true in a windowing environment and will normally return false in a server environment or if an application is running as part of a batch job. @see java.beans.VisibilityStateVisibility

Class DesignMode

This interface is intended to be implemented by or delegated from instances of java.beans.beancontext.BeanContext in order to propagate to its nested hierarchy of java.beans.beancontext.BeanContextChild instances the current "designTime" property.

The JavaBeans specification defines the notion of design time as is a mode in which JavaBeans instances should function during their composition and customization in a interactive design composition or construction tool as opposed to runtime when the JavaBean is part of an applet application or other live Java executable abstraction. @author Laurence P. G. Cable @version 1.611 02/02/00 @since JDK11.2 @see java.beans.beancontext.BeanContext @see java.beans.beancontext.BeanContextChild @see java.beans.BeanContextListenerbeancontext.BeanContextMembershipListener @see java.beans.PropertyChangeEvent

Class DesignMode, boolean isDesignTime()

A value of true denotes that JavaBeans should behave in design time mode a value of false denotes runtime behavior. @return the current "value" of the "designTime" property.
Class DesignMode, void setDesignTime(boolean)

Sets the "value" of the "designTime" property. @param designTime sets the current "value" of the "designTime" property.

If the implementing object is an instance of java.beans.beancontext.BeanContext or a subinterface thereof then that BeanContext should fire a PropertyChangeEvent to its registered BeanContextListenersBeanContextMembershipListeners with parameters: @param

Note it is illegal for a BeanContextChild to invoke this method associated with a BeanContext that it is nested within. @param designTime the current "value" of the "designTime" property @see java.beans.beancontext.BeanContext @see java.beans.BeanContextListenerbeancontext.BeanContextMembershipListener @see java.beans.PropertyChangeEvent
Class DesignMode, String PROPERTYNAME

The the standard value of the propertyName as fired from a BeanContext or other source of PropertyChangeEvents.

Class Introspector

The Introspector class provides a standard way for tools to learn about the properties events and methods supported by a target Java Bean.

For each of those three kinds of information the Introspector will separately analyze the bean's class and superclasses looking for either explicit or implicit information and use that information to build a BeanInfo object that comprehensively describes the target bean.

For each class "Foo" explicit information may be available if there exists a corresponding "FooBeanInfo" class that provides a non-null value when queried for the information. We first look for the BeanInfo class by taking the full package-qualified name of the target bean class and appending "BeanInfo" to form a new class name. If this fails then we take the final classname component of this name and look for that class in each of the packages specified in the BeanInfo package search path.

Thus for a class such as "sun.xyz.OurButton" we would first look for a BeanInfo class called "sun.xyz.OurButtonBeanInfo" and if that failed we'd look in each package in the BeanInfo search path for an OurButtonBeanInfo class. With the default search path this would mean looking for "sun.beans.infos.OurButtonBeanInfo".

If a class provides explicit BeanInfo about itself then we add that to the BeanInfo information we obtained from analyzing any derived classes but we regard the explicit information as being definitive for the current class and its base classes and do not proceed any further up the superclass chain.

If we don't find explicit BeanInfo on a class we use low-level reflection to study the methods of the class and apply standard design patterns to identify property accessors event sources or public methods. We then proceed to analyze the class's superclass and add in the information from it (and possibly on up the superclass chain).

For more information about introspection and design patterns please consult the JavaBeans specification.

Class Introspector, BeanInfo getBeanInfo(Class, int)

Introspect on a Java bean and learn about all its properties exposed methods and events subnjectsubject to some comtrolcontrol flags. @param beanClass The bean class to be analyzed. @param flags Flags to control the introspection. If flags == USE_ALL_BEANINFO then we use all of the BeanInfo classes we can discover. If flags == IGNORE_IMMEDIATE_BEANINFO then we ignore any BeanInfo associated with the specified beanClass. If flags == IGNORE_ALL_BEANINFO then we ignore all BeanInfo associated with the specified beanClass or any of its parent classes. @return A BeanInfo object describing the target bean. @exception IntrospectionException if an exception occurs during introspection.

Class PropertyDescriptor, constructor PropertyDescriptor(String, Class)

Constructs a PropertyDescriptor for a property that follows the standard Java convention by having getFoo and setFoo accessor methods. Thus if the argument name is "fred" it will assume that the writer method is "setFred" and the writerreader method is "getFred" (or "isFred" for a boolean property). Note that the property name should start with a lower case character which will be capitalized in the method names. @param propertyName The programmatic name of the property. @param beanClass The Class object for the target bean. For example sun.beans.OurButton.class. @exception IntrospectionException if an exception occurs during introspection.