org.apache.jmeter.testbeans
public abstract class BeanInfoSupport extends SimpleBeanInfo
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.
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT |
static String |
MULTILINE |
static String |
NOT_EXPRESSION |
static String |
NOT_OTHER |
static String |
NOT_UNDEFINED |
static String |
RESOURCE_BUNDLE |
static String |
TAGS |
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32
Modifier | Constructor and Description |
---|---|
protected |
BeanInfoSupport(Class<?> beanClass)
Construct a BeanInfo for the given class.
|
Modifier and Type | Method and Description |
---|---|
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.
|
loadImage
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 MULTILINE
public static final String DEFAULT
public static final String RESOURCE_BUNDLE
protected BeanInfoSupport(Class<?> beanClass)
protected PropertyDescriptor property(String name)
name
- property nameprotected 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()
getAdditionalBeanInfo
in interface BeanInfo
getAdditionalBeanInfo
in class SimpleBeanInfo
public BeanDescriptor getBeanDescriptor()
getBeanDescriptor
in interface BeanInfo
getBeanDescriptor
in class SimpleBeanInfo
public int getDefaultEventIndex()
getDefaultEventIndex
in interface BeanInfo
getDefaultEventIndex
in class SimpleBeanInfo
public int getDefaultPropertyIndex()
getDefaultPropertyIndex
in interface BeanInfo
getDefaultPropertyIndex
in class SimpleBeanInfo
public EventSetDescriptor[] getEventSetDescriptors()
getEventSetDescriptors
in interface BeanInfo
getEventSetDescriptors
in class SimpleBeanInfo
public Image getIcon(int iconKind)
getIcon
in interface BeanInfo
getIcon
in class SimpleBeanInfo
public MethodDescriptor[] getMethodDescriptors()
getMethodDescriptors
in interface BeanInfo
getMethodDescriptors
in class SimpleBeanInfo
public PropertyDescriptor[] getPropertyDescriptors()
getPropertyDescriptors
in interface BeanInfo
getPropertyDescriptors
in class SimpleBeanInfo
Copyright © 1998-2014 Apache Software Foundation. All Rights Reserved.