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
-
GET
- Constant for use with
accessorName method where a
read accessor name is to be generated.
-
READONLY
- Constant for use with
getPropertyDescriptor method where a
read only property descriptor is required.
-
READWRITE
- Constant for use with
getPropertyDescriptor method where a
read/write property descriptor is required.
-
SET
- Constant for use with
accessorName method where a
write accessor name is to be generated.
-
WRITEONLY
- Constant for use with
getPropertyDescriptor method where a
write only property descriptor is required.
-
BeanInfoSupport()
-
-
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.
-
codify(char)
- Return a string suitable for Java compilation based on the supplied
character.
-
getEventSetDescriptor(String, Class, Class)
- Return an event set descriptor based on the supplied event set name,
bean class, and listener class.
-
getIconName(int, String)
- Return the appropriate icon name based on the supplied icon kind and
the supplied location and name prefix.
-
getJavaInitializationString(String)
- Return a string suitable for Java compilation based on the supplied
string.
-
getPropertyDescriptor(String, Class)
- Return a property descriptor based on the supplied property name
and bean class.
-
getPropertyDescriptor(String, Class, int)
- Return a property descriptor based on the supplied property name,
bean class, and property disposition.
-
paintValue(Graphics, Rectangle, String)
- Display the supplied text in the supplied graphics positioned
within the supplied bounding rectangle.
GET
public static final boolean GET
- Constant for use with
accessorName method where a
read accessor name is to be generated.
- See Also:
- accessorName
SET
public static final boolean SET
- Constant for use with
accessorName method where a
write accessor name is to be generated.
- See Also:
- accessorName
READWRITE
public static final int READWRITE
- Constant for use with
getPropertyDescriptor method where a
read/write property descriptor is required.
- See Also:
- getPropertyDescriptor
READONLY
public static final int READONLY
- Constant for use with
getPropertyDescriptor method where a
read only property descriptor is required.
- See Also:
- getPropertyDescriptor
WRITEONLY
public static final int WRITEONLY
- Constant for use with
getPropertyDescriptor method where a
write only property descriptor is required.
- See Also:
- getPropertyDescriptor
BeanInfoSupport
public BeanInfoSupport()
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
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
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
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
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.
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.
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.
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