📄 abstractvisualizer.html
字号:
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/javax/accessibility/Accessible.html" title="class or interface in javax.accessibility">Accessible</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/event/ChangeListener.html" title="class or interface in javax.swing.event">ChangeListener</A>, <A HREF="../../../../../org/apache/jmeter/samplers/Clearable.html" title="interface in org.apache.jmeter.samplers">Clearable</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/EventListener.html" title="class or interface in java.util">EventListener</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/image/ImageObserver.html" title="class or interface in java.awt.image">ImageObserver</A>, <A HREF="../../../../../org/apache/jmeter/gui/JMeterGUIComponent.html" title="interface in org.apache.jmeter.gui">JMeterGUIComponent</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/MenuContainer.html" title="class or interface in java.awt">MenuContainer</A>, <A HREF="../../../../../org/apache/jmeter/visualizers/Printable.html" title="interface in org.apache.jmeter.visualizers">Printable</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Serializable.html" title="class or interface in java.io">Serializable</A>, <A HREF="../../../../../org/apache/jmeter/gui/UnsharedComponent.html" title="interface in org.apache.jmeter.gui">UnsharedComponent</A>, <A HREF="../../../../../org/apache/jmeter/visualizers/Visualizer.html" title="interface in org.apache.jmeter.visualizers">Visualizer</A></DD>
</DL>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/apache/jmeter/visualizers/AssertionVisualizer.html" title="class in org.apache.jmeter.visualizers">AssertionVisualizer</A>, <A HREF="../../../../../org/apache/jmeter/visualizers/DistributionGraphVisualizer.html" title="class in org.apache.jmeter.visualizers">DistributionGraphVisualizer</A>, <A HREF="../../../../../org/apache/jmeter/visualizers/GraphAccumVisualizer.html" title="class in org.apache.jmeter.visualizers">GraphAccumVisualizer</A>, <A HREF="../../../../../org/apache/jmeter/visualizers/GraphVisualizer.html" title="class in org.apache.jmeter.visualizers">GraphVisualizer</A>, <A HREF="../../../../../org/apache/jmeter/visualizers/MailerVisualizer.html" title="class in org.apache.jmeter.visualizers">MailerVisualizer</A>, <A HREF="../../../../../org/apache/jmeter/visualizers/MonitorHealthVisualizer.html" title="class in org.apache.jmeter.visualizers">MonitorHealthVisualizer</A>, <A HREF="../../../../../org/apache/jmeter/visualizers/SimpleDataWriter.html" title="class in org.apache.jmeter.visualizers">SimpleDataWriter</A>, <A HREF="../../../../../org/apache/jmeter/visualizers/SplineVisualizer.html" title="class in org.apache.jmeter.visualizers">SplineVisualizer</A>, <A HREF="../../../../../org/apache/jmeter/visualizers/StatGraphVisualizer.html" title="class in org.apache.jmeter.visualizers">StatGraphVisualizer</A>, <A HREF="../../../../../org/apache/jmeter/visualizers/StatVisualizer.html" title="class in org.apache.jmeter.visualizers">StatVisualizer</A>, <A HREF="../../../../../org/apache/jmeter/visualizers/SummaryReport.html" title="class in org.apache.jmeter.visualizers">SummaryReport</A>, <A HREF="../../../../../org/apache/jmeter/visualizers/TableVisualizer.html" title="class in org.apache.jmeter.visualizers">TableVisualizer</A>, <A HREF="../../../../../org/apache/jmeter/visualizers/ViewResultsFullVisualizer.html" title="class in org.apache.jmeter.visualizers">ViewResultsFullVisualizer</A></DD>
</DL>
<HR>
<DL>
<DT>public abstract class <B>AbstractVisualizer</B><DT>extends <A HREF="../../../../../org/apache/jmeter/gui/AbstractJMeterGuiComponent.html" title="class in org.apache.jmeter.gui">AbstractJMeterGuiComponent</A><DT>implements <A HREF="../../../../../org/apache/jmeter/visualizers/Visualizer.html" title="interface in org.apache.jmeter.visualizers">Visualizer</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/event/ChangeListener.html" title="class or interface in javax.swing.event">ChangeListener</A>, <A HREF="../../../../../org/apache/jmeter/gui/UnsharedComponent.html" title="interface in org.apache.jmeter.gui">UnsharedComponent</A>, <A HREF="../../../../../org/apache/jmeter/samplers/Clearable.html" title="interface in org.apache.jmeter.samplers">Clearable</A></DL>
<P>
This is the base class for JMeter GUI components which can display test
results in some way. It provides the following conveniences to developers:
<ul>
<li>Implements the
<A HREF="../../../../../org/apache/jmeter/gui/JMeterGUIComponent.html" title="interface in org.apache.jmeter.gui"><CODE>JMeterGUIComponent</CODE></A> interface
that allows your Gui visualizer to "plug-in" to the JMeter GUI environment.
Provides implementations for the following methods:
<ul>
<li><A HREF="../../../../../org/apache/jmeter/gui/JMeterGUIComponent.html#configure(org.apache.jmeter.testelement.TestElement)"><CODE>configure(TestElement)</CODE></A>.
Any additional parameters of your Visualizer need to be handled by you.</li>
<li><A HREF="../../../../../org/apache/jmeter/gui/JMeterGUIComponent.html#createTestElement()"><CODE>createTestElement()</CODE></A>.
For most purposes, the default
<A HREF="../../../../../org/apache/jmeter/reporters/ResultCollector.html" title="class in org.apache.jmeter.reporters"><CODE>ResultCollector</CODE></A> created
by this method is sufficient.</li>
<li><A HREF="../../../../../org/apache/jmeter/gui/JMeterGUIComponent.html#getMenuCategories()"><CODE>getMenuCategories()</CODE></A>.
To control where in the GUI your visualizer can be added.</li>
<li><A HREF="../../../../../org/apache/jmeter/gui/JMeterGUIComponent.html#modifyTestElement(org.apache.jmeter.testelement.TestElement)"><CODE>modifyTestElement(TestElement)</CODE></A>.
Again, additional parameters you require have to be handled by you.</li>
<li><A HREF="../../../../../org/apache/jmeter/gui/JMeterGUIComponent.html#createPopupMenu()"><CODE>createPopupMenu()</CODE></A>.</li>
</ul>
</li>
<li>Provides convenience methods to help you make a JMeter-compatible GUI:
<ul>
<li><A HREF="../../../../../org/apache/jmeter/visualizers/gui/AbstractVisualizer.html#makeTitlePanel()"><CODE>makeTitlePanel()</CODE></A>. Returns a panel that includes the name of
the component, and a FilePanel that allows users to control what file samples
are logged to.</li>
<li><A HREF="../../../../../org/apache/jmeter/visualizers/gui/AbstractVisualizer.html#getModel()"><CODE>getModel()</CODE></A> and <A HREF="../../../../../org/apache/jmeter/visualizers/gui/AbstractVisualizer.html#setModel(org.apache.jmeter.reporters.ResultCollector)"><CODE>setModel(ResultCollector)</CODE></A> methods for
setting and getting the model class that handles the receiving and logging of
sample results.</li>
</ul>
</li>
</ul>
For most developers, making a new visualizer is primarly for the purpose of
either calculating new statistics on the sample results that other
visualizers don't calculate, or displaying the results visually in a new and
interesting way. Making a new visualizer for either of these purposes is easy -
just extend this class and implement the
<A HREF="../../../../../org/apache/jmeter/visualizers/Visualizer.html#add(org.apache.jmeter.samplers.SampleResult)"><CODE>add(SampleResult)</CODE></A>
method and display the results as you see fit. This AbstractVisualizer and
the default
<A HREF="../../../../../org/apache/jmeter/reporters/ResultCollector.html" title="class in org.apache.jmeter.reporters"><CODE>ResultCollector</CODE></A> handle
logging and registering to receive SampleEvents for you - all you need to do
is include the JPanel created by makeTitlePanel somewhere in your gui to
allow users set the log file.
<p>
If you are doing more than that, you may need to extend
<A HREF="../../../../../org/apache/jmeter/reporters/ResultCollector.html" title="class in org.apache.jmeter.reporters"><CODE>ResultCollector</CODE></A> as well
and modify the <A HREF="../../../../../org/apache/jmeter/visualizers/gui/AbstractVisualizer.html#configure(org.apache.jmeter.testelement.TestElement)"><CODE>configure(TestElement)</CODE></A>,
<A HREF="../../../../../org/apache/jmeter/visualizers/gui/AbstractVisualizer.html#modifyTestElement(org.apache.jmeter.testelement.TestElement)"><CODE>modifyTestElement(TestElement)</CODE></A>, and <A HREF="../../../../../org/apache/jmeter/visualizers/gui/AbstractVisualizer.html#createTestElement()"><CODE>createTestElement()</CODE></A>
methods to create and modify your alternate ResultCollector. For an example
of this, see the
<A HREF="../../../../../org/apache/jmeter/visualizers/MailerVisualizer.html" title="class in org.apache.jmeter.visualizers"><CODE>MailerVisualizer</CODE></A>.
<p>
<P>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../serialized-form.html#org.apache.jmeter.visualizers.gui.AbstractVisualizer">Serialized Form</A></DL>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<A NAME="nested_class_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Nested Class Summary</B></FONT></TD>
</TR>
</TABLE>
<A NAME="nested_classes_inherited_from_class_javax.swing.JPanel"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Nested classes inherited from class javax.swing.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JPanel.html" title="class or interface in javax.swing">JPanel</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JPanel.AccessibleJPanel.html" title="class or interface in javax.swing">JPanel.AccessibleJPanel</A></CODE></TD>
</TR>
</TABLE>
<A NAME="nested_classes_inherited_from_class_javax.swing.JComponent"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Nested classes inherited from class javax.swing.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JComponent.html" title="class or interface in javax.swing">JComponent</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JComponent.AccessibleJComponent.html" title="class or interface in javax.swing">JComponent.AccessibleJComponent</A></CODE></TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -