|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel org.apache.jmeter.gui.AbstractJMeterGuiComponent
public abstract class AbstractJMeterGuiComponent
This abstract class takes care of the most basic functions necessary to create a viable JMeter GUI component. It extends JPanel and implements JMeterGUIComponent. This abstract class is, in turn, extended by several other abstract classes that create different classes of GUI components for JMeter (Visualizers, Timers, Samplers, Modifiers, Controllers, etc).
JMeterGUIComponent
,
AbstractConfigGui
,
AbstractAssertionGui
,
AbstractControllerGui
,
AbstractTimerGui
,
AbstractVisualizer
,
AbstractSamplerGui
,
Serialized FormNested 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.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected NamePanel |
namePanel
A GUI panel containing the name of this component. |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, 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 |
---|
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 | |
---|---|
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. |
Method Summary | |
---|---|
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()
Provides the Name Panel for extending classes. |
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 e)
Provides a default implementation for the enabled property. |
void |
setName(String name)
Provides a default implementation for setting the name property. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.jmeter.gui.JMeterGUIComponent |
---|
createPopupMenu, createTestElement, getLabelResource, getMenuCategories, modifyTestElement |
Field Detail |
---|
protected NamePanel namePanel
Constructor Detail |
---|
public AbstractJMeterGuiComponent()
Method Detail |
---|
public void setName(String name)
setName
in interface JMeterGUIComponent
setName
in class Component
name
- the name of the componentpublic void setComment(String comment)
public boolean isEnabled()
isEnabled
in interface JMeterGUIComponent
isEnabled
in class Component
public void setEnabled(boolean e)
setEnabled
in interface JMeterGUIComponent
setEnabled
in class JComponent
e
- true for enabled, false for disabled.public String getName()
getName
in interface JMeterGUIComponent
getName
in class Component
public String getComment()
protected NamePanel getNamePanel()
makeTitlePanel()
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()
clearGui
in interface JMeterGUIComponent
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()
protected Border makeBorder()
protected JScrollPane makeScrollPane(Component comp)
comp
- the component which should be placed inside the scroll pane
protected 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 policy
ScrollPaneConstants
public String getStaticLabel()
JMeterGUIComponent
getStaticLabel
in interface JMeterGUIComponent
JMeterGUIComponent.getLabelResource()
public String getDocAnchor()
getDocAnchor
in interface JMeterGUIComponent
public JComponent getPrintableComponent()
getPrintableComponent
in interface Printable
|
Apache JMeter | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |