All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.eou.toolkit.bean.BeanInfoSupport

java.lang.Object
   |
   +----com.ibm.eou.toolkit.bean.BeanInfoSupport

public class BeanInfoSupport
extends Object

Variable Index

 o GET
Constant for use with accessorName method where a read accessor name is to be generated.
 o READONLY
Constant for use with getPropertyDescriptor method where a read only property descriptor is required.
 o READWRITE
Constant for use with getPropertyDescriptor method where a read/write property descriptor is required.
 o SET
Constant for use with accessorName method where a write accessor name is to be generated.
 o WRITEONLY
Constant for use with getPropertyDescriptor method where a write only property descriptor is required.

Constructor Index

 o BeanInfoSupport()

Method Index

 o accessorName(String, boolean)
Return a the name of a property accessor method based on the supplied property name, and the supplied boolean indication of whether a read or write method name is required.
 o codify(char)
Return a string suitable for Java compilation based on the supplied character.
 o getEventSetDescriptor(String, Class, Class)
Return an event set descriptor based on the supplied event set name, bean class, and listener class.
 o getIconName(int, String)
Return the appropriate icon name based on the supplied icon kind and the supplied location and name prefix.
 o getJavaInitializationString(String)
Return a string suitable for Java compilation based on the supplied string.
 o getPropertyDescriptor(String, Class)
Return a property descriptor based on the supplied property name and bean class.
 o getPropertyDescriptor(String, Class, int)
Return a property descriptor based on the supplied property name, bean class, and property disposition.
 o paintValue(Graphics, Rectangle, String)
Display the supplied text in the supplied graphics positioned within the supplied bounding rectangle.

Variables

 o GET
 public static final boolean GET
Constant for use with accessorName method where a read accessor name is to be generated.

See Also:
accessorName
 o SET
 public static final boolean SET
Constant for use with accessorName method where a write accessor name is to be generated.

See Also:
accessorName
 o READWRITE
 public static final int READWRITE
Constant for use with getPropertyDescriptor method where a read/write property descriptor is required.

See Also:
getPropertyDescriptor
 o READONLY
 public static final int READONLY
Constant for use with getPropertyDescriptor method where a read only property descriptor is required.

See Also:
getPropertyDescriptor
 o WRITEONLY
 public static final int WRITEONLY
Constant for use with getPropertyDescriptor method where a write only property descriptor is required.

See Also:
getPropertyDescriptor

Constructors

 o BeanInfoSupport
 public BeanInfoSupport()

Methods

 o accessorName
 public static String accessorName(String propertyName,
                                   boolean getter)
Return a the name of a property accessor method based on the supplied property name, and the supplied boolean indication of whether a read or write method name is required.

See Also:
GET, PUT
 o getPropertyDescriptor
 public static PropertyDescriptor getPropertyDescriptor(String propertyName,
                                                        Class beanClass) throws IntrospectionException
Return a property descriptor based on the supplied property name and bean class. The property is assumed to be read/write.

Parameters:
propertyName - the name of the property for which a property descriptor is required.
beanClass - the class of the bean to which the property descriptor apply.
Returns:
PropertyDescriptor - a property descriptor based on the supplied parameters.
See Also:
getPropertyDescriptor
 o getPropertyDescriptor
 public static PropertyDescriptor getPropertyDescriptor(String propertyName,
                                                        Class beanClass,
                                                        int disposition) throws IntrospectionException
Return a property descriptor based on the supplied property name, bean class, and property disposition. This method assumes that the design pattern of prefixing capitalised property names with "get" and "set" for accessor methods is used by the bean in question.

Parameters:
propertyName - the name of the property for which a property descriptor is required.
beanClass - the class of the bean to which the property descriptor applies.
disposition - the disposition of the property (read/write, read only, write only).
Returns:
PropertyDescriptor - a property descriptor based on the supplied parameters.
See Also:
READWRITE, READONLY, WRITEONLY
 o getJavaInitializationString
 public static String getJavaInitializationString(String string)
Return a string suitable for Java compilation based on the supplied string. All recognised escape characters are expanded to their coded equivalent.

Parameters:
string - the string to be codified.
Returns:
String - the codified string.
See Also:
codify
 o codify
 public static String codify(char c)
Return a string suitable for Java compilation based on the supplied character. All recognised escape characters are expanded to their coded equivalent.

Parameters:
char - the character to be codified.
Returns:
String - the codified string equivalent.
 o getEventSetDescriptor
 public static EventSetDescriptor getEventSetDescriptor(String eventSetName,
                                                        Class beanClass,
                                                        Class listenerClass) throws IntrospectionException, NoSuchMethodException
Return an event set descriptor based on the supplied event set name, bean class, and listener class. This method assumes that the design pattern of prefixing capitalised event set names with "add" and "remove", and appending "Listener", to identify add and remove methods is used by the bean in question.

Parameters:
eventSetName - the name of the event set for which an event set descriptor is required.
beanClass - the class of the bean to which the property descriptor applies.
listenerClass - the class of the listener interface defined for the event set.
Returns:
EventSetDescriptor - an event set descriptor based on the supplied parameters.
 o paintValue
 public static void paintValue(Graphics gfx,
                               Rectangle box,
                               String text)
Display the supplied text in the supplied graphics positioned within the supplied bounding rectangle. This method is intended as a helper method for property editors.

Parameters:
gfx - the Graphics onto which text is to be drawn.
box - the bounding rectangle for the text.
text - the text to be drawn.
 o getIconName
 public static String getIconName(int iconKind,
                                  String prefix)
Return the appropriate icon name based on the supplied icon kind and the supplied location and name prefix. This method assumes a naming convention whereby the icon file name is suffixed with "16" for 16x16 icons or "32" for 32x32 icons. No provision is currently made for monochrome icons. Any request for a monochrome icon will return the colour equivalent.


All Packages  Class Hierarchy  This Package  Previous  Next  Index