public abstract class AbstractJMeterGuiComponent extends JPanel implements JMeterGUIComponent, Printable
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
protected NamePanel |
namePanel
Deprecated.
use
getName() or createTitleLabel() for better alignment of the fields |
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 |
---|
AbstractJMeterGuiComponent()
When constructing a new component, this takes care of basic tasks like
setting up the Name Panel and assigning the class's static label as the
name to start.
|
Modifier and Type | Method and Description |
---|---|
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 element)
A newly created gui component can be initialized with the contents of a
Test Element object by calling this method.
|
protected void |
configureTestElement(TestElement mc)
This provides a convenience for extenders when they implement the
JMeterGUIComponent.modifyTestElement(TestElement) method. |
protected Component |
createTitleLabel()
Provides a label containing the title for the component.
|
String |
getComment()
Provides a default implementation for the comment property.
|
String |
getDocAnchor()
Compute Anchor value to find reference in documentation for a particular component
|
String |
getName()
Provides a default implementation for the name property.
|
protected NamePanel |
getNamePanel()
Deprecated.
use
getName() or createTitleLabel() for better alignment of the fields |
JComponent |
getPrintableComponent()
Subclasses need to over-ride this method, if they wish to return
something other than the Visualizer itself.
|
String |
getStaticLabel()
Get the component's label.
|
boolean |
isEnabled()
Provides a default implementation for the enabled property.
|
protected Border |
makeBorder()
Create a top-level Border which can be added to JMeter components.
|
protected JScrollPane |
makeScrollPane(Component comp)
Create a scroll panel that sets it's preferred size to it's minimum size.
|
protected JScrollPane |
makeScrollPane(Component comp,
int verticalPolicy,
int horizontalPolicy)
Create a scroll panel that sets it's preferred size to it's minimum size.
|
protected Container |
makeTitlePanel()
Create a standard title section for JMeter components.
|
void |
setComment(String comment)
Provides a default implementation for setting the comment property.
|
void |
setEnabled(boolean enabled)
Provides a default implementation for the enabled property.
|
void |
setName(String name)
Provides a default implementation for setting the name property.
|
protected Container |
wrapTitlePanel(Container titlePanel) |
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, createPopupMenu, createTestElement, getLabelResource, getMenuCategories, modifyTestElement
@API(status=INTERNAL, since="5.2.0") @Deprecated protected NamePanel namePanel
getName()
or createTitleLabel()
for better alignment of the fieldspublic AbstractJMeterGuiComponent()
public void setName(String name)
setName
in interface JMeterGUIComponent
setName
in class Component
name
- the name of the componentpublic void setComment(String comment)
comment
- The comment for the propertypublic boolean isEnabled()
isEnabled
in interface JMeterGUIComponent
isEnabled
in class Component
public void setEnabled(boolean enabled)
setEnabled
in interface JMeterGUIComponent
setEnabled
in class JComponent
enabled
- true for enabled, false for disabled.public String getName()
getName
in interface JMeterGUIComponent
getName
in class Component
public String getComment()
@API(status=DEPRECATED, since="5.2.0") @Deprecated protected NamePanel getNamePanel()
getName()
or createTitleLabel()
for better alignment of the fieldsmakeTitlePanel()
instead of directly calling this method.protected Component createTitleLabel()
getStaticLabel()
method. Most
components place this label automatically by calling
makeTitlePanel()
instead of directly calling this method.public void configure(TestElement element)
AbstractJMeterGuiComponent provides a partial implementation of this method, setting the name of the component and its enabled status. Subclasses should override this method, performing their own configuration as needed, but also calling this super-implementation.
configure
in interface JMeterGUIComponent
element
- the TestElement to configurepublic void clearGui()
protected void configureTestElement(TestElement mc)
JMeterGUIComponent.modifyTestElement(TestElement)
method. This
method will set the name, gui class, and test class for the created Test
Element. It should be called by every extending class when
creating/modifying Test Elements, as that will best assure consistent
behavior.mc
- the TestElement being created.protected Container makeTitlePanel()
@API(status=EXPERIMENTAL, since="5.2.0") protected Container wrapTitlePanel(Container titlePanel)
protected Border makeBorder()
protected JScrollPane makeScrollPane(Component comp)
comp
- the component which should be placed inside the scroll paneprotected JScrollPane makeScrollPane(Component comp, int verticalPolicy, int horizontalPolicy)
comp
- the component which should be placed inside the scroll paneverticalPolicy
- the vertical scroll policyhorizontalPolicy
- the horizontal scroll policyScrollPaneConstants
public String getStaticLabel()
JMeterGUIComponent
getStaticLabel
in interface JMeterGUIComponent
JMeterGUIComponent.getLabelResource()
public String getDocAnchor()
getDocAnchor
in interface JMeterGUIComponent
public JComponent getPrintableComponent()
getPrintableComponent
in interface Printable
Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.