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

      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.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT` Default value, must be provided if `NOT_UNDEFINED` is TRUE
    `static String` | `DEFAULT_GROUP`
    `static String` | `DEFAULT_NOT_SAVED` Default value is not saved; only non-defaults are saved
    `static String` | `GROUP`
    `static String` | `GUITYPE` Property editor override; must be an enum of type `TypeEditor`
    `static String` | `MULTILINE` If specified, create a multi-line editor
    `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.
    `static String` | `ORDER`
    `static String` | `RESOURCE_BUNDLE` 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

      `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

    Constructors
    Constructor and Description
    `GenericTestBeanCustomizer()` Deprecated. only for use by test code

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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, 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, getPeer, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, 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 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:

      - `NOT_OTHER` is TRUE, and
      - `PropertyEditor.getTags()` is null
      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

    - #### MULTILINE

          public static final String MULTILINE

      If specified, create a multi-line editor
      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

    - #### DEFAULT_NOT_SAVED

          public static final String DEFAULT_NOT_SAVED

      Default value is not saved; only non-defaults are saved
      See Also:
        Constant Field Values

    - #### RESOURCE_BUNDLE

          public static final String RESOURCE_BUNDLE

      Pointer to the resource bundle, if any (will generally be null)
      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

    - #### TEXT_LANGUAGE

          public static final String TEXT_LANGUAGE

      TextEditor property
      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 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>

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