📄 guipackage.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc -->
<TITLE>
GuiPackage (Apache JMeter API)
</TITLE>
<META NAME="keywords" CONTENT="org.apache.jmeter.gui.GuiPackage class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="GuiPackage (Apache JMeter API)";
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<b>Apache JMeter</b></EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../org/apache/jmeter/gui/GUIFactory.html" title="class in org.apache.jmeter.gui"><B>PREV CLASS</B></A>
<A HREF="../../../../org/apache/jmeter/gui/JMeterFileFilter.html" title="class in org.apache.jmeter.gui"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A>
<A HREF="GuiPackage.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.jmeter.gui</FONT>
<BR>
Class GuiPackage</H2>
<PRE>
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by"><B>org.apache.jmeter.gui.GuiPackage</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../org/apache/jmeter/util/LocaleChangeListener.html" title="interface in org.apache.jmeter.util">LocaleChangeListener</A></DD>
</DL>
<HR>
<DL>
<DT>public final class <B>GuiPackage</B><DT>extends <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A><DT>implements <A HREF="../../../../org/apache/jmeter/util/LocaleChangeListener.html" title="interface in org.apache.jmeter.util">LocaleChangeListener</A></DL>
<P>
GuiPackage is a static class that provides convenient access to information
about the current state of JMeter's GUI. Any GUI class can grab a handle to
GuiPackage by calling the static method <A HREF="../../../../org/apache/jmeter/gui/GuiPackage.html#getInstance()"><CODE>getInstance()</CODE></A> and then use
it to query the GUI about it's state. When actions, for instance, need to
affect the GUI, they typically use GuiPackage to get access to different
parts of the GUI.
<P>
<P>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../org/apache/jorphan/collections/HashTree.html" title="class in org.apache.jorphan.collections">HashTree</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/jmeter/gui/GuiPackage.html#addSubTree(org.apache.jorphan.collections.HashTree)">addSubTree</A></B>(<A HREF="../../../../org/apache/jorphan/collections/HashTree.html" title="class in org.apache.jorphan.collections">HashTree</A> subTree)</CODE>
<BR>
Add a subtree to the currently selected node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/jmeter/gui/GuiPackage.html#clearTestPlan()">clearTestPlan</A></B>()</CODE>
<BR>
Clears the test plan and associated objects.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/jmeter/gui/GuiPackage.html#clearTestPlan(org.apache.jmeter.testelement.TestElement)">clearTestPlan</A></B>(<A HREF="../../../../org/apache/jmeter/testelement/TestElement.html" title="interface in org.apache.jmeter.testelement">TestElement</A> element)</CODE>
<BR>
Clears the test plan element and associated object</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../org/apache/jmeter/testelement/TestElement.html" title="interface in org.apache.jmeter.testelement">TestElement</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/jmeter/gui/GuiPackage.html#createTestElement(java.lang.Class, java.lang.Class)">createTestElement</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A> guiClass,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A> testClass)</CODE>
<BR>
Create a TestElement corresponding to the specified GUI class.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../org/apache/jmeter/testelement/TestElement.html" title="interface in org.apache.jmeter.testelement">TestElement</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/jmeter/gui/GuiPackage.html#createTestElement(java.lang.String)">createTestElement</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> objClass)</CODE>
<BR>
Create a TestElement for a GUI or TestBean class.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/jmeter/gui/GuiPackage.html#displayPopUp(java.awt.Component, java.awt.event.MouseEvent, javax.swing.JPopupMenu)">displayPopUp</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Component.html" title="class or interface in java.awt">Component</A> invoker,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/event/MouseEvent.html" title="class or interface in java.awt.event">MouseEvent</A> e,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JPopupMenu.html" title="class or interface in javax.swing">JPopupMenu</A> popup)</CODE>
<BR>
Display the specified popup menu at the location specified by a mouse
event with the specified source component.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/jmeter/gui/GuiPackage.html#displayPopUp(java.awt.event.MouseEvent, javax.swing.JPopupMenu)">displayPopUp</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/event/MouseEvent.html" title="class or interface in java.awt.event">MouseEvent</A> e,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JPopupMenu.html" title="class or interface in javax.swing">JPopupMenu</A> popup)</CODE>
<BR>
Display the specified popup menu with the source component and location
from the specified mouse event.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../org/apache/jmeter/testelement/TestElement.html" title="interface in org.apache.jmeter.testelement">TestElement</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/jmeter/gui/GuiPackage.html#getCurrentElement()">getCurrentElement</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../org/apache/jmeter/gui/JMeterGUIComponent.html" title="interface in org.apache.jmeter.gui">JMeterGUIComponent</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/jmeter/gui/GuiPackage.html#getCurrentGui()">getCurrentGui</A></B>()</CODE>
<BR>
Convenience method for grabbing the gui for the current node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../org/apache/jmeter/gui/tree/JMeterTreeNode.html" title="class in org.apache.jmeter.gui.tree">JMeterTreeNode</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/jmeter/gui/GuiPackage.html#getCurrentNode()">getCurrentNode</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../org/apache/jorphan/collections/HashTree.html" title="class in org.apache.jorphan.collections">HashTree</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/jmeter/gui/GuiPackage.html#getCurrentSubTree()">getCurrentSubTree</A></B>()</CODE>
<BR>
Get the currently selected subtree.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../org/apache/jmeter/gui/JMeterGUIComponent.html" title="interface in org.apache.jmeter.gui">JMeterGUIComponent</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/jmeter/gui/GuiPackage.html#getGui(org.apache.jmeter.testelement.TestElement)">getGui</A></B>(<A HREF="../../../../org/apache/jmeter/testelement/TestElement.html" title="interface in org.apache.jmeter.testelement">TestElement</A> node)</CODE>
<BR>
Get a JMeterGUIComponent for the specified test element. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../org/apache/jmeter/gui/JMeterGUIComponent.html" title="interface in org.apache.jmeter.gui">JMeterGUIComponent</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/jmeter/gui/GuiPackage.html#getGui(org.apache.jmeter.testelement.TestElement, java.lang.Class, java.lang.Class)">getGui</A></B>(<A HREF="../../../../org/apache/jmeter/testelement/TestElement.html" title="interface in org.apache.jmeter.testelement">TestElement</A> node,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A> guiClass,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A> testClass)</CODE>
<BR>
Get a JMeterGUIComponent for the specified test element. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <A HREF="../../../../org/apache/jmeter/gui/GuiPackage.html" title="class in org.apache.jmeter.gui">GuiPackage</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/jmeter/gui/GuiPackage.html#getInstance()">getInstance</A></B>()</CODE>
<BR>
Retrieve the singleton GuiPackage instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <A HREF="../../../../org/apache/jmeter/gui/GuiPackage.html" title="class in org.apache.jmeter.gui">GuiPackage</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/jmeter/gui/GuiPackage.html#getInstance(org.apache.jmeter.gui.tree.JMeterTreeListener, org.apache.jmeter.gui.tree.JMeterTreeModel)">getInstance</A></B>(<A HREF="../../../../org/apache/jmeter/gui/tree/JMeterTreeListener.html" title="class in org.apache.jmeter.gui.tree">JMeterTreeListener</A> listener,
<A HREF="../../../../org/apache/jmeter/gui/tree/JMeterTreeModel.html" title="class in org.apache.jmeter.gui.tree">JMeterTreeModel</A> treeModel)</CODE>
<BR>
When GuiPackage is requested for the first time, it should be given
handles to JMeter's Tree Listener and TreeModel.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../org/apache/jmeter/gui/MainFrame.html" title="class in org.apache.jmeter.gui">MainFrame</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/jmeter/gui/GuiPackage.html#getMainFrame()">getMainFrame</A></B>()</CODE>
<BR>
Get the main JMeter frame.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../org/apache/jmeter/gui/tree/JMeterTreeNode.html" title="class in org.apache.jmeter.gui.tree">JMeterTreeNode</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/jmeter/gui/GuiPackage.html#getNodeOf(org.apache.jmeter.testelement.TestElement)">getNodeOf</A></B>(<A HREF="../../../../org/apache/jmeter/testelement/TestElement.html" title="interface in org.apache.jmeter.testelement">TestElement</A> userObject)</CODE>
<BR>
Find the JMeterTreeNode for a certain TestElement object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../org/apache/jmeter/engine/util/ValueReplacer.html" title="class in org.apache.jmeter.engine.util">ValueReplacer</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/jmeter/gui/GuiPackage.html#getReplacer()">getReplacer</A></B>()</CODE>
<BR>
Get a ValueReplacer for the test tree.</TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -