mirror of https://github.com/apache/jmeter.git
The clear() method was defined in the following interfaces:
Clearable, JMeterGUIComponent and TestElement. The methods serve different purposes, so two of them were renamed: the Clearable method is now clearData() and the JMeterGUIComponent method is now clearGui(). 3rd party add-ons may need to be rebuilt. git-svn-id: https://svn.apache.org/repos/asf/jakarta/jmeter/branches/rel-2-2@544682 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b43a179ef2
commit
17eb25fca3
|
|
@ -161,10 +161,10 @@ public class AssertionGui extends AbstractAssertionGui {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
tableModel.clearData();
|
||||
|
||||
|
|
|
|||
|
|
@ -137,4 +137,11 @@ public class BeanShellAssertionGui extends AbstractAssertionGui {
|
|||
|
||||
return panel;
|
||||
}
|
||||
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
filename.setText(""); // $NON-NLS-1$
|
||||
parameters.setText(""); // $NON-NLS-1$
|
||||
scriptField.setText(""); // $NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,14 +29,8 @@ import org.apache.jmeter.assertions.DurationAssertion;
|
|||
import org.apache.jmeter.gui.util.VerticalPanel;
|
||||
import org.apache.jmeter.testelement.TestElement;
|
||||
import org.apache.jmeter.util.JMeterUtils;
|
||||
//import org.apache.jorphan.logging.LoggingManager;
|
||||
//import org.apache.log.Logger;
|
||||
|
||||
/**
|
||||
* @version $Revision$ Last updated: $Date$
|
||||
*/
|
||||
public class DurationAssertionGui extends AbstractAssertionGui {
|
||||
//private static final Logger log = LoggingManager.getLoggerForClass();
|
||||
|
||||
private JTextField duration;
|
||||
|
||||
|
|
@ -69,10 +63,10 @@ public class DurationAssertionGui extends AbstractAssertionGui {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
duration.setText(""); //$NON-NLS-1$
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,10 +139,10 @@ public class HTMLAssertionGui extends AbstractAssertionGui implements FocusListe
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
docTypeBox.setSelectedIndex(0);
|
||||
htmlRadioButton.setSelected(true);
|
||||
|
|
|
|||
|
|
@ -102,10 +102,10 @@ public class MD5HexAssertionGUI extends AbstractAssertionGui {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
md5HexInput.setText(""); //$NON-NLS-1$
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,9 +37,6 @@ import org.apache.jmeter.testelement.TestElement;
|
|||
import org.apache.jmeter.util.JMeterUtils;
|
||||
import org.apache.jorphan.gui.layout.VerticalLayout;
|
||||
|
||||
/**
|
||||
* @version $Revision$ Last updated: $Date$
|
||||
*/
|
||||
public class SizeAssertionGui extends AbstractAssertionGui implements FocusListener, ActionListener {
|
||||
|
||||
private JTextField size;
|
||||
|
|
@ -86,10 +83,10 @@ public class SizeAssertionGui extends AbstractAssertionGui implements FocusListe
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
size.setText(""); //$NON-NLS-1$
|
||||
equalButton.setSelected(true);
|
||||
|
|
|
|||
|
|
@ -82,10 +82,10 @@ public class XMLSchemaAssertionGUI extends AbstractAssertionGui {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
xmlSchema.setText(""); //$NON-NLS-1$
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,12 +28,6 @@ import org.apache.jmeter.testelement.TestElement;
|
|||
import org.apache.jmeter.util.JMeterUtils;
|
||||
import org.apache.jorphan.gui.layout.VerticalLayout;
|
||||
|
||||
/**
|
||||
*
|
||||
* author <a href="mailto:jspears@astrology.com">Justin Spears </a>
|
||||
*
|
||||
*/
|
||||
|
||||
public class XPathAssertionGui extends AbstractAssertionGui {
|
||||
|
||||
private XPathPanel xpath;
|
||||
|
|
@ -118,10 +112,10 @@ public class XPathAssertionGui extends AbstractAssertionGui {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
xpath.setXPath("/"); //$NON-NLS-1$
|
||||
xpath.setNegated(false);
|
||||
|
|
|
|||
|
|
@ -130,10 +130,10 @@ public class ForeachControlPanel extends AbstractControllerGui {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
inputVal.setText(""); // $NON-NLS-1$
|
||||
returnVal.setText(""); // $NON-NLS-1$
|
||||
|
|
|
|||
|
|
@ -30,10 +30,7 @@ import org.apache.jmeter.util.JMeterUtils;
|
|||
import org.apache.jorphan.gui.layout.VerticalLayout;
|
||||
|
||||
public class IncludeControllerGui extends AbstractControllerGui
|
||||
/*
|
||||
* implements
|
||||
* UnsharedComponent
|
||||
*/
|
||||
// implements UnsharedComponent
|
||||
{
|
||||
|
||||
private FilePanel includePanel =
|
||||
|
|
@ -84,11 +81,11 @@ public class IncludeControllerGui extends AbstractControllerGui
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
includePanel.setFilename(""); // $NON-NLS-1$
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
includePanel.clearGui();
|
||||
}
|
||||
|
||||
public JPopupMenu createPopupMenu() {
|
||||
|
|
|
|||
|
|
@ -62,10 +62,10 @@ public class InterleaveControlGui extends AbstractControllerGui {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
style.setSelected(false);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,10 +46,8 @@ import org.apache.jorphan.gui.layout.VerticalLayout;
|
|||
* ModuleController Gui.
|
||||
*
|
||||
*/
|
||||
public class ModuleControllerGui extends AbstractControllerGui /*
|
||||
* implements
|
||||
* UnsharedComponent
|
||||
*/
|
||||
public class ModuleControllerGui extends AbstractControllerGui
|
||||
// implements UnsharedComponent
|
||||
{
|
||||
|
||||
private JMeterTreeNode selected = null;
|
||||
|
|
@ -138,10 +136,10 @@ public class ModuleControllerGui extends AbstractControllerGui /*
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
nodes.setSelectedIndex(-1);
|
||||
selected = null;
|
||||
|
|
|
|||
|
|
@ -54,10 +54,10 @@ public class RandomControlGui extends AbstractControllerGui {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
style.setSelected(false);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,10 +54,10 @@ public class SwitchControllerGui extends AbstractControllerGui {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
switchValue.setText(""); // $NON-NLS-1$
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,10 +91,10 @@ public class ThroughputControllerGui extends AbstractControllerGui {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
styleBox.setSelectedIndex(0);
|
||||
throughput.setText("1"); // $NON-NLS-1$
|
||||
perthread.setSelected(true);
|
||||
|
|
|
|||
|
|
@ -110,10 +110,10 @@ public class RegexExtractorGui extends AbstractPostProcessorGui {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
useBody.setSelected(true);
|
||||
useHeaders.setSelected(false);
|
||||
|
|
|
|||
|
|
@ -89,10 +89,10 @@ public class XPathExtractorGui extends AbstractPostProcessorGui {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
xpathQueryField.setText(""); // $NON-NLS-1$
|
||||
defaultField.setText(""); // $NON-NLS-1$
|
||||
|
|
|
|||
|
|
@ -72,10 +72,10 @@ public class CounterConfigGui extends AbstractPreProcessorGui {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
startField.setText(""); //$NON-NLS-1$
|
||||
incrField.setText(""); //$NON-NLS-1$
|
||||
|
|
|
|||
|
|
@ -127,10 +127,10 @@ public class UserParametersGui extends AbstractPreProcessorGui {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
initTableModel();
|
||||
paramTable.setModel(tableModel);
|
||||
|
|
|
|||
|
|
@ -42,8 +42,6 @@ import org.apache.log.Logger;
|
|||
/**
|
||||
* The model for a MailerVisualizer.
|
||||
*
|
||||
* @author <a href="mailto:wolfram.rittmeyer@web.de">Wolfram Rittmeyer</a>
|
||||
* @version $Revision$ $Date$
|
||||
*/
|
||||
public class MailerModel extends AbstractTestElement implements Serializable {
|
||||
|
||||
|
|
@ -216,7 +214,7 @@ public class MailerModel extends AbstractTestElement implements Serializable {
|
|||
* reset any mail-specific attributes (like sender, mail-subject...) since
|
||||
* they are independent of the sampling.
|
||||
*/
|
||||
public synchronized void clear() {
|
||||
public synchronized void clear() {// TODO: should this be clearData()?
|
||||
failureCount = 0;
|
||||
successCount = 0;
|
||||
siteDown = false;
|
||||
|
|
|
|||
|
|
@ -126,10 +126,10 @@ public class TestActionGui extends AbstractSamplerGui {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
targetBox.setSelectedIndex(0);
|
||||
durationField.setText(""); //$NON-NLS-1$
|
||||
|
|
|
|||
|
|
@ -120,10 +120,10 @@ public class ConstantTimerGui extends AbstractTimerGui {
|
|||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.apache.jmeter.gui.JMeterGUIComponent#clear()
|
||||
* @see org.apache.jmeter.gui.JMeterGUIComponent#clearGui()
|
||||
*/
|
||||
public void clear() {
|
||||
public void clearGui() {
|
||||
delayField.setText(DEFAULT_DELAY);
|
||||
super.clear();
|
||||
super.clearGui();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -157,11 +157,11 @@ public class GaussianRandomTimerGui extends AbstractTimerGui {
|
|||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.apache.jmeter.gui.JMeterGUIComponent#clear()
|
||||
* @see org.apache.jmeter.gui.JMeterGUIComponent#clearGui()
|
||||
*/
|
||||
public void clear() {
|
||||
public void clearGui() {
|
||||
rangeField.setText(DEFAULT_RANGE);
|
||||
delayField.setText(DEFAULT_DELAY);
|
||||
super.clear();
|
||||
super.clearGui();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -156,11 +156,11 @@ public class UniformRandomTimerGui extends AbstractTimerGui {
|
|||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.apache.jmeter.gui.JMeterGUIComponent#clear()
|
||||
* @see org.apache.jmeter.gui.JMeterGUIComponent#clearGui()
|
||||
*/
|
||||
public void clear() {
|
||||
public void clearGui() {
|
||||
rangeField.setText(DEFAULT_RANGE);
|
||||
delayField.setText(DEFAULT_DELAY);
|
||||
super.clear();
|
||||
super.clearGui();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public class AssertionVisualizer extends AbstractVisualizer implements Clearable
|
|||
}
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
public void clearData() {
|
||||
textArea.setText(""); // $NON-NLS-1$
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
// $Header:
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
|
|
@ -33,8 +32,6 @@ import org.apache.jmeter.samplers.Clearable;
|
|||
// import org.apache.jorphan.logging.LoggingManager;
|
||||
import org.apache.jorphan.math.NumberComparator;
|
||||
|
||||
// import org.apache.log.Logger;
|
||||
|
||||
/**
|
||||
* New graph for drawing distribution graph of the results. It is intended as a
|
||||
* way to view the data after the stress has been performed. Although it can be
|
||||
|
|
@ -47,7 +44,6 @@ import org.apache.jorphan.math.NumberComparator;
|
|||
*
|
||||
*/
|
||||
public class DistributionGraph extends JComponent implements Scrollable, Clearable {
|
||||
// private static Logger log = LoggingManager.getLoggerForClass();
|
||||
|
||||
private SamplingStatCalculator model;
|
||||
|
||||
|
|
@ -144,7 +140,8 @@ public class DistributionGraph extends JComponent implements Scrollable, Clearab
|
|||
/**
|
||||
* Clears this graph.
|
||||
*/
|
||||
public void clear() {
|
||||
public void clearData() {
|
||||
model.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -110,8 +110,8 @@ public class DistributionGraphVisualizer extends AbstractVisualizer implements I
|
|||
return "distribution_graph_title"; // $NON-NLS-1$
|
||||
}
|
||||
|
||||
public synchronized void clear() {
|
||||
this.graph.clear();
|
||||
public synchronized void clearData() {
|
||||
this.graph.clearData();
|
||||
model.clear();
|
||||
repaint();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,8 +37,6 @@ import org.apache.log.Logger;
|
|||
/**
|
||||
* Implements a simple graph for displaying performance results.
|
||||
*
|
||||
* @author Michael Stover Created March 21, 2002
|
||||
* @version $Revision$ Last updated: $Date$
|
||||
*/
|
||||
public class Graph extends JComponent implements Scrollable, Clearable {
|
||||
private static Logger log = LoggingManager.getLoggerForClass();
|
||||
|
|
@ -133,7 +131,7 @@ public class Graph extends JComponent implements Scrollable, Clearable {
|
|||
/**
|
||||
* Clears this graph.
|
||||
*/
|
||||
public void clear() {
|
||||
public void clearData() {
|
||||
graphMax = 1;
|
||||
throughputMax = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ public class GraphAccum extends JComponent implements Scrollable, GraphAccumList
|
|||
/**
|
||||
* Clears this graph.
|
||||
*/
|
||||
public void clear() {
|
||||
public void clearData() {
|
||||
setNoLegendYet(true);
|
||||
((JPanel) visualizer.getWhiteCanvas()).removeAll();
|
||||
previousPts = null;
|
||||
|
|
|
|||
|
|
@ -32,8 +32,6 @@ import org.apache.log.Logger;
|
|||
/**
|
||||
* The model that collects the average of the set of pages to be sampled.
|
||||
*
|
||||
* @author Khor Soon Hin Created 2001/08/11
|
||||
* @version $Revision$ Last updated: $Date$
|
||||
*/
|
||||
|
||||
public class GraphAccumModel implements Clearable, Serializable {
|
||||
|
|
@ -130,7 +128,7 @@ public class GraphAccumModel implements Clearable, Serializable {
|
|||
/**
|
||||
* Clear the results.
|
||||
*/
|
||||
public void clear() {
|
||||
public void clearData() {
|
||||
log.debug("Start : clear1");
|
||||
samples.clear();
|
||||
max = 1;
|
||||
|
|
|
|||
|
|
@ -121,9 +121,9 @@ public class GraphAccumVisualizer extends AbstractVisualizer implements ImageVis
|
|||
/**
|
||||
* Clear this visualizer data.
|
||||
*/
|
||||
public synchronized void clear() {
|
||||
model.clear();
|
||||
graph.clear();
|
||||
public synchronized void clearData() {
|
||||
model.clearData();
|
||||
graph.clearData();
|
||||
log.debug("Start : clear1");
|
||||
repaint();
|
||||
log.debug("End : clear1");
|
||||
|
|
|
|||
|
|
@ -142,15 +142,15 @@ public class GraphVisualizer extends AbstractVisualizer implements ImageVisualiz
|
|||
this.graph.repaint();
|
||||
}
|
||||
|
||||
public synchronized void clear() {
|
||||
// this.graph.clear();
|
||||
public void clearData() {
|
||||
graph.clearData();
|
||||
model.clear();
|
||||
graph.clear();
|
||||
dataField.setText("0000"); //$NON-NLS-1$
|
||||
averageField.setText("0000"); //$NON-NLS-1$
|
||||
deviationField.setText("0000"); //$NON-NLS-1$
|
||||
throughputField.setText("0/" + minute); //$NON-NLS-1$
|
||||
medianField.setText("0000"); //$NON-NLS-1$
|
||||
noSamplesField.setText("0000"); //$NON-NLS-1$
|
||||
updateYAxis();
|
||||
repaint();
|
||||
}
|
||||
|
|
@ -440,4 +440,5 @@ public class GraphVisualizer extends AbstractVisualizer implements ImageVisualiz
|
|||
|
||||
return row;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ import org.apache.log.Logger;
|
|||
/**
|
||||
* This class implements a visualizer that mails a message when an error occurs.
|
||||
*
|
||||
* @version $Revision$ $Date$
|
||||
*/
|
||||
public class MailerVisualizer extends AbstractVisualizer implements ActionListener, Clearable, ChangeListener {
|
||||
private static final Logger log = LoggingManager.getLoggerForClass();
|
||||
|
|
@ -101,7 +100,7 @@ public class MailerVisualizer extends AbstractVisualizer implements ActionListen
|
|||
/**
|
||||
* Clears any stored sampling-informations.
|
||||
*/
|
||||
public synchronized void clear() {
|
||||
public synchronized void clearData() {
|
||||
if (getModel() != null) {
|
||||
((MailerResultCollector) getModel()).getMailerModel().clear();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ package org.apache.jmeter.visualizers;
|
|||
|
||||
import java.awt.BorderLayout;
|
||||
|
||||
import org.apache.jmeter.samplers.Clearable;
|
||||
import org.apache.jmeter.samplers.SampleResult;
|
||||
import org.apache.jmeter.visualizers.gui.AbstractVisualizer;
|
||||
|
||||
|
|
@ -30,7 +29,7 @@ import org.apache.jmeter.visualizers.gui.AbstractVisualizer;
|
|||
*
|
||||
******************************************************************************/
|
||||
|
||||
public class SimpleDataWriter extends AbstractVisualizer implements Clearable {
|
||||
public class SimpleDataWriter extends AbstractVisualizer {
|
||||
/***************************************************************************
|
||||
* Create the SimpleDataWriter.
|
||||
**************************************************************************/
|
||||
|
|
@ -59,7 +58,7 @@ public class SimpleDataWriter extends AbstractVisualizer implements Clearable {
|
|||
* Does nothing, but required by interface.
|
||||
*/
|
||||
|
||||
public void clear() {
|
||||
public void clearData() {
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -105,10 +105,10 @@ public class SplineModel implements Clearable {
|
|||
}
|
||||
|
||||
public void uncompile() {
|
||||
clear();
|
||||
clearData();
|
||||
}
|
||||
|
||||
public synchronized void clear() {
|
||||
public synchronized void clearData() {
|
||||
// this.graph.clear();
|
||||
samples.clear();
|
||||
|
||||
|
|
|
|||
|
|
@ -102,8 +102,8 @@ public class SplineVisualizer extends AbstractVisualizer implements ImageVisuali
|
|||
updateGui();
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
model.clear();
|
||||
public void clearData() {
|
||||
model.clearData();
|
||||
}
|
||||
|
||||
public void setGUI() {
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ ActionListener {
|
|||
new Functor[] { null, null, null, null, null, null, null, null, null, null },
|
||||
new Class[] { String.class, Long.class, Long.class, Long.class, Long.class, Long.class,
|
||||
Long.class, String.class, String.class, String.class });
|
||||
clear();
|
||||
clearData();
|
||||
init();
|
||||
}
|
||||
|
||||
|
|
@ -214,7 +214,7 @@ ActionListener {
|
|||
/**
|
||||
* Clears this visualizer and its model, and forces a repaint of the table.
|
||||
*/
|
||||
public void clear() {
|
||||
public void clearData() {
|
||||
model.clearData();
|
||||
tableRows.clear();
|
||||
tableRows.put(TOTAL_ROW_LABEL, new SamplingStatCalculator(TOTAL_ROW_LABEL));
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ public class StatVisualizer extends AbstractVisualizer implements Clearable {
|
|||
new Functor[] { null, null, null, null, null, null, null, null, null, null },
|
||||
new Class[] { String.class, Long.class, Long.class, Long.class, Long.class,
|
||||
Long.class, Long.class, String.class, String.class, String.class });
|
||||
clear();
|
||||
clearData();
|
||||
init();
|
||||
}
|
||||
|
||||
|
|
@ -145,7 +145,7 @@ public class StatVisualizer extends AbstractVisualizer implements Clearable {
|
|||
/**
|
||||
* Clears this visualizer and its model, and forces a repaint of the table.
|
||||
*/
|
||||
public void clear() {
|
||||
public void clearData() {
|
||||
model.clearData();
|
||||
tableRows.clear();
|
||||
tableRows.put(TOTAL_ROW_LABEL, new SamplingStatCalculator(TOTAL_ROW_LABEL));
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ public class SummaryReport extends AbstractVisualizer implements Clearable {
|
|||
new Functor[] { null, null, null, null, null, null, null, null , null, null },
|
||||
new Class[] { String.class, Long.class, Long.class, Long.class, Long.class,
|
||||
String.class, String.class, String.class, String.class, String.class });
|
||||
clear();
|
||||
clearData();
|
||||
init();
|
||||
}
|
||||
|
||||
|
|
@ -139,7 +139,7 @@ public class SummaryReport extends AbstractVisualizer implements Clearable {
|
|||
/**
|
||||
* Clears this visualizer and its model, and forces a repaint of the table.
|
||||
*/
|
||||
public void clear() {
|
||||
public void clearData() {
|
||||
model.clearData();
|
||||
tableRows.clear();
|
||||
tableRows.put(TOTAL_ROW_LABEL, new Calculator(TOTAL_ROW_LABEL));
|
||||
|
|
|
|||
|
|
@ -162,9 +162,8 @@ public class TableVisualizer extends AbstractVisualizer implements Clearable {
|
|||
updateTextFields();
|
||||
}
|
||||
|
||||
public synchronized void clear() {
|
||||
public synchronized void clearData() {
|
||||
log.debug("Clear called", new Exception("Debug"));
|
||||
// this.graph.clear();
|
||||
model.clearData();
|
||||
currentData = 0;
|
||||
calc.clear();
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@ public class ViewResultsFullVisualizer extends AbstractVisualizer
|
|||
/**
|
||||
* Clears the visualizer.
|
||||
*/
|
||||
public void clear() {
|
||||
public void clearData() {
|
||||
log.debug("Start : clear1");
|
||||
|
||||
if (log.isDebugEnabled()) {
|
||||
|
|
@ -664,7 +664,7 @@ public class ViewResultsFullVisualizer extends AbstractVisualizer
|
|||
/**
|
||||
* Initialize this visualizer
|
||||
*/
|
||||
protected void init() {
|
||||
private void init() {
|
||||
setLayout(new BorderLayout(0, 5));
|
||||
setBorder(makeBorder());
|
||||
|
||||
|
|
|
|||
|
|
@ -107,10 +107,10 @@ public class LoginConfigGui extends AbstractConfigGui {
|
|||
element.setProperty(new StringProperty(ConfigTestElement.PASSWORD, passwordString));
|
||||
}
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
username.setText(""); //$NON-NLS-1$
|
||||
password.setText(""); //$NON-NLS-1$
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ import org.apache.jmeter.util.JMeterUtils;
|
|||
* should be executed while a condition holds. This component can be used
|
||||
* standalone or embedded into some other component.
|
||||
*
|
||||
* @author Cyrus Montakab
|
||||
*/
|
||||
|
||||
public class IfControllerPanel extends AbstractControllerGui implements ActionListener {
|
||||
|
|
@ -123,10 +122,10 @@ public class IfControllerPanel extends AbstractControllerGui implements ActionLi
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
theCondition.setText(""); // $NON-NLS-1$
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -127,10 +127,10 @@ public class LoopControlPanel extends AbstractControllerGui implements ActionLis
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
loops.setText("1"); // $NON-NLS-1$
|
||||
infinite.setSelected(false);
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ import org.apache.jmeter.util.JMeterUtils;
|
|||
* should be executed some number of seconds in a loop. This component can be
|
||||
* used standalone or embedded into some other component.
|
||||
*
|
||||
* @version $Revision$ on $Date$
|
||||
*/
|
||||
|
||||
public class RunTimeGui extends AbstractControllerGui implements ActionListener {
|
||||
|
|
@ -114,10 +113,10 @@ public class RunTimeGui extends AbstractControllerGui implements ActionListener
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
seconds.setText("1"); // $NON-NLS-1$
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,10 +92,10 @@ public class WhileControllerGui extends AbstractControllerGui implements ActionL
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
theCondition.setText(""); // $NON-NLS-1$
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ import javax.swing.border.Border;
|
|||
import javax.swing.tree.TreeNode;
|
||||
|
||||
import org.apache.jmeter.gui.util.VerticalPanel;
|
||||
import org.apache.jmeter.samplers.Clearable;
|
||||
import org.apache.jmeter.testelement.TestElement;
|
||||
import org.apache.jmeter.testelement.TestPlan;
|
||||
import org.apache.jmeter.testelement.property.BooleanProperty;
|
||||
|
|
@ -57,9 +56,8 @@ import org.apache.log.Logger;
|
|||
* @see org.apache.jmeter.visualizers.gui.AbstractVisualizer
|
||||
* @see org.apache.jmeter.samplers.gui.AbstractSamplerGui
|
||||
*
|
||||
* @version $Revision$ on $Date$
|
||||
*/
|
||||
public abstract class AbstractJMeterGuiComponent extends JPanel implements JMeterGUIComponent, Printable, Clearable {
|
||||
public abstract class AbstractJMeterGuiComponent extends JPanel implements JMeterGUIComponent, Printable {
|
||||
/** Logging */
|
||||
private static Logger log = LoggingManager.getLoggerForClass();
|
||||
|
||||
|
|
@ -71,7 +69,8 @@ public abstract class AbstractJMeterGuiComponent extends JPanel implements JMete
|
|||
|
||||
/** A GUI panel containing the name of this component. */
|
||||
protected NamePanel namePanel;
|
||||
|
||||
// used by AbstractReportGui
|
||||
|
||||
private CommentPanel commentPanel;
|
||||
|
||||
/**
|
||||
|
|
@ -82,12 +81,11 @@ public abstract class AbstractJMeterGuiComponent extends JPanel implements JMete
|
|||
public AbstractJMeterGuiComponent() {
|
||||
namePanel = new NamePanel();
|
||||
commentPanel=new CommentPanel();
|
||||
setName(getStaticLabel());
|
||||
setComment(""); // $NON-NLS-1$
|
||||
initGui();
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides a default implementation for the name property. It's unlikely
|
||||
* Provides a default implementation for setting the name property. It's unlikely
|
||||
* developers will need to override.
|
||||
*/
|
||||
public void setName(String name) {
|
||||
|
|
@ -95,7 +93,7 @@ public abstract class AbstractJMeterGuiComponent extends JPanel implements JMete
|
|||
}
|
||||
|
||||
/**
|
||||
* Provides a default implementation for the name property. It's unlikely
|
||||
* Provides a default implementation for setting the comment property. It's unlikely
|
||||
* developers will need to override.
|
||||
*/
|
||||
public void setComment(String comment) {
|
||||
|
|
@ -200,17 +198,22 @@ public abstract class AbstractJMeterGuiComponent extends JPanel implements JMete
|
|||
}
|
||||
|
||||
/**
|
||||
* Provides a default implementat that resets the name field to the value of
|
||||
* 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.clear().
|
||||
* still call super.clearGui().
|
||||
*/
|
||||
public void clear() {
|
||||
setName(getStaticLabel());
|
||||
setComment(""); // $NON-NLS-1$
|
||||
public void clearGui() {
|
||||
initGui();
|
||||
enabled = true;
|
||||
}
|
||||
|
||||
// helper method - also used by constructor
|
||||
private void initGui() {
|
||||
setName(getStaticLabel());
|
||||
commentPanel.clearGui();
|
||||
}
|
||||
|
||||
/**
|
||||
* This provides a convenience for extenders when they implement the
|
||||
* {@link JMeterGUIComponent#modifyTestElement(TestElement)} method. This
|
||||
|
|
|
|||
|
|
@ -66,4 +66,8 @@ public class CommentPanel extends JPanel {
|
|||
public String getText() {
|
||||
return this.commentField.getText();
|
||||
}
|
||||
|
||||
public void clearGui() {
|
||||
commentField.setText(""); // $NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ import org.apache.jmeter.testelement.TestPlan;
|
|||
import org.apache.jmeter.util.JMeterUtils;
|
||||
import org.apache.jmeter.util.LocaleChangeEvent;
|
||||
import org.apache.jmeter.util.LocaleChangeListener;
|
||||
import org.apache.jmeter.visualizers.gui.AbstractVisualizer;
|
||||
import org.apache.jorphan.collections.HashTree;
|
||||
import org.apache.jorphan.logging.LoggingManager;
|
||||
import org.apache.log.Logger;
|
||||
|
|
@ -55,9 +54,6 @@ import org.apache.log.Logger;
|
|||
* affect the GUI, they typically use GuiPackage to get access to different
|
||||
* parts of the GUI.
|
||||
*
|
||||
* @author Michael Stover
|
||||
* @author <a href="mailto:jsalvata@apache.org">Jordi Salvat i Alabart</a>
|
||||
* @version $Revision$ updated on $Date$
|
||||
*/
|
||||
public final class GuiPackage implements LocaleChangeListener {
|
||||
/** Logging. */
|
||||
|
|
@ -230,12 +226,7 @@ public final class GuiPackage implements LocaleChangeListener {
|
|||
updateCurrentNode();
|
||||
TestElement curNode = treeListener.getCurrentNode().getTestElement();
|
||||
JMeterGUIComponent comp = getGui(curNode);
|
||||
if (!(comp instanceof AbstractVisualizer)) // TODO: a hack that
|
||||
// needs to be fixed for
|
||||
// 2.0
|
||||
{
|
||||
comp.clear();
|
||||
}
|
||||
comp.clearGui();
|
||||
log.debug("Updating gui to new node");
|
||||
comp.configure(curNode);
|
||||
currentNodeUpdated = false;
|
||||
|
|
@ -271,7 +262,7 @@ public final class GuiPackage implements LocaleChangeListener {
|
|||
public TestElement createTestElement(Class guiClass, Class testClass) {
|
||||
try {
|
||||
JMeterGUIComponent comp = getGuiFromCache(guiClass, testClass);
|
||||
comp.clear();
|
||||
comp.clearGui();
|
||||
TestElement node = comp.createTestElement();
|
||||
nodesToGui.put(node, comp);
|
||||
return node;
|
||||
|
|
@ -302,7 +293,7 @@ public final class GuiPackage implements LocaleChangeListener {
|
|||
} else {
|
||||
comp = getGuiFromCache(c, null);
|
||||
}
|
||||
comp.clear();
|
||||
comp.clearGui();
|
||||
TestElement node = comp.createTestElement();
|
||||
nodesToGui.put(node, comp);
|
||||
return node;
|
||||
|
|
|
|||
|
|
@ -41,8 +41,6 @@ import org.apache.jmeter.testelement.TestElement;
|
|||
* @see org.apache.jmeter.visualizers.gui.AbstractVisualizer
|
||||
* @see org.apache.jmeter.samplers.gui.AbstractSamplerGui
|
||||
*
|
||||
* @version $Revision$ on $Date$
|
||||
*
|
||||
*/
|
||||
|
||||
public interface JMeterGUIComponent {
|
||||
|
|
@ -192,7 +190,9 @@ public interface JMeterGUIComponent {
|
|||
* 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. TODO: implement this in all gui classes.
|
||||
* use.
|
||||
*/
|
||||
public void clear();
|
||||
public void clearGui();
|
||||
// N.B. originally called clear()
|
||||
// @see also Clearable
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ public class NamePanel extends JPanel implements JMeterGUIComponent {
|
|||
add(nameField, BorderLayout.CENTER);
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
public void clearGui() {
|
||||
setName(getStaticLabel());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,8 +31,10 @@ import org.apache.jorphan.logging.LoggingManager;
|
|||
import org.apache.log.Logger;
|
||||
|
||||
/**
|
||||
* @author Michael Stover
|
||||
* @version $Revision$
|
||||
* Handles the following actions:
|
||||
* - Clear (Data)
|
||||
* - Clear All (Data)
|
||||
* - Reset (Clear GUI)
|
||||
*/
|
||||
public class Clear implements Command {
|
||||
private static final Logger log = LoggingManager.getLoggerForClass();
|
||||
|
|
@ -41,6 +43,7 @@ public class Clear implements Command {
|
|||
static {
|
||||
commands.add(ActionNames.CLEAR);
|
||||
commands.add(ActionNames.CLEAR_ALL);
|
||||
commands.add(ActionNames.RESET_GUI);
|
||||
}
|
||||
|
||||
public Clear() {
|
||||
|
|
@ -52,13 +55,15 @@ public class Clear implements Command {
|
|||
|
||||
public void doAction(ActionEvent e) {
|
||||
GuiPackage guiPackage = GuiPackage.getInstance();
|
||||
if (e.getActionCommand().equals(ActionNames.CLEAR)) {
|
||||
JMeterGUIComponent model = guiPackage.getCurrentGui();
|
||||
try {
|
||||
((Clearable) model).clear();
|
||||
} catch (Throwable ex) {
|
||||
log.error("", ex);
|
||||
final String actionCommand = e.getActionCommand();
|
||||
if (actionCommand.equals(ActionNames.CLEAR)) {
|
||||
JMeterGUIComponent guiComp = guiPackage.getCurrentGui();
|
||||
if (guiComp instanceof Clearable){
|
||||
((Clearable) guiComp).clearData();
|
||||
}
|
||||
} else if (actionCommand.equals(ActionNames.RESET_GUI)) {
|
||||
JMeterGUIComponent guiComp = guiPackage.getCurrentGui();
|
||||
guiComp.clearGui();
|
||||
} else {
|
||||
Iterator iter = guiPackage.getTreeModel().getNodesOfType(Clearable.class).iterator();
|
||||
while (iter.hasNext()) {
|
||||
|
|
@ -69,7 +74,7 @@ public class Clear implements Command {
|
|||
node = (JMeterTreeNode) next;
|
||||
guiComp = guiPackage.getGui(node.getTestElement());
|
||||
Clearable item = (Clearable) guiComp;
|
||||
item.clear();
|
||||
item.clearData();
|
||||
} catch (Exception ex) {
|
||||
log.error("Can't clear: "+node+" "+guiComp, ex);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,6 +97,10 @@ public class FilePanel extends HorizontalPanel implements ActionListener {
|
|||
|
||||
}
|
||||
|
||||
public void clearGui(){
|
||||
filename.setText(""); // $NON-NLS-1$
|
||||
}
|
||||
|
||||
/**
|
||||
* If the gui needs to enable/disable the FilePanel, call the method.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -65,13 +65,12 @@ import org.apache.jorphan.util.JOrphanUtils;
|
|||
import org.apache.log.Logger;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
/**
|
||||
*/
|
||||
public class ResultCollector extends AbstractListenerElement implements SampleListener, Clearable, Serializable,
|
||||
public class ResultCollector extends AbstractListenerElement implements SampleListener, Serializable,
|
||||
TestListener, Remoteable, NoThreadClone {
|
||||
|
||||
private static final Logger log = LoggingManager.getLoggerForClass();
|
||||
|
||||
private static final long serialVersionUID = 2;
|
||||
private static final long serialVersionUID = 23;
|
||||
|
||||
private static final String TESTRESULTS_START = "<testResults>"; // $NON-NLS-1$
|
||||
|
||||
|
|
@ -375,7 +374,7 @@ public class ResultCollector extends AbstractListenerElement implements SampleLi
|
|||
public void clearVisualizer() {
|
||||
// current = -1;
|
||||
if (getVisualizer() != null && getVisualizer() instanceof Clearable) {
|
||||
((Clearable) getVisualizer()).clear();
|
||||
((Clearable) getVisualizer()).clearData();
|
||||
}
|
||||
finalizeFileOutput();
|
||||
}
|
||||
|
|
@ -537,4 +536,5 @@ public class ResultCollector extends AbstractListenerElement implements SampleLi
|
|||
public void setSaveConfig(SampleSaveConfiguration saveConfig) {
|
||||
getProperty(SAVE_CONFIG).setObjectValue(saveConfig);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -81,6 +81,7 @@ public class ResultSaver extends AbstractTestElement implements Serializable, Sa
|
|||
* start of the test. The super.clear() method clears the name (and all
|
||||
* other properties), so it is called last.
|
||||
*/
|
||||
// TODO: is this clearData, clearGui or TestElement.clear() ?
|
||||
public void clear() {
|
||||
// System.out.println("-- "+me+this.getName()+"
|
||||
// "+Thread.currentThread().getName());
|
||||
|
|
@ -88,6 +89,10 @@ public class ResultSaver extends AbstractTestElement implements Serializable, Sa
|
|||
sequenceNumber = 0; // TODO is this the right thing to do?
|
||||
}
|
||||
|
||||
// TODO - is this the same as the above?
|
||||
public void clearData() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the sample result (and any sub results) in files
|
||||
*
|
||||
|
|
@ -183,4 +188,5 @@ public class ResultSaver extends AbstractTestElement implements Serializable, Sa
|
|||
private boolean getErrorsOnly() {
|
||||
return getPropertyAsBoolean(ERRORS_ONLY);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ public class Summariser extends AbstractTestElement implements Serializable, Sam
|
|||
* start of the test. The super.clear() method clears the name (and all
|
||||
* other properties), so it is called last.
|
||||
*/
|
||||
public void clear() {
|
||||
public void clearData() {
|
||||
// System.out.println("-- "+me+this.getName()+"
|
||||
// "+Thread.currentThread().getName());
|
||||
|
||||
|
|
|
|||
|
|
@ -76,10 +76,10 @@ public class ResultActionGui extends AbstractPostProcessorGui {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
errorPanel.configure(OnErrorTestElement.ON_ERROR_CONTINUE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ import javax.swing.JPanel;
|
|||
import javax.swing.JTextField;
|
||||
|
||||
import org.apache.jmeter.reporters.ResultSaver;
|
||||
import org.apache.jmeter.samplers.Clearable;
|
||||
import org.apache.jmeter.processor.gui.AbstractPostProcessorGui;
|
||||
import org.apache.jmeter.testelement.TestElement;
|
||||
import org.apache.jmeter.util.JMeterUtils;
|
||||
|
|
@ -36,9 +35,9 @@ import org.apache.jmeter.util.JMeterUtils;
|
|||
* Create a ResultSaver test element, which saves the sample information in set
|
||||
* of files
|
||||
*
|
||||
* @version $Revision$ Last updated: $Date$
|
||||
*/
|
||||
public class ResultSaverGui extends AbstractPostProcessorGui implements Clearable {
|
||||
public class ResultSaverGui extends AbstractPostProcessorGui {
|
||||
// TODO should this implements Clearable ?
|
||||
|
||||
private JTextField filename;
|
||||
|
||||
|
|
@ -86,10 +85,10 @@ public class ResultSaverGui extends AbstractPostProcessorGui implements Clearabl
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
filename.setText(""); //$NON-NLS-1$
|
||||
errorsOnly.setSelected(false);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ package org.apache.jmeter.reporters.gui;
|
|||
import java.awt.BorderLayout;
|
||||
|
||||
import org.apache.jmeter.reporters.Summariser;
|
||||
import org.apache.jmeter.samplers.Clearable;
|
||||
import org.apache.jmeter.processor.gui.AbstractPostProcessorGui;
|
||||
import org.apache.jmeter.testelement.TestElement;
|
||||
|
||||
|
|
@ -32,7 +31,7 @@ import org.apache.jmeter.testelement.TestElement;
|
|||
* the existing types.
|
||||
*
|
||||
*/
|
||||
public class SummariserGui extends AbstractPostProcessorGui implements Clearable {
|
||||
public class SummariserGui extends AbstractPostProcessorGui {
|
||||
|
||||
public SummariserGui() {
|
||||
super();
|
||||
|
|
|
|||
|
|
@ -19,12 +19,16 @@
|
|||
package org.apache.jmeter.samplers;
|
||||
|
||||
/**
|
||||
* @author Michael Stover
|
||||
* @version $Revision$
|
||||
* Identifies an object which supports the clearing of run-time data
|
||||
* using the clearData() method.
|
||||
*
|
||||
* Intended for implementation by Listeners.
|
||||
*/
|
||||
public interface Clearable {
|
||||
/**
|
||||
* Clears the current data of the object.
|
||||
*/
|
||||
public void clear();
|
||||
public void clearData();
|
||||
// N.B. originally called clear()
|
||||
// @see also JMeterGUIComponent
|
||||
}
|
||||
|
|
@ -85,7 +85,6 @@ import org.apache.log.Logger;
|
|||
* instance will be used for each element. For efficiency reasons, most
|
||||
* customizers should implement SharedCustomizer.
|
||||
*
|
||||
* @version $Revision$ updated on $Date$
|
||||
*/
|
||||
public class TestBeanGUI extends AbstractJMeterGuiComponent implements JMeterGUIComponent {
|
||||
private static final Logger log = LoggingManager.getLoggerForClass();
|
||||
|
|
@ -302,7 +301,7 @@ public class TestBeanGUI extends AbstractJMeterGuiComponent implements JMeterGUI
|
|||
public void configure(TestElement element) {
|
||||
if (!initialized)
|
||||
init();
|
||||
clear();
|
||||
clearGui();
|
||||
|
||||
super.configure(element);
|
||||
|
||||
|
|
@ -419,17 +418,17 @@ public class TestBeanGUI extends AbstractJMeterGuiComponent implements JMeterGUI
|
|||
* @see org.apache.jmeter.gui.JMeterGUIComponent#getLabelResource()
|
||||
*/
|
||||
public String getLabelResource() {
|
||||
// TODO Auto-generated method stub
|
||||
// @see getStaticLabel
|
||||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.apache.jmeter.gui.JMeterGUIComponent#clear()
|
||||
* @see org.apache.jmeter.gui.JMeterGUIComponent#clearGui()
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
propertyMap.clear();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,11 +22,6 @@ import org.apache.jmeter.testelement.property.JMeterProperty;
|
|||
import org.apache.jmeter.testelement.property.PropertyIterator;
|
||||
import org.apache.jmeter.threads.JMeterContext;
|
||||
|
||||
/**
|
||||
* @author Michael Stover
|
||||
* @version $Revision$
|
||||
*/
|
||||
|
||||
public interface TestElement extends Cloneable {
|
||||
public final static String NAME = "TestElement.name";
|
||||
|
||||
|
|
@ -107,6 +102,8 @@ public interface TestElement extends Cloneable {
|
|||
* Clear the TestElement of all data.
|
||||
*/
|
||||
public void clear();
|
||||
// TODO - yet another ambiguous name - does it need changing?
|
||||
// See also: Clearable, JMeterGUIComponent
|
||||
|
||||
public String getPropertyAsString(String key);
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ import org.apache.jmeter.threads.ThreadGroup;
|
|||
import org.apache.jmeter.util.JMeterUtils;
|
||||
|
||||
public class ThreadGroupGui extends AbstractJMeterGuiComponent implements ItemListener {
|
||||
LoopControlPanel loopPanel;
|
||||
private LoopControlPanel loopPanel;
|
||||
|
||||
private VerticalPanel mainPanel;
|
||||
|
||||
|
|
@ -84,6 +84,7 @@ public class ThreadGroupGui extends AbstractJMeterGuiComponent implements ItemLi
|
|||
public ThreadGroupGui() {
|
||||
super();
|
||||
init();
|
||||
initGui();
|
||||
}
|
||||
|
||||
public Collection getMenuCategories() {
|
||||
|
|
@ -206,8 +207,7 @@ public class ThreadGroupGui extends AbstractJMeterGuiComponent implements ItemLi
|
|||
JPanel panel = new JPanel(new BorderLayout(5, 0));
|
||||
JLabel label = new JLabel(JMeterUtils.getResString("starttime")); //$NON-NLS-1$
|
||||
panel.add(label, BorderLayout.WEST);
|
||||
Date today = new Date();
|
||||
start = new JDateField(today);
|
||||
start = new JDateField();
|
||||
panel.add(start, BorderLayout.CENTER);
|
||||
return panel;
|
||||
}
|
||||
|
|
@ -221,8 +221,8 @@ public class ThreadGroupGui extends AbstractJMeterGuiComponent implements ItemLi
|
|||
JPanel panel = new JPanel(new BorderLayout(5, 0));
|
||||
JLabel label = new JLabel(JMeterUtils.getResString("endtime")); // $NON-NLS-1$
|
||||
panel.add(label, BorderLayout.WEST);
|
||||
Date today = new Date();
|
||||
end = new JDateField(today);
|
||||
|
||||
end = new JDateField();
|
||||
panel.add(end, BorderLayout.CENTER);
|
||||
return panel;
|
||||
}
|
||||
|
|
@ -267,7 +267,6 @@ public class ThreadGroupGui extends AbstractJMeterGuiComponent implements ItemLi
|
|||
|
||||
continueBox = new JRadioButton(JMeterUtils.getResString("sampler_on_error_continue")); // $NON-NLS-1$
|
||||
group.add(continueBox);
|
||||
continueBox.setSelected(true);
|
||||
panel.add(continueBox);
|
||||
|
||||
stopThrdBox = new JRadioButton(JMeterUtils.getResString("sampler_on_error_stop_thread")); // $NON-NLS-1$
|
||||
|
|
@ -281,6 +280,25 @@ public class ThreadGroupGui extends AbstractJMeterGuiComponent implements ItemLi
|
|||
return panel;
|
||||
}
|
||||
|
||||
public void clearGui(){
|
||||
super.clearGui();
|
||||
initGui();
|
||||
}
|
||||
|
||||
// Initialise the gui field values
|
||||
private void initGui(){
|
||||
threadInput.setText("1"); // $NON-NLS-1$
|
||||
rampInput.setText("1"); // $NON-NLS-1$
|
||||
continueBox.setSelected(true);
|
||||
loopPanel.clearGui();
|
||||
scheduler.setSelected(false);
|
||||
Date today = new Date();
|
||||
end.setDate(today);
|
||||
start.setDate(today);
|
||||
delay.setText(""); // $NON-NLS-1$
|
||||
duration.setText(""); // $NON-NLS-1$
|
||||
}
|
||||
|
||||
private void init() {
|
||||
setLayout(new BorderLayout(0, 5));
|
||||
setBorder(makeBorder());
|
||||
|
|
@ -303,7 +321,7 @@ public class ThreadGroupGui extends AbstractJMeterGuiComponent implements ItemLi
|
|||
JLabel threadLabel = new JLabel(JMeterUtils.getResString("number_of_threads")); // $NON-NLS-1$
|
||||
threadPanel.add(threadLabel, BorderLayout.WEST);
|
||||
|
||||
threadInput = new JTextField("1", 5); // $NON-NLS-1$
|
||||
threadInput = new JTextField(5);
|
||||
threadInput.setName(THREAD_NAME);
|
||||
threadLabel.setLabelFor(threadInput);
|
||||
threadPanel.add(threadInput, BorderLayout.CENTER);
|
||||
|
|
@ -316,7 +334,7 @@ public class ThreadGroupGui extends AbstractJMeterGuiComponent implements ItemLi
|
|||
JLabel rampLabel = new JLabel(JMeterUtils.getResString("ramp_up")); // $NON-NLS-1$
|
||||
rampPanel.add(rampLabel, BorderLayout.WEST);
|
||||
|
||||
rampInput = new JTextField("1", 5); // $NON-NLS-1$
|
||||
rampInput = new JTextField(5);
|
||||
rampInput.setName(RAMP_NAME);
|
||||
rampLabel.setLabelFor(rampInput);
|
||||
rampPanel.add(rampInput, BorderLayout.CENTER);
|
||||
|
|
|
|||
|
|
@ -40,10 +40,10 @@ import org.apache.jmeter.gui.util.FilePanel;
|
|||
import org.apache.jmeter.gui.util.MenuFactory;
|
||||
import org.apache.jmeter.reporters.AbstractListenerElement;
|
||||
import org.apache.jmeter.reporters.ResultCollector;
|
||||
import org.apache.jmeter.samplers.Clearable;
|
||||
import org.apache.jmeter.samplers.SampleSaveConfiguration;
|
||||
import org.apache.jmeter.testelement.TestElement;
|
||||
import org.apache.jmeter.util.JMeterUtils;
|
||||
import org.apache.jmeter.visualizers.Printable;
|
||||
import org.apache.jmeter.visualizers.Visualizer;
|
||||
import org.apache.jorphan.gui.ComponentUtil;
|
||||
import org.apache.jorphan.logging.LoggingManager;
|
||||
|
|
@ -104,10 +104,11 @@ import org.apache.log.Logger;
|
|||
* {@link org.apache.jmeter.visualizers.MailerVisualizer MailerVisualizer}.
|
||||
* <p>
|
||||
*
|
||||
* @version $Revision$
|
||||
*/
|
||||
public abstract class AbstractVisualizer extends AbstractJMeterGuiComponent implements Visualizer, ChangeListener,
|
||||
UnsharedComponent, Printable {
|
||||
public abstract class AbstractVisualizer
|
||||
extends AbstractJMeterGuiComponent
|
||||
implements Visualizer, ChangeListener, UnsharedComponent, Clearable
|
||||
{
|
||||
/** Logging. */
|
||||
private static final Logger log = LoggingManager.getLoggerForClass();
|
||||
|
||||
|
|
@ -357,4 +358,9 @@ public abstract class AbstractVisualizer extends AbstractJMeterGuiComponent impl
|
|||
public JComponent getPrintableComponent() {
|
||||
return this;
|
||||
}
|
||||
|
||||
public void clearGui(){
|
||||
super.clearGui();
|
||||
filePanel.clearGui();
|
||||
}
|
||||
}
|
||||
|
|
@ -124,4 +124,10 @@ public class ExampleSamplerGui extends AbstractSamplerGui {
|
|||
|
||||
return dataPanel;
|
||||
}
|
||||
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
data.setText(""); // $NON-NLS-1$
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -61,6 +61,7 @@ implements ChangeListener, ActionListener
|
|||
private static final String METHODCOMBO = "methodcombo"; //$NON-NLS-1$
|
||||
private static final String PREFIX = "test"; //$NON-NLS-1$
|
||||
|
||||
// Names of JUnit methods
|
||||
private static final String ONETIMESETUP = "oneTimeSetUp"; //$NON-NLS-1$
|
||||
private static final String ONETIMETEARDOWN = "oneTimeTearDown"; //$NON-NLS-1$
|
||||
private static final String SUITE = "suite"; //$NON-NLS-1$
|
||||
|
|
@ -115,9 +116,8 @@ implements ChangeListener, ActionListener
|
|||
private transient TestCase TESTCLASS = null;
|
||||
private List METHODLIST = null;
|
||||
|
||||
// TODO: make private?
|
||||
protected transient ClassFilter FILTER = new ClassFilter();
|
||||
protected List CLASSLIST = null;
|
||||
private transient ClassFilter FILTER = new ClassFilter();
|
||||
private List CLASSLIST = null;
|
||||
|
||||
/**
|
||||
* Constructor for JUnitTestSamplerGui
|
||||
|
|
@ -133,10 +133,6 @@ implements ChangeListener, ActionListener
|
|||
return "junit_request"; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public String getDocAnchor() {
|
||||
return "JUnit_Sampler"; // TODO - use default ?
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the GUI components and layout.
|
||||
*/
|
||||
|
|
@ -212,6 +208,24 @@ implements ChangeListener, ActionListener
|
|||
return panel;
|
||||
}
|
||||
|
||||
private void initGui(){ // TODO - unfinished?
|
||||
appendError.setSelected(false);
|
||||
appendExc.setSelected(false);
|
||||
doSetup.setSelected(false);
|
||||
filterpkg.setText(""); //$NON-NLS-1$
|
||||
constructorLabel.setText(""); //$NON-NLS-1$
|
||||
successCode.setText(JMeterUtils.getResString("junit_success_default_code")); //$NON-NLS-1$
|
||||
successMsg.setText(JMeterUtils.getResString("junit_success_default_msg")); //$NON-NLS-1$
|
||||
failureCode.setText(JMeterUtils.getResString("junit_failure_default_code")); //$NON-NLS-1$
|
||||
failureMsg.setText(JMeterUtils.getResString("junit_failure_default_msg")); //$NON-NLS-1$
|
||||
errorMsg.setText(JMeterUtils.getResString("junit_error_default_msg")); //$NON-NLS-1$
|
||||
errorCode.setText(JMeterUtils.getResString("junit_error_default_code")); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
initGui();
|
||||
}
|
||||
|
||||
/* Implements JMeterGuiComponent.createTestElement() */
|
||||
public TestElement createTestElement()
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ public class MonitorAccumModel implements Clearable, Serializable {
|
|||
* clear listeners, subsequent "run" will not notify the gui of data
|
||||
* changes.
|
||||
*/
|
||||
public void clear() {
|
||||
public void clearData() {
|
||||
Iterator itr = this.MAP.keySet().iterator();
|
||||
while (itr.hasNext()) {
|
||||
List lt = (List) this.MAP.get(itr.next());
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ public class MonitorGraph extends JComponent implements MouseListener, MonitorGu
|
|||
/**
|
||||
* clear will repaint the graph
|
||||
*/
|
||||
public void clear() {
|
||||
public void clearData() {
|
||||
paintComponent(getGraphics());
|
||||
this.repaint();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ public class MonitorHealthPanel extends JPanel implements MonitorListener, Clear
|
|||
* clear will clear the hashmap, remove all ServerPanels from the servers
|
||||
* pane, and update the ui.
|
||||
*/
|
||||
public void clear() {
|
||||
public void clearData() {
|
||||
this.SERVERMAP.clear();
|
||||
this.SERVERS.removeAll();
|
||||
this.SERVERS.updateUI();
|
||||
|
|
|
|||
|
|
@ -162,12 +162,12 @@ public class MonitorHealthVisualizer extends AbstractVisualizer implements Image
|
|||
}
|
||||
|
||||
/**
|
||||
* Clear will clear the MonitorAccumModel and create a new instance.
|
||||
* Clears the MonitorAccumModel.
|
||||
*/
|
||||
public void clear() {
|
||||
this.MODEL.clear();
|
||||
this.HEALTHPANE.clear();
|
||||
this.PERFPANE.clear();
|
||||
public void clearData() {
|
||||
this.MODEL.clearData();
|
||||
this.HEALTHPANE.clearData();
|
||||
this.PERFPANE.clearData();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ public class MonitorModel implements Clearable, Serializable, Cloneable {
|
|||
/**
|
||||
* clear will create a new MonitorStats object.
|
||||
*/
|
||||
public void clear() {
|
||||
public void clearData() {
|
||||
current = new MonitorStats(0, 0, 0, 0, 0, "", "", "", System.currentTimeMillis());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -286,10 +286,10 @@ public class MonitorPerformancePanel extends JSplitPane implements TreeSelection
|
|||
* clear will remove all child nodes from the ROOTNODE, clear the HashMap,
|
||||
* update the graph and jpanel for the server tree.
|
||||
*/
|
||||
public void clear() {
|
||||
public void clearData() {
|
||||
this.SERVERMAP.clear();
|
||||
ROOTNODE.removeAllChildren();
|
||||
SERVERTREE.updateUI();
|
||||
GRAPH.clear();
|
||||
GRAPH.clearData();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,10 +100,10 @@ public class FtpConfigGui extends AbstractConfigGui {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
server.setText(""); //$NON-NLS-1$
|
||||
remoteFile.setText(""); //$NON-NLS-1$
|
||||
|
|
|
|||
|
|
@ -64,13 +64,13 @@ public class FtpTestSamplerGui extends AbstractSamplerGui {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
ftpDefaultPanel.clear();
|
||||
loginPanel.clear();
|
||||
ftpDefaultPanel.clearGui();
|
||||
loginPanel.clearGui();
|
||||
}
|
||||
|
||||
public String getLabelResource() {
|
||||
|
|
|
|||
|
|
@ -36,9 +36,6 @@ import org.apache.jmeter.testelement.property.TestElementProperty;
|
|||
import org.apache.jmeter.util.JMeterUtils;
|
||||
import org.apache.jorphan.gui.JLabeledTextField;
|
||||
|
||||
/**
|
||||
* @version $Revision$
|
||||
*/
|
||||
public class HttpDefaultsGui extends AbstractConfigGui {
|
||||
JLabeledTextField protocol;
|
||||
|
||||
|
|
@ -90,10 +87,10 @@ public class HttpDefaultsGui extends AbstractConfigGui {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
protocol.setText(""); //$NON-NLS-1$
|
||||
domain.setText(""); //$NON-NLS-1$
|
||||
|
|
|
|||
|
|
@ -53,8 +53,6 @@ import org.apache.log.Logger;
|
|||
*
|
||||
* Now uses Commons HttpClient parsing and matching code (since 2.1.2)
|
||||
*
|
||||
* author <a href="mailto:sdowd@arcmail.com">Sean Dowd</a>
|
||||
* @version $Revision$ $Date$
|
||||
*/
|
||||
public class CookieManager extends ConfigTestElement implements TestListener, Serializable {
|
||||
private static final Logger log = LoggingManager.getLoggerForClass();
|
||||
|
|
@ -238,7 +236,7 @@ public class CookieManager extends ConfigTestElement implements TestListener, Se
|
|||
/**
|
||||
* Remove all the cookies.
|
||||
*/
|
||||
public void clear() {
|
||||
public void clear() {// TODO: should this call super.clear()?
|
||||
log.debug("Clear all cookies from store");
|
||||
setProperty(new CollectionProperty(COOKIES, new ArrayList()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -164,4 +164,8 @@ public class HttpMirrorControlGui extends LogicControllerGui
|
|||
return panel;
|
||||
}
|
||||
|
||||
public void clearGui(){
|
||||
super.clearGui();
|
||||
portField.setText(HttpMirrorControl.DEFAULT_PORT_S);
|
||||
}
|
||||
}
|
||||
|
|
@ -135,10 +135,10 @@ public class HttpTestSampleGui extends AbstractSamplerGui {
|
|||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.apache.jmeter.gui.JMeterGUIComponent#clear()
|
||||
* @see org.apache.jmeter.gui.JMeterGUIComponent#clearGui()
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
getImages.setSelected(false);
|
||||
isMon.setSelected(false);
|
||||
urlConfigGui.clear();
|
||||
|
|
|
|||
|
|
@ -36,8 +36,6 @@ import org.apache.jmeter.gui.util.FilePanel;
|
|||
import org.apache.jorphan.gui.JLabeledTextArea;
|
||||
import org.apache.jorphan.gui.JLabeledTextField;
|
||||
|
||||
/**
|
||||
*/
|
||||
public class SoapSamplerGui extends AbstractSamplerGui {
|
||||
private JLabeledTextField urlField;
|
||||
private JLabeledTextField soapAction;
|
||||
|
|
@ -83,10 +81,10 @@ public class SoapSamplerGui extends AbstractSamplerGui {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
urlField.setText(""); //$NON-NLS-1$
|
||||
soapAction.setText(""); //$NON-NLS-1$
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ import org.apache.jmeter.protocol.http.control.AuthManager;
|
|||
* therefore the notes address those situations. <br>
|
||||
* Created on: Jun 26, 2003
|
||||
*
|
||||
* author Peter Lin
|
||||
*/
|
||||
public class WebServiceSamplerGui extends AbstractSamplerGui implements java.awt.event.ActionListener {
|
||||
|
||||
|
|
@ -191,10 +190,10 @@ public class WebServiceSamplerGui extends AbstractSamplerGui implements java.awt
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
domain.setText(""); //$NON-NLS-1$
|
||||
protocol.setText(""); //$NON-NLS-1$
|
||||
|
|
|
|||
|
|
@ -112,8 +112,8 @@ public class AuthPanel extends AbstractConfigGui implements ActionListener {
|
|||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
tableModel.clearData();
|
||||
deleteButton.setEnabled(false);
|
||||
|
|
|
|||
|
|
@ -244,10 +244,10 @@ public class CookiePanel extends AbstractConfigGui implements ActionListener {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
tableModel.clearData();
|
||||
clearEachIteration.setSelected(false);
|
||||
|
|
|
|||
|
|
@ -100,10 +100,10 @@ public class HeaderPanel extends AbstractConfigGui implements ActionListener
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
tableModel.clearData();
|
||||
deleteButton.setEnabled(false);
|
||||
|
|
|
|||
|
|
@ -115,10 +115,10 @@ public class ParamModifierGui extends AbstractPreProcessorGui implements FocusLi
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
_fieldName.setText(""); //$NON-NLS-1$
|
||||
_prefix.setText(""); //$NON-NLS-1$
|
||||
|
|
|
|||
|
|
@ -102,10 +102,10 @@ public class URLRewritingModifierGui extends AbstractPreProcessorGui {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
argumentName.setText(""); //$NON-NLS-1$
|
||||
pathExt.setSelected(false);
|
||||
|
|
|
|||
|
|
@ -68,10 +68,10 @@ public class UserParameterModifierGui extends AbstractPreProcessorGui {
|
|||
((UserParameterModifier) mod).setXmlUri(fileNameField.getText());
|
||||
}
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
fileNameField.setText("users.xml"); //$NON-NLS-1$
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,10 +74,10 @@ public class BSFSamplerGui extends AbstractSamplerGui {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
scriptField.setText(""); //$NON-NLS-1$
|
||||
langField.setText(""); //$NON-NLS-1$
|
||||
|
|
|
|||
|
|
@ -71,10 +71,10 @@ public class BeanShellSamplerGui extends AbstractSamplerGui {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
filename.setText(""); //$NON-NLS-1$
|
||||
parameters.setText(""); //$NON-NLS-1$
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ import org.apache.jorphan.gui.JLabeledTextField;
|
|||
* Configuration screen for Java Messaging Point-to-Point requests. <br>
|
||||
* Created on: October 28, 2004
|
||||
*
|
||||
* @author Martijn Blankestijn
|
||||
*/
|
||||
public class JMSConfigGui extends AbstractSamplerGui {
|
||||
|
||||
|
|
@ -77,7 +76,8 @@ public class JMSConfigGui extends AbstractSamplerGui {
|
|||
/**
|
||||
* Clears all fields.
|
||||
*/
|
||||
public void clear() {
|
||||
public void clearGui() {// renamed from clear
|
||||
super.clearGui();
|
||||
queueuConnectionFactory.setText("");
|
||||
sendQueue.setText("");
|
||||
receiveQueue.setText("");
|
||||
|
|
|
|||
|
|
@ -228,6 +228,25 @@ public class JMSPublisherGui extends AbstractSamplerGui implements java.awt.even
|
|||
this.add(mainPanel);
|
||||
}
|
||||
|
||||
public void clearGui(){
|
||||
super.clearGui();
|
||||
useProperties.setSelected(false);
|
||||
jndiICF.setText(""); // $NON-NLS-1$
|
||||
urlField.setText(""); // $NON-NLS-1$
|
||||
jndiConnFac.setText(""); // $NON-NLS-1$
|
||||
jmsTopic.setText(""); // $NON-NLS-1$
|
||||
jmsUser.setText(""); // $NON-NLS-1$
|
||||
jmsPwd.setText(""); // $NON-NLS-1$
|
||||
textMessage.setText(""); // $NON-NLS-1$
|
||||
messageFile.setFilename(""); // $NON-NLS-1$
|
||||
randomFile.setFilename(""); // $NON-NLS-1$
|
||||
msgChoice.setText(""); // $NON-NLS-1$
|
||||
configChoice.setText(use_text);
|
||||
updateConfig(use_text);
|
||||
iterations.setText(""); // $NON-NLS-1$
|
||||
reqAuth.setText(""); // $NON-NLS-1$
|
||||
}
|
||||
|
||||
/**
|
||||
* the implementation loads the URL and the soap action for the request.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -41,8 +41,6 @@ import org.apache.jmeter.protocol.jms.sampler.SubscriberSampler;
|
|||
/**
|
||||
* This is the GUI for JMS Subscriber <br>
|
||||
*
|
||||
* @author Peter Lin
|
||||
* @version $Id$
|
||||
*/
|
||||
public class JMSSubscriberGui extends AbstractSamplerGui implements java.awt.event.ActionListener, ChangeListener {
|
||||
|
||||
|
|
@ -217,6 +215,21 @@ public class JMSSubscriberGui extends AbstractSamplerGui implements java.awt.eve
|
|||
clientChoice.setText(sampler.getClientChoice());
|
||||
}
|
||||
|
||||
public void clearGui(){
|
||||
super.clearGui();
|
||||
useProperties.setSelected(false); // $NON-NLS-1$
|
||||
jndiICF.setText(""); // $NON-NLS-1$
|
||||
urlField.setText(""); // $NON-NLS-1$
|
||||
jndiConnFac.setText(""); // $NON-NLS-1$
|
||||
jmsTopic.setText(""); // $NON-NLS-1$
|
||||
jmsUser.setText(""); // $NON-NLS-1$
|
||||
jmsPwd.setText(""); // $NON-NLS-1$
|
||||
iterations.setText(""); // $NON-NLS-1$
|
||||
reqAuth.setText(""); // $NON-NLS-1$
|
||||
readResponse.setSelected(true);
|
||||
clientChoice.setText(""); // $NON-NLS-1$
|
||||
}
|
||||
|
||||
/**
|
||||
* method from ActionListener
|
||||
*
|
||||
|
|
|
|||
|
|
@ -188,10 +188,10 @@ public class LdapConfigGui extends AbstractConfigGui implements ItemListener {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
rootdn.setText(""); //$NON-NLS-1$
|
||||
searchbase.setText(""); //$NON-NLS-1$
|
||||
|
|
|
|||
|
|
@ -321,10 +321,10 @@ public class LdapExtConfigGui extends AbstractConfigGui implements ItemListener
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
rootdn.setText(""); //$NON-NLS-1$
|
||||
searchbase.setText(""); //$NON-NLS-1$
|
||||
|
|
|
|||
|
|
@ -79,12 +79,12 @@ public class LdapExtTestSamplerGui extends AbstractSamplerGui {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
ldapDefaultPanel.clear();
|
||||
ldapDefaultPanel.clearGui();
|
||||
}
|
||||
|
||||
public String getLabelResource() {
|
||||
|
|
|
|||
|
|
@ -30,10 +30,6 @@ import org.apache.jmeter.samplers.gui.AbstractSamplerGui;
|
|||
import org.apache.jmeter.testelement.TestElement;
|
||||
import org.apache.jmeter.util.JMeterUtils;
|
||||
|
||||
/**
|
||||
* Created Apr 29 2003 11:52 AM
|
||||
*
|
||||
*/
|
||||
public class LdapTestSamplerGui extends AbstractSamplerGui {
|
||||
private LoginConfigGui loginPanel;
|
||||
|
||||
|
|
@ -77,13 +73,13 @@ public class LdapTestSamplerGui extends AbstractSamplerGui {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
ldapDefaultPanel.clear();
|
||||
loginPanel.clear();
|
||||
ldapDefaultPanel.clearGui();
|
||||
loginPanel.clearGui();
|
||||
}
|
||||
|
||||
public String getLabelResource() {
|
||||
|
|
|
|||
|
|
@ -38,9 +38,6 @@ import org.apache.jmeter.testelement.TestElement;
|
|||
import org.apache.jmeter.util.JMeterUtils;
|
||||
import org.apache.jorphan.gui.layout.VerticalLayout;
|
||||
|
||||
/**
|
||||
* @author Thad Smith
|
||||
*/
|
||||
public class MailReaderSamplerGui extends AbstractSamplerGui {
|
||||
|
||||
// Gui Components
|
||||
|
|
@ -89,6 +86,7 @@ public class MailReaderSamplerGui extends AbstractSamplerGui {
|
|||
|
||||
public MailReaderSamplerGui() {
|
||||
init();
|
||||
initGui();
|
||||
}
|
||||
|
||||
public String getLabelResource() {
|
||||
|
|
@ -240,7 +238,6 @@ public class MailReaderSamplerGui extends AbstractSamplerGui {
|
|||
nmbg.add(allMessagesButton);
|
||||
nmbg.add(someMessagesButton);
|
||||
someMessagesField = new JTextField(5);
|
||||
someMessagesField.setText("0");
|
||||
allMessagesButton.setSelected(true);
|
||||
numMessagesPanel.add(allMessagesButton);
|
||||
numMessagesPanel.add(someMessagesButton);
|
||||
|
|
@ -250,4 +247,20 @@ public class MailReaderSamplerGui extends AbstractSamplerGui {
|
|||
deleteBox = new JCheckBox(DeleteLabel);
|
||||
add(deleteBox);
|
||||
}
|
||||
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
initGui();
|
||||
}
|
||||
|
||||
private void initGui() {
|
||||
allMessagesButton.setSelected(true);
|
||||
//someMessagesButton.setSelected(false);
|
||||
//someMessagesField.setText("0");
|
||||
deleteBox.setSelected(false);
|
||||
folderBox.setText(INBOX);
|
||||
passwordBox.setText("");
|
||||
serverBox.setText("");
|
||||
usernameBox.setText("");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,10 +111,10 @@ public class TCPConfigGui extends AbstractConfigGui {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
server.setText(""); //$NON-NLS-1$
|
||||
port.setText(""); //$NON-NLS-1$
|
||||
|
|
|
|||
|
|
@ -64,13 +64,13 @@ public class TCPSamplerGui extends AbstractSamplerGui {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements JMeterGUIComponent.clear
|
||||
* Implements JMeterGUIComponent.clearGui
|
||||
*/
|
||||
public void clear() {
|
||||
super.clear();
|
||||
public void clearGui() {
|
||||
super.clearGui();
|
||||
|
||||
TcpDefaultPanel.clear();
|
||||
loginPanel.clear();
|
||||
TcpDefaultPanel.clearGui();
|
||||
loginPanel.clearGui();
|
||||
}
|
||||
|
||||
public String getLabelResource() {
|
||||
|
|
|
|||
|
|
@ -51,8 +51,6 @@ import org.apache.log.Logger;
|
|||
* was safer to just make a new class, rather than braking existing
|
||||
* JMeter gui code.
|
||||
*
|
||||
* @author Peter Lin
|
||||
* @version $Revision$ updated on $Date$
|
||||
*/
|
||||
public final class ReportGuiPackage implements LocaleChangeListener {
|
||||
/** Logging. */
|
||||
|
|
@ -228,12 +226,7 @@ public final class ReportGuiPackage implements LocaleChangeListener {
|
|||
updateCurrentNode();
|
||||
TestElement curNode = treeListener.getCurrentNode().getTestElement();
|
||||
JMeterGUIComponent comp = getGui(curNode);
|
||||
if (!(comp instanceof AbstractVisualizer)) // TODO: a hack that
|
||||
// needs to be fixed for
|
||||
// 2.0
|
||||
{
|
||||
comp.clear();
|
||||
}
|
||||
comp.clearGui();
|
||||
log.debug("Updating gui to new node");
|
||||
comp.configure(curNode);
|
||||
currentNodeUpdated = false;
|
||||
|
|
@ -269,7 +262,7 @@ public final class ReportGuiPackage implements LocaleChangeListener {
|
|||
public TestElement createTestElement(Class guiClass, Class testClass) {
|
||||
try {
|
||||
JMeterGUIComponent comp = getGuiFromCache(guiClass, testClass);
|
||||
comp.clear();
|
||||
comp.clearGui();
|
||||
TestElement node = comp.createTestElement();
|
||||
nodesToGui.put(node, comp);
|
||||
return node;
|
||||
|
|
@ -300,7 +293,7 @@ public final class ReportGuiPackage implements LocaleChangeListener {
|
|||
} else {
|
||||
comp = getGuiFromCache(c, null);
|
||||
}
|
||||
comp.clear();
|
||||
comp.clearGui();
|
||||
TestElement node = comp.createTestElement();
|
||||
nodesToGui.put(node, comp);
|
||||
return node;
|
||||
|
|
@ -347,7 +340,7 @@ public final class ReportGuiPackage implements LocaleChangeListener {
|
|||
* if the specified GUI class cannot be found
|
||||
*/
|
||||
private JMeterGUIComponent getGuiFromCache(Class guiClass, Class testClass) throws InstantiationException,
|
||||
IllegalAccessException, ClassNotFoundException {
|
||||
IllegalAccessException {
|
||||
JMeterGUIComponent comp;
|
||||
if (guiClass == TestBeanGUI.class) {
|
||||
comp = (TestBeanGUI) testBeanGUIs.get(testClass);
|
||||
|
|
|
|||
|
|
@ -103,6 +103,12 @@ https.sessioncontext.shared=true
|
|||
</p>
|
||||
<h4>Incompatible changes (development):</h4>
|
||||
<p>
|
||||
<b>N.B.</b>The clear() method was defined in the following interfaces: Clearable, JMeterGUIComponent and TestElement.
|
||||
The methods serve different purposes, so two of them were renamed:
|
||||
the Clearable method is now clearData() and the JMeterGUIComponent method is now clearGui().
|
||||
3rd party add-ons may need to be rebuilt.
|
||||
</p>
|
||||
<p>
|
||||
Calulator and SamplingStatCalculator classes no longer provide any formatting of their data.
|
||||
Formatting should now be done using the jorphan.gui Renderer classes.
|
||||
</p>
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue