📄 jmeterguicomponent.html
字号:
<HR>
<A NAME="getName()"><!-- --></A><H3>
getName</H3>
<PRE>
public <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> <B>getName</B>()</PRE>
<DL>
<DD>Gets the name of the JMeter GUI component. The name of the component is
used in the Test Tree as the name of the tree node.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the name of the component</DL>
</DD>
</DL>
<HR>
<A NAME="getStaticLabel()"><!-- --></A><H3>
getStaticLabel</H3>
<PRE>
public <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> <B>getStaticLabel</B>()</PRE>
<DL>
<DD>Get the component's label. This label is used in drop down lists that
give the user the option of choosing one type of component in a list of
many. It should therefore be a descriptive name for the end user to see.
It must be unique to the class.
It is also used by Help to find the appropriate location in the
documentation.
Normally getLabelResource() should be overridden instead of
this method; the definition of this method in AbstractJMeterGuiComponent
is intended for general use.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>GUI label for the component.<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/jmeter/gui/JMeterGUIComponent.html#getLabelResource()"><CODE>getLabelResource()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getLabelResource()"><!-- --></A><H3>
getLabelResource</H3>
<PRE>
public <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> <B>getLabelResource</B>()</PRE>
<DL>
<DD>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.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the resource name</DL>
</DD>
</DL>
<HR>
<A NAME="getDocAnchor()"><!-- --></A><H3>
getDocAnchor</H3>
<PRE>
public <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> <B>getDocAnchor</B>()</PRE>
<DL>
<DD>Get the component's document anchor name. Used by Help to find the
appropriate location in the documentation
<P>
<DD><DL>
<DT><B>Returns:</B><DD>Document anchor (#ref) for the component.</DL>
</DD>
</DL>
<HR>
<A NAME="createTestElement()"><!-- --></A><H3>
createTestElement</H3>
<PRE>
public <A HREF="../../../../org/apache/jmeter/testelement/TestElement.html" title="interface in org.apache.jmeter.testelement">TestElement</A> <B>createTestElement</B>()</PRE>
<DL>
<DD>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.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the Test Element object that the GUI component represents.</DL>
</DD>
</DL>
<HR>
<A NAME="modifyTestElement(org.apache.jmeter.testelement.TestElement)"><!-- --></A><H3>
modifyTestElement</H3>
<PRE>
public void <B>modifyTestElement</B>(<A HREF="../../../../org/apache/jmeter/testelement/TestElement.html" title="interface in org.apache.jmeter.testelement">TestElement</A> element)</PRE>
<DL>
<DD>GUI components are responsible for populating TestElements they create
with the data currently held in the GUI components. This method should
overwrite whatever data is currently in the TestElement as it is called
after a user has filled out the form elements in the gui with new
information.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>element</CODE> - the TestElement to modify</DL>
</DD>
</DL>
<HR>
<A NAME="isEnabled()"><!-- --></A><H3>
isEnabled</H3>
<PRE>
public boolean <B>isEnabled</B>()</PRE>
<DL>
<DD>Test GUI elements can be disabled, in which case they do not become part
of the test when run.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>true if the element should be part of the test run, false
otherwise</DL>
</DD>
</DL>
<HR>
<A NAME="setEnabled(boolean)"><!-- --></A><H3>
setEnabled</H3>
<PRE>
public void <B>setEnabled</B>(boolean enabled)</PRE>
<DL>
<DD>Set whether this component is enabled.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>enabled</CODE> - true for enabled, false for disabled.</DL>
</DD>
</DL>
<HR>
<A NAME="createPopupMenu()"><!-- --></A><H3>
createPopupMenu</H3>
<PRE>
public <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> <B>createPopupMenu</B>()</PRE>
<DL>
<DD>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.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>a JPopupMenu appropriate for the component.</DL>
</DD>
</DL>
<HR>
<A NAME="configure(org.apache.jmeter.testelement.TestElement)"><!-- --></A><H3>
configure</H3>
<PRE>
public void <B>configure</B>(<A HREF="../../../../org/apache/jmeter/testelement/TestElement.html" title="interface in org.apache.jmeter.testelement">TestElement</A> element)</PRE>
<DL>
<DD>The GUI must be able to extract the data from the TestElement and update
all GUI fields to represent those data. This method is called to allow
JMeter to show the user the GUI that represents the test element's data.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>element</CODE> - the TestElement to configure</DL>
</DD>
</DL>
<HR>
<A NAME="getMenuCategories()"><!-- --></A><H3>
getMenuCategories</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A> <B>getMenuCategories</B>()</PRE>
<DL>
<DD>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.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>a Collection of Strings, where each element is one of the
constants defined in MenuFactory<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/jmeter/gui/util/MenuFactory.html" title="class in org.apache.jmeter.gui.util"><CODE>MenuFactory</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setNode(javax.swing.tree.TreeNode)"><!-- --></A><H3>
setNode</H3>
<PRE>
public void <B>setNode</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/tree/TreeNode.html" title="class or interface in javax.swing.tree">TreeNode</A> node)</PRE>
<DL>
<DD>Sets the tree node which this component is associated with.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>node</CODE> - the tree node corresponding to this component</DL>
</DD>
</DL>
<HR>
<A NAME="clearGui()"><!-- --></A><H3>
clearGui</H3>
<PRE>
public void <B>clearGui</B>()</PRE>
<DL>
<DD>Clear the gui and return it to initial default values. This is necessary
because most gui classes are instantiated just once and re-used for
multiple test element objects and thus they need to be cleared between
use.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" 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_bottom_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">
PREV CLASS
<A HREF="../../../../org/apache/jmeter/gui/UnsharedComponent.html" title="interface 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="JMeterGUIComponent.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_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright © 1998-2008 Apache Software Foundation. All Rights Reserved.
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -