public class ArgumentsPanel extends AbstractConfigGui implements ActionListener
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
static String |
COLUMN_RESOURCE_NAMES_0 |
static String |
COLUMN_RESOURCE_NAMES_1 |
static String |
COLUMN_RESOURCE_NAMES_2 |
protected ObjectTableModel |
tableModel
The model for the arguments table.
|
namePanel
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
ArgumentsPanel()
Create a new ArgumentsPanel as a standalone component.
|
ArgumentsPanel(boolean disableButtons,
String label)
Create a new ArgumentsPanel as an embedded component, using the specified
title.
|
ArgumentsPanel(String label)
Create a new ArgumentsPanel as an embedded component, using the specified
title.
|
ArgumentsPanel(String label,
boolean enableUpDown)
Create a new ArgumentsPanel as an embedded component, using the specified
title.
|
ArgumentsPanel(String label,
Color bkg)
Create a new ArgumentsPanel with a border and color background
|
ArgumentsPanel(String label,
Color bkg,
boolean enableUpDown,
boolean standalone)
Create a new ArgumentsPanel with a border and color background
|
ArgumentsPanel(String label,
Color bkg,
boolean enableUpDown,
boolean standalone,
ObjectTableModel model)
Create a new ArgumentsPanel with a border and color background
|
ArgumentsPanel(String label,
Color bkg,
boolean enableUpDown,
boolean standalone,
ObjectTableModel model,
boolean disableButtons)
Create a new ArgumentsPanel with a border and color background
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e)
Invoked when an action occurs.
|
protected void |
addArgument()
Add a new argument row to the table.
|
protected void |
addFromClipboard() |
protected void |
addFromClipboard(String lineDelimiter,
String argDelimiter)
Add values from the clipboard
|
protected void |
checkButtonsStatus() |
void |
clear()
Clear all rows from the table.
|
void |
clearBorderForMainPanel()
Clear border around "table with arguments".
|
void |
clearGui()
Provides a default implementation that resets the name field to the value of
getStaticLabel(), reset comment and sets enabled to true.
|
void |
configure(TestElement el)
A newly created component can be initialized with the contents of a Test
Element object by calling this method.
|
protected Argument |
createArgumentFromClipboard(String[] clipboardCols) |
TestElement |
createTestElement()
JMeter test components are separated into a model and a GUI
representation.
|
protected void |
deleteArgument()
Remove the currently selected argument from the table.
|
protected JButton |
getAddButton()
Get the button used to add rows to the table.
|
protected JButton |
getDeleteButton()
Get the button used to delete rows from the table.
|
String |
getLabelResource()
Get the component's resource name, which getStaticLabel uses to derive
the component's label in the local language.
|
Collection<String> |
getMenuCategories()
This is the list of menu categories this gui component will be available
under.
|
protected JTable |
getTable()
Get the table used to enter arguments.
|
protected JLabel |
getTableLabel()
Get the title label for this component.
|
protected void |
initializeTableModel()
Initialize the table model used for the arguments table.
|
protected Component |
makeLabelPanel()
Create a panel containing the title label for the table.
|
protected Argument |
makeNewArgument()
Create a new Argument object.
|
void |
modifyTestElement(TestElement args)
GUI components are responsible for populating TestElements they create
with the data currently held in the GUI components.
|
protected void |
sizeColumns(JTable _table)
Resize the table columns to appropriate widths.
|
protected void |
stopTableEditing()
Stop any editing that is currently being done on the table.
|
static boolean |
testFunctors() |
createPopupMenu
configureTestElement, createTitleLabel, getComment, getDocAnchor, getName, getNamePanel, getPrintableComponent, getStaticLabel, isEnabled, makeBorder, makeScrollPane, makeScrollPane, makeTitlePanel, setComment, setEnabled, setName, wrapTitlePanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
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, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
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
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, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, 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, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
canBeAdded
protected transient ObjectTableModel tableModel
public static final String COLUMN_RESOURCE_NAMES_0
public static final String COLUMN_RESOURCE_NAMES_1
public static final String COLUMN_RESOURCE_NAMES_2
public ArgumentsPanel()
public ArgumentsPanel(String label)
label
- the title for the component.public ArgumentsPanel(String label, boolean enableUpDown)
label
- the title for the component.enableUpDown
- Add up/down buttonspublic ArgumentsPanel(boolean disableButtons, String label)
disableButtons
- Remove Edit all buttonslabel
- the title for the component.public ArgumentsPanel(String label, Color bkg)
label
- text for labelbkg
- background colourpublic ArgumentsPanel(String label, Color bkg, boolean enableUpDown, boolean standalone)
label
- text for labelbkg
- background colourenableUpDown
- Add up/down buttonsstandalone
- is standalonepublic ArgumentsPanel(String label, Color bkg, boolean enableUpDown, boolean standalone, ObjectTableModel model)
label
- text for labelbkg
- background colourenableUpDown
- Add up/down buttonsstandalone
- is standalonemodel
- the table model to usepublic ArgumentsPanel(String label, Color bkg, boolean enableUpDown, boolean standalone, ObjectTableModel model, boolean disableButtons)
label
- text for labelbkg
- background colourenableUpDown
- Add up/down buttonsstandalone
- is standalonemodel
- the table model to usedisableButtons
- Remove all buttonspublic Collection<String> getMenuCategories()
getMenuCategories
in interface JMeterGUIComponent
getMenuCategories
in class AbstractConfigGui
MenuFactory
public String getLabelResource()
JMeterGUIComponent
getLabelResource
in interface JMeterGUIComponent
public TestElement createTestElement()
JMeterGUIComponent
The canonical implementation looks like this:
public TestElement createTestElement() { TestElementXYZ el = new TestElementXYZ(); modifyTestElement(el); return el; }
createTestElement
in interface JMeterGUIComponent
public void modifyTestElement(TestElement args)
JMeterGUIComponent
The canonical implementation looks like this:
public void modifyTestElement(TestElement element) { element.clear(); // many implementations use this configureTestElement(element); // Using the element setters (preferred): TestElementXYZ xyz = (TestElementXYZ) element; xyz.setState(guiState.getText()); xyz.setCode(guiCode.getText()); ... other GUI fields ... // or directly (do not use unless there is no setter for the field): element.setProperty(TestElementXYZ.STATE, guiState.getText()) element.setProperty(TestElementXYZ.CODE, guiCode.getText()) ... other GUI fields ... }
modifyTestElement
in interface JMeterGUIComponent
args
- the TestElement to modifypublic void configure(TestElement el)
configure
in interface JMeterGUIComponent
configure
in class AbstractJMeterGuiComponent
el
- the TestElement to configureprotected JTable getTable()
protected JLabel getTableLabel()
protected JButton getDeleteButton()
protected JButton getAddButton()
protected void checkButtonsStatus()
public void clearGui()
AbstractJMeterGuiComponent
clearGui
in interface ClearGui
clearGui
in class AbstractJMeterGuiComponent
public void clear()
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
e
- the event that has occurredprotected void deleteArgument()
protected void addArgument()
protected void addFromClipboard(String lineDelimiter, String argDelimiter)
lineDelimiter
- Delimiter string to split clipboard into linesargDelimiter
- Delimiter string to split line into key-value pairprotected void addFromClipboard()
protected Argument makeNewArgument()
protected void stopTableEditing()
protected void initializeTableModel()
public static boolean testFunctors()
protected void sizeColumns(JTable _table)
_table
- the table to resize columns forprotected Component makeLabelPanel()
public void clearBorderForMainPanel()
Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.