|
Apache JMeter | ||||||||
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
public abstract class 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 java.lang.String |
DEFAULT
|
static java.lang.String |
NOT_EXPRESSION
|
static java.lang.String |
NOT_OTHER
|
static java.lang.String |
NOT_UNDEFINED
|
static java.lang.String |
RESOURCE_BUNDLE
|
static java.lang.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(java.lang.Class beanClass)
Construct a BeanInfo for the given class. |
Method Summary | |
---|---|
protected void |
createPropertyGroup(java.lang.String group,
java.lang.String[] names)
Utility method to group and order properties. |
java.beans.BeanInfo[] |
getAdditionalBeanInfo()
|
java.beans.BeanDescriptor |
getBeanDescriptor()
|
int |
getDefaultEventIndex()
|
int |
getDefaultPropertyIndex()
|
java.beans.EventSetDescriptor[] |
getEventSetDescriptors()
|
java.awt.Image |
getIcon(int iconKind)
|
java.beans.MethodDescriptor[] |
getMethodDescriptors()
|
java.beans.PropertyDescriptor[] |
getPropertyDescriptors()
|
protected java.beans.PropertyDescriptor |
property(java.lang.String name)
Get the property descriptor for the property of the given name. |
protected void |
setIcon(java.lang.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 java.lang.String TAGS
public static final java.lang.String NOT_UNDEFINED
public static final java.lang.String NOT_EXPRESSION
public static final java.lang.String NOT_OTHER
public static final java.lang.String DEFAULT
public static final java.lang.String RESOURCE_BUNDLE
Constructor Detail |
---|
protected BeanInfoSupport(java.lang.Class beanClass)
Method Detail |
---|
protected java.beans.PropertyDescriptor property(java.lang.String name)
name
- property name
protected void setIcon(java.lang.String resourceName)
resourceName
- A pathname relative to the directory holding the class file of
the current class.protected void createPropertyGroup(java.lang.String group, java.lang.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 java.beans.BeanInfo[] getAdditionalBeanInfo()
getAdditionalBeanInfo
in interface java.beans.BeanInfo
getAdditionalBeanInfo
in class java.beans.SimpleBeanInfo
public java.beans.BeanDescriptor getBeanDescriptor()
getBeanDescriptor
in interface java.beans.BeanInfo
getBeanDescriptor
in class java.beans.SimpleBeanInfo
public int getDefaultEventIndex()
getDefaultEventIndex
in interface java.beans.BeanInfo
getDefaultEventIndex
in class java.beans.SimpleBeanInfo
public int getDefaultPropertyIndex()
getDefaultPropertyIndex
in interface java.beans.BeanInfo
getDefaultPropertyIndex
in class java.beans.SimpleBeanInfo
public java.beans.EventSetDescriptor[] getEventSetDescriptors()
getEventSetDescriptors
in interface java.beans.BeanInfo
getEventSetDescriptors
in class java.beans.SimpleBeanInfo
public java.awt.Image getIcon(int iconKind)
getIcon
in interface java.beans.BeanInfo
getIcon
in class java.beans.SimpleBeanInfo
public java.beans.MethodDescriptor[] getMethodDescriptors()
getMethodDescriptors
in interface java.beans.BeanInfo
getMethodDescriptors
in class java.beans.SimpleBeanInfo
public java.beans.PropertyDescriptor[] getPropertyDescriptors()
getPropertyDescriptors
in interface java.beans.BeanInfo
getPropertyDescriptors
in class java.beans.SimpleBeanInfo
|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |