ReportGuiPackage is based on GuiPackage, but with changes for
the reporting tool. Because of how the gui components work, it
was safer to just make a new class, rather than braking existing
JMeter gui code.
createTestElement(Class guiClass, Class testClass) Create a TestElement corresponding to the specified GUI class.
Parameters: guiClass - the fully qualified class name of the GUI component or aTestBean class for TestBeanGUIs. Parameters: testClass - the fully qualified class name of the test elements edited bythis GUI component.
This is a utility method to help actions do with one single String
parameter.
Parameters: objClass - the fully qualified class name of the GUI component or of theTestBean subclass for which a TestBeanGUI is wanted.
public void
displayPopUp(MouseEvent e, JPopupMenu popup) Display the specified popup menu with the source component and location
from the specified mouse event.
public void
displayPopUp(Component invoker, MouseEvent e, JPopupMenu popup) Display the specified popup menu at the location specified by a mouse
event with the specified source component.
getInstance(ReportTreeListener listener, ReportTreeModel treeModel) When GuiPackage is requested for the first time, it should be given
handles to JMeter's Tree Listener and TreeModel.
getTreeModel() Get the model for JMeter's test tree.
public boolean
isDirty() Retrieves the state of the 'dirty' property, a flag that indicates if
there are test tree components that have been modified since they were
last saved.
setDirty(boolean dirty) The dirty property is a flag that indicates whether there are parts of
JMeter's test tree that the user has not saved since last modification.
Add a subtree to the currently selected node.
Parameters: subTree - the subtree to add. the resulting subtree starting with the currently selected node throws: IllegalUserActionException - if a subtree cannot be added to the currently selected node
Create a TestElement corresponding to the specified GUI class.
Parameters: guiClass - the fully qualified class name of the GUI component or aTestBean class for TestBeanGUIs. Parameters: testClass - the fully qualified class name of the test elements edited bythis GUI component. the test element corresponding to the specified GUI class.
This is a utility method to help actions do with one single String
parameter.
Parameters: objClass - the fully qualified class name of the GUI component or of theTestBean subclass for which a TestBeanGUI is wanted. the test element corresponding to the specified GUI class.
Display the specified popup menu with the source component and location
from the specified mouse event.
Parameters: e - the mouse event causing this popup to be displayed Parameters: popup - the popup menu to display
Display the specified popup menu at the location specified by a mouse
event with the specified source component.
Parameters: invoker - the source component Parameters: e - the mouse event causing this popup to be displayed Parameters: popup - the popup menu to display
Get a JMeterGUIComponent for the specified test element. If the GUI has
already been created, that instance will be returned. Otherwise, if a GUI
component of the same type has been created, and the component is not
marked as an
UnsharedComponent , that shared component will be
returned. Otherwise, a new instance of the component will be created. The
TestElement's GUI_CLASS property will be used to determine the
appropriate type of GUI component to use.
Parameters: node - the test element which this GUI is being created for the GUI component corresponding to the specified test element
Get a JMeterGUIComponent for the specified test element. If the GUI has
already been created, that instance will be returned. Otherwise, if a GUI
component of the same type has been created, and the component is not
marked as an
UnsharedComponent , that shared component will be
returned. Otherwise, a new instance of the component will be created.
Parameters: node - the test element which this GUI is being created for Parameters: guiClass - the fully qualifed class name of the GUI component which willbe created if it doesn't already exist Parameters: testClass - the fully qualifed class name of the test elements which haveto be edited by the returned GUI component the GUI component corresponding to the specified test element
When GuiPackage is requested for the first time, it should be given
handles to JMeter's Tree Listener and TreeModel.
Parameters: listener - the TreeListener for JMeter's test tree Parameters: treeModel - the model for JMeter's test tree GuiPackage
Find the JMeterTreeNode for a certain TestElement object.
Parameters: userObject - the test element to search for the tree node associated with the test element
Retrieves the state of the 'dirty' property, a flag that indicates if
there are test tree components that have been modified since they were
last saved.
true if some tree components have been modified since they werelast saved, false otherwise
The dirty property is a flag that indicates whether there are parts of
JMeter's test tree that the user has not saved since last modification.
Various (@link Command actions) set this property when components are
modified/created/saved.
Parameters: dirty - the new value of the dirty flag
This method should be called in order for GuiPackage to change the
current node. This will save any changes made to the earlier node before
choosing the new node.