Class OpenModelThreadGroupGui
-
- All Implemented Interfaces:
-
java.awt.MenuContainer
,java.awt.image.ImageObserver
,java.io.Serializable
,javax.accessibility.Accessible
,javax.swing.TransferHandler.HasGetTransferHandler
,org.apache.jmeter.gui.ClearGui
,org.apache.jmeter.gui.JMeterGUIComponent
,org.apache.jmeter.visualizers.Printable
@API(status = API.Status.EXPERIMENTAL, since = "5.5") public final class OpenModelThreadGroupGui extends AbstractThreadGroupGui
-
-
Field Summary
Fields Modifier and Type Field Description private Boolean
enabled
private Float
alignmentX
private Float
alignmentY
private Boolean
autoscrolls
private Border
border
private InputVerifier
inputVerifier
private Boolean
verifyInputWhenFocusTarget
private ActionMap
actionMap
private FocusTraversalPolicy
focusTraversalPolicy
private Boolean
focusCycleRoot
private Boolean
focusTraversalPolicyProvider
private final Container
parent
private final Integer
x
private final Integer
y
private final Integer
width
private final Integer
height
private Color
foreground
private Color
background
private Font
font
private Cursor
cursor
private Locale
locale
private Boolean
ignoreRepaint
private Boolean
visible
private final Boolean
valid
private DropTarget
dropTarget
private String
name
private Boolean
focusable
private Boolean
focusTraversalKeysEnabled
private ComponentOrientation
componentOrientation
-
Constructor Summary
Constructors Constructor Description OpenModelThreadGroupGui()
-
Method Summary
Modifier and Type Method Description String
getLabelResource()
Get the component's resource name, which getStaticLabel uses to derive the component's label in the local language. TestElement
makeTestElement()
Creates the test element represented by the GUI component. Unit
modifyTestElement(TestElement element)
GUI components are responsible for populating TestElements they create with the data currently held in the GUI components. -
Methods inherited from class org.apache.jmeter.gui.AbstractJMeterGuiComponent
getComment, getDocAnchor, getName, getPrintableComponent, getStaticLabel, isEnabled, setComment, setEnabled, setName
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponentZOrder, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isFocusOwner, isFocusTraversable, isFocusable, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusTraversalKeysEnabled, setFocusable, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Methods inherited from class org.apache.jmeter.threads.gui.AbstractThreadGroupGui
assignDefaultValues, clearGui, configure, createPopupMenu, getMenuCategories, getPreferredSize
-
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
-
Methods inherited from class org.apache.jmeter.gui.JMeterGUIComponent
canBeAdded, createTestElement
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getLabelResource
String getLabelResource()
Get the component's resource name, which getStaticLabel uses to derive the component's label in the local language. The resource name is fixed, and does not vary with the selected language.
Normally this method should be overridden in preference to overriding getStaticLabel(). However where the resource name is not available or required, getStaticLabel() may be overridden instead.
- Returns:
the resource name
-
makeTestElement
TestElement makeTestElement()
Creates the test element represented by the GUI component.
- Returns:
a new TestElement
- Since:
5.6.3
-
modifyTestElement
Unit modifyTestElement(TestElement element)
GUI components are responsible for populating TestElements they create with the data currently held in the GUI components. This method should overwrite whatever data is currently in the TestElement as it is called after a user has filled out the form elements in the gui with new information.
If you override AbstractJMeterGuiComponent, you might want using bindingGroup instead of overriding
modifyTestElement
.The canonical implementation looks like this:
@Override public void modifyTestElement(TestElement element) { super.modifyTestElement(element); // clear the element and assign basic fields like name, gui class, test class // Using the element setters (preferred): // If the field is empty, you probably want to remove the property instead of storing an empty string // See Streamline binding of UI elements to TestElement properties // for more details TestElementXYZ xyz = (TestElementXYZ) element; xyz.setState(StringUtils.defaultIfEmpty(guiState.getText(), null)); xyz.setCode(StringUtils.defaultIfEmpty(guiCode.getText(), null)); ... other GUI fields ... // or directly (do not use unless there is no setter for the field): element.setProperty(TestElementXYZ.STATE, StringUtils.defaultIfEmpty(guiState.getText(), null)) element.setProperty(TestElementXYZ.CODE, StringUtils.defaultIfEmpty(guiCode.getText(), null)) ... other GUI fields ... }
-
-
-
-