|
Apache JMeter 2.0.1.20050615 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.beans.SimpleBeanInfo
org.apache.jmeter.testbeans.BeanInfoSupport
Support class for test bean beanInfo objects. It will help using the introspector to get most of the information, to then modify it at will.
To use, subclass it, create a subclass with a parameter-less constructor that:
Even before any such modifications, a resource bundle named xxxResources (where xxx is the fully qualified bean class name) will be obtained if available and used to localize the following:
The resource bundle will be stored as the bean descriptor's "resourceBundle" attribute, so that it can be used for further localization. TestBeanGUI, for example, uses it to obtain the group's display names from properties groupName.displayName.
Field Summary | |
static String |
DEFAULT
|
static String |
NOT_EXPRESSION
|
static String |
NOT_OTHER
|
static String |
NOT_UNDEFINED
|
static String |
RESOURCE_BUNDLE
|
static String |
TAGS
|
Fields inherited from interface java.beans.BeanInfo |
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32 |
Constructor Summary | |
protected |
BeanInfoSupport(Class beanClass)
Construct a BeanInfo for the given class. |
Method Summary | |
protected void |
createPropertyGroup(String group,
String[] names)
Utility method to group and order properties. |
BeanInfo[] |
getAdditionalBeanInfo()
|
BeanDescriptor |
getBeanDescriptor()
|
int |
getDefaultEventIndex()
|
int |
getDefaultPropertyIndex()
|
EventSetDescriptor[] |
getEventSetDescriptors()
|
Image |
getIcon(int iconKind)
|
MethodDescriptor[] |
getMethodDescriptors()
|
PropertyDescriptor[] |
getPropertyDescriptors()
|
protected PropertyDescriptor |
property(String name)
Get the property descriptor for the property of the given name. |
protected void |
setIcon(String resourceName)
Set the bean's 16x16 colour icon. |
Methods inherited from class java.beans.SimpleBeanInfo |
loadImage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String TAGS
public static final String NOT_UNDEFINED
public static final String NOT_EXPRESSION
public static final String NOT_OTHER
public static final String DEFAULT
public static final String RESOURCE_BUNDLE
Constructor Detail |
protected BeanInfoSupport(Class beanClass)
Method Detail |
protected PropertyDescriptor property(String name)
name
- property name
protected void setIcon(String resourceName)
resourceName
- A pathname relative to the directory holding the
class file of the current class.protected void createPropertyGroup(String group, String[] names)
It will assing the given group name to each of the named properties, and set their order attribute so that they are shown in the given order.
The created groups will get order 1, 2, 3,... in the order in which they are created.
group
- name of the groupnames
- property names in the desired orderpublic BeanInfo[] getAdditionalBeanInfo()
public BeanDescriptor getBeanDescriptor()
public int getDefaultEventIndex()
public int getDefaultPropertyIndex()
public EventSetDescriptor[] getEventSetDescriptors()
public Image getIcon(int iconKind)
public MethodDescriptor[] getMethodDescriptors()
public PropertyDescriptor[] getPropertyDescriptors()
|
Apache JMeter 2.0.1.20050615 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |