org.apache.jmeter.threads.gui
Class ThreadGroupGui
- ItemListener, JMeterGUIComponent, Printable
public class ThreadGroupGui
implements ItemListener
ThreadGroupGui() - 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.
|
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 tg) - A newly created gui component can be initialized with the contents of a
Test Element object by calling this method.
|
JPopupMenu | createPopupMenu() - When a user right-clicks on the component in the test tree, or selects
the edit menu when the component is selected, the component will be asked
to return a JPopupMenu that provides all the options available to the
user from this component.
|
TestElement | createTestElement() - JMeter test components are separated into a model and a GUI
representation.
|
String | getLabelResource() - Get the component's resource name, which getStaticLabel uses to derive
the component's label in the local language.
|
Collection | getMenuCategories() - This is the list of add menu categories this gui component will be
available under.
|
Dimension | getPreferredSize()
|
void | itemStateChanged(ItemEvent ie)
|
void | modifyTestElement(TestElement tg) - Modifies a given TestElement to mirror the data in the gui components.
|
void | setNode(JMeterTreeNode node)
|
clearGui , configure , configureTestElement , createTitleLabel , getComment , getDocAnchor , getName , getNamePanel , getNode , getPrintableComponent , getStaticLabel , isEnabled , makeBorder , makeScrollPane , makeScrollPane , makeTitlePanel , setComment , setEnabled , setName , setNode |
ThreadGroupGui
public ThreadGroupGui()
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.
clearGui
public void clearGui()
Provides a default implementation that resets the name field to the value of
getStaticLabel(), reset comment and sets enabled to true. Your GUI may need more things
cleared, in which case you should override, clear the extra fields, and
still call super.clearGui().
- clearGui in interface JMeterGUIComponent
- clearGui in interface AbstractJMeterGuiComponent
configure
public void configure(TestElement tg)
A newly created gui component can be initialized with the contents of a
Test Element object by calling this method. The component is responsible
for querying the Test Element object for the relevant information to
display in its GUI.
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
- configure in interface AbstractJMeterGuiComponent
createPopupMenu
public JPopupMenu createPopupMenu()
When a user right-clicks on the component in the test tree, or selects
the edit menu when the component is selected, the component will be asked
to return a JPopupMenu that provides all the options available to the
user from this component.
- createPopupMenu in interface JMeterGUIComponent
- a JPopupMenu appropriate for the component.
createTestElement
public TestElement createTestElement()
JMeter test components are separated into a model and a GUI
representation. The model holds the data and the GUI displays it. The GUI
class is responsible for knowing how to create and initialize with data
the model class that it knows how to display, and this method is called
when new test elements are created.
- createTestElement in interface JMeterGUIComponent
- the Test Element object that the GUI component represents.
getLabelResource
public 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 overriden in preference to overriding
getStaticLabel(). However where the resource name is not available or required,
getStaticLabel() may be overridden instead.
- getLabelResource in interface JMeterGUIComponent
getMenuCategories
public Collection getMenuCategories()
This is the list of add menu categories this gui component will be
available under. For instance, if this represents a Controller, then the
MenuFactory.CONTROLLERS category should be in the returned collection.
When a user right-clicks on a tree element and looks through the "add"
menu, which category your GUI component shows up in is determined by
which categories are returned by this method. Most GUI's belong to only
one category, but it is possible for a component to exist in multiple
categories.
- getMenuCategories in interface JMeterGUIComponent
- a Collection of Strings, where each element is one of the
constants defined in MenuFactory
getPreferredSize
public Dimension getPreferredSize()
itemStateChanged
public void itemStateChanged(ItemEvent ie)
Copyright © 1998-2010 Apache Software Foundation. All Rights Reserved.