Apache JMeter

Class GenericTestBeanCustomizer

  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by org.apache.jmeter.testbeans.gui.GenericTestBeanCustomizer
All Implemented Interfaces:
ImageObserver, MenuContainer, Customizer, Serializable, Accessible, SharedCustomizer

public class GenericTestBeanCustomizer
extends JPanel
implements SharedCustomizer

The GenericTestBeanCustomizer is designed to provide developers with a mechanism to quickly implement GUIs for new components.

It allows editing each of the public exposed properties of the edited type 'a la JavaBeans': as far as the types of those properties have an associated editor, there's no GUI development required.

This class understands the following PropertyDescriptor attributes:

group: String
Group under which the property should be shown in the GUI. The string is also used as a group title (but see comment on resourceBundle below). The default group is "".
order: Integer
Order in which the property will be shown in its group. A smaller integer means higher up in the GUI. The default order is 0. Properties of equal order are sorted alphabetically.
tags: String[]
List of values to be offered for the property in addition to those offered by its property editor.
notUndefined: Boolean
If true, the property should not be left undefined. A default attribute must be provided if this is set.
notExpression: Boolean
If true, the property content should always be constant: JMeter 'expressions' (strings using ${var}, etc...) can't be used.
notOther: Boolean
If true, the property content must always be one of the tags values or null.
default: Object
Initial value for the property's GUI. Must be provided and be non-null if notUndefined is set. Must be one of the provided tags (or null) if notOther is set.

The following BeanDescriptor attributes are also understood:

group.group.order: Integer
where group is a group name used in a group attribute in one or more PropertyDescriptors. Defines the order in which the group will be shown in the GUI. A smaller integer means higher up in the GUI. The default order is 0. Groups of equal order are sorted alphabetically.
resourceBundle: ResourceBundle
A resource bundle to be used for GUI localization: group display names will be obtained from property "group.displayName" if available (where group is the group name).

See Also:
Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
Nested classes/interfaces inherited from class java.awt.Container
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Field Summary
static String DEFAULT
          Default value, must be provided if NOT_UNDEFINED is TRUE
static String DEFAULT_GROUP
static String GROUP
static String GUITYPE
          Property editor override; must be an enum of type TypeEditor
static String NOT_EXPRESSION
          Whether the field disallows JMeter expressions; Boolean, default FALSE
static String NOT_OTHER
          Whether the field disallows constant values different from the provided tags; Boolean, default FALSE
static String NOT_UNDEFINED
          Whether the field must be defined (i.e. is required); Boolean, defaults to FALSE
static String ORDER
          Pointer to the resource bundle, if any (will generally be null)
static String TAGS
          Array of permissible values.
static String TEXT_LANGUAGE
          TextEditor property
Fields inherited from class javax.swing.JComponent
Fields inherited from class java.awt.Component
Fields inherited from interface java.awt.image.ImageObserver
Constructor Summary
          Deprecated. only for use by test code
Method Summary
static String ORDER(String group)
 void setObject(Object map)
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.beans.Customizer
addPropertyChangeListener, removePropertyChangeListener

Field Detail


public static final String GROUP
See Also:
Constant Field Values


public static final String ORDER
See Also:
Constant Field Values


public static final String TAGS
Array of permissible values.

Must be provided if:

See Also:
Constant Field Values


public static final String NOT_UNDEFINED
Whether the field must be defined (i.e. is required); Boolean, defaults to FALSE

See Also:
Constant Field Values


public static final String NOT_EXPRESSION
Whether the field disallows JMeter expressions; Boolean, default FALSE

See Also:
Constant Field Values


public static final String NOT_OTHER
Whether the field disallows constant values different from the provided tags; Boolean, default FALSE

See Also:
Constant Field Values


public static final String DEFAULT
Default value, must be provided if NOT_UNDEFINED is TRUE

See Also:
Constant Field Values


public static final String RESOURCE_BUNDLE
Pointer to the resource bundle, if any (will generally be null)

See Also:
Constant Field Values


public static final String GUITYPE
Property editor override; must be an enum of type TypeEditor

See Also:
Constant Field Values


public static final String TEXT_LANGUAGE
TextEditor property

See Also:
Constant Field Values


public static final String DEFAULT_GROUP
See Also:
Constant Field Values
Constructor Detail


public GenericTestBeanCustomizer()
Deprecated. only for use by test code

Method Detail


public static final String ORDER(String group)


public void setObject(Object map)

Specified by:
setObject in interface Customizer
map - must be an instance of Map<String, Object>

Apache JMeter

Copyright © 1998-2013 Apache Software Foundation. All Rights Reserved.