Package org.apache.jmeter.testbeans.gui
Class GenericTestBeanCustomizer
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.apache.jmeter.testbeans.gui.GenericTestBeanCustomizer
- All Implemented Interfaces:
ImageObserver
,MenuContainer
,Customizer
,Serializable
,Accessible
,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:
-
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.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Default value, must be provided ifNOT_UNDEFINED
is TRUEstatic final String
static final String
Default value is not saved; only non-defaults are savedstatic final String
static final String
Property editor override; must be an enum of typeTypeEditor
static final String
If specified, create a multi-line editorstatic final String
Whether the field disallows JMeter expressions; Boolean, default FALSEstatic final String
Whether the field disallows constant values different from the provided tags; Boolean, default FALSEstatic final String
Whether the field must be defined (i.e.static final String
static final String
Pointer to the resource bundle, if any (will generally be null)static final String
Array of permissible values.static final String
TextEditor propertyFields inherited from class javax.swing.JComponent
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
accessibleContext, 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
-
Method Summary
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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, 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, 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, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, 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 Details
-
GROUP
- See Also:
-
ORDER
- See Also:
-
TAGS
Array of permissible values.Must be provided if:
NOT_OTHER
is TRUE, andPropertyEditor.getTags()
is null
- See Also:
-
NOT_UNDEFINED
Whether the field must be defined (i.e. is required); Boolean, defaults to FALSE- See Also:
-
NOT_EXPRESSION
Whether the field disallows JMeter expressions; Boolean, default FALSE- See Also:
-
NOT_OTHER
Whether the field disallows constant values different from the provided tags; Boolean, default FALSE- See Also:
-
MULTILINE
If specified, create a multi-line editor- See Also:
-
DEFAULT
Default value, must be provided ifNOT_UNDEFINED
is TRUE- See Also:
-
DEFAULT_NOT_SAVED
Default value is not saved; only non-defaults are saved- See Also:
-
RESOURCE_BUNDLE
Pointer to the resource bundle, if any (will generally be null)- See Also:
-
GUITYPE
Property editor override; must be an enum of typeTypeEditor
- See Also:
-
TEXT_LANGUAGE
TextEditor property- See Also:
-
DEFAULT_GROUP
- See Also:
-
-
Constructor Details
-
GenericTestBeanCustomizer
Deprecated.only for use by test code
-
-
Method Details
-
ORDER
-
setObject
- Specified by:
setObject
in interfaceCustomizer
- Parameters:
map
- must be an instance of Map<String, Object>
-