public abstract class AbstractJMeterGuiComponent extends javax.swing.JPanel implements JMeterGUIComponent, Printable
javax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
protected NamePanel |
namePanel
A GUI panel containing the name of this component.
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| 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 java.awt.Component |
createTitleLabel()
Provides a label containing the title for the component.
|
java.lang.String |
getComment()
Provides a default implementation for the comment property.
|
java.lang.String |
getDocAnchor()
Compute Anchor value to find reference in documentation for a particular component
|
java.lang.String |
getName()
Provides a default implementation for the name property.
|
protected NamePanel |
getNamePanel()
Provides the Name Panel for extending classes.
|
javax.swing.JComponent |
getPrintableComponent()
Subclasses need to over-ride this method, if they wish to return
something other than the Visualizer itself.
|
java.lang.String |
getStaticLabel()
Get the component's label.
|
boolean |
isEnabled()
Provides a default implementation for the enabled property.
|
protected javax.swing.border.Border |
makeBorder()
Create a top-level Border which can be added to JMeter components.
|
protected javax.swing.JScrollPane |
makeScrollPane(java.awt.Component comp)
Create a scroll panel that sets it's preferred size to it's minimum size.
|
protected javax.swing.JScrollPane |
makeScrollPane(java.awt.Component comp,
int verticalPolicy,
int horizontalPolicy)
Create a scroll panel that sets it's preferred size to it's minimum size.
|
protected java.awt.Container |
makeTitlePanel()
Create a standard title section for JMeter components.
|
void |
setComment(java.lang.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(java.lang.String name)
Provides a default implementation for setting the name property.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, 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, updateadd, 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, validateTreeaction, 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, transferFocusUpCycleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcanBeAdded, createPopupMenu, createTestElement, getLabelResource, getMenuCategories, modifyTestElementprotected NamePanel namePanel
public AbstractJMeterGuiComponent()
public void setName(java.lang.String name)
setName in interface JMeterGUIComponentsetName in class java.awt.Componentname - the name of the componentpublic void setComment(java.lang.String comment)
comment - The comment for the propertypublic boolean isEnabled()
isEnabled in interface JMeterGUIComponentisEnabled in class java.awt.Componentpublic void setEnabled(boolean enabled)
setEnabled in interface JMeterGUIComponentsetEnabled in class javax.swing.JComponentenabled - true for enabled, false for disabled.public java.lang.String getName()
getName in interface JMeterGUIComponentgetName in class java.awt.Componentpublic java.lang.String getComment()
protected NamePanel getNamePanel()
makeTitlePanel() instead of directly calling this method.protected java.awt.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 JMeterGUIComponentelement - 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 java.awt.Container makeTitlePanel()
protected javax.swing.border.Border makeBorder()
protected javax.swing.JScrollPane makeScrollPane(java.awt.Component comp)
comp - the component which should be placed inside the scroll paneprotected javax.swing.JScrollPane makeScrollPane(java.awt.Component comp,
int verticalPolicy,
int horizontalPolicy)
comp - the component which should be placed inside the scroll paneverticalPolicy - the vertical scroll policyhorizontalPolicy - the horizontal scroll policyScrollPaneConstantspublic java.lang.String getStaticLabel()
JMeterGUIComponentgetStaticLabel in interface JMeterGUIComponentJMeterGUIComponent.getLabelResource()public java.lang.String getDocAnchor()
getDocAnchor in interface JMeterGUIComponentpublic javax.swing.JComponent getPrintableComponent()
getPrintableComponent in interface PrintableCopyright © 1998-2018 Apache Software Foundation. All Rights Reserved.