Apache JMeter

org.apache.jmeter.testbeans.gui
Class GenericTestBeanCustomizer

java.lang.Object
  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
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, 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
           
static String RESOURCE_BUNDLE
           
static String TAGS
          Array of permissible values.
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
GenericTestBeanCustomizer()
          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, 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, 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

GROUP

public static final String GROUP
See Also:
Constant Field Values

ORDER

public static final String ORDER
See Also:
Constant Field Values

TAGS

public static final String TAGS
Array of permissible values.

Must be provided if:

See Also:
Constant Field Values

NOT_UNDEFINED

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

NOT_EXPRESSION

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

See Also:
Constant Field Values

NOT_OTHER

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

DEFAULT

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

See Also:
Constant Field Values

RESOURCE_BUNDLE

public static final String RESOURCE_BUNDLE
See Also:
Constant Field Values

GUITYPE

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

See Also:
Constant Field Values

DEFAULT_GROUP

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

GenericTestBeanCustomizer

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

Method Detail

ORDER

public static final String ORDER(String group)

setObject

public void setObject(Object map)

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

Apache JMeter

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