in src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java [921:1023]
private JPanel createHTTPSamplerPanel() {
DefaultComboBoxModel<String> m = new DefaultComboBoxModel<>();
for (String s : HTTPSamplerFactory.getImplementations()){
m.addElement(s);
}
m.addElement(USE_DEFAULT_HTTP_IMPL);
samplerTypeName = new JComboBox<>(m);
samplerTypeName.setSelectedItem(USE_DEFAULT_HTTP_IMPL);
samplerTypeName.addItemListener(this);
JLabel labelSamplerType = new JLabel(JMeterUtils.getResString("proxy_sampler_type")); // $NON-NLS-1$
labelSamplerType.setLabelFor(samplerTypeName);
samplerRedirectAutomatically = new JCheckBox(JMeterUtils.getResString("follow_redirects_auto")); // $NON-NLS-1$
samplerRedirectAutomatically.setSelected(false);
samplerRedirectAutomatically.addActionListener(this);
samplerRedirectAutomatically.setActionCommand(ENABLE_RESTART);
samplerFollowRedirects = new JCheckBox(JMeterUtils.getResString("follow_redirects")); // $NON-NLS-1$
samplerFollowRedirects.setSelected(true);
samplerFollowRedirects.addActionListener(this);
samplerFollowRedirects.setActionCommand(ENABLE_RESTART);
useKeepAlive = new JCheckBox(JMeterUtils.getResString("use_keepalive")); // $NON-NLS-1$
useKeepAlive.setSelected(true);
useKeepAlive.addActionListener(this);
useKeepAlive.setActionCommand(ENABLE_RESTART);
samplerDownloadImages = new JCheckBox(JMeterUtils.getResString("web_testing_retrieve_images")); // $NON-NLS-1$
samplerDownloadImages.setSelected(false);
samplerDownloadImages.addActionListener(this);
samplerDownloadImages.setActionCommand(ENABLE_RESTART);
DefaultComboBoxModel<String> choice = new DefaultComboBoxModel<>();
choice.addElement(JMeterUtils.getResString("sample_name_prefix")); // $NON-NLS-1$
choice.addElement(JMeterUtils.getResString("sample_name_transaction")); // $NON-NLS-1$
choice.addElement(JMeterUtils.getResString("sample_name_suffix")); // $NON-NLS-1$
choice.addElement(JMeterUtils.getResString("sample_name_formatter")); // $NON-NLS-1$
httpSampleNamingMode = new JComboBox<>(choice);
httpSampleNamingMode.setName(HTTP_SAMPLER_NAMING_MODE);
httpSampleNamingMode.addItemListener(this);
defaultEncoding = new JTextField(15);
prefixHTTPSampleName = new JTextField(20);
prefixHTTPSampleName.addKeyListener(this);
prefixHTTPSampleName.setName(PREFIX_HTTP_SAMPLER_NAME);
httpSampleNameFormat = new JTextField(20);
httpSampleNameFormat.addKeyListener(this);
httpSampleNameFormat.setName(HTTP_SAMPLER_NAME_FORMAT);
proxyPauseHTTPSample = new JTextField(10);
proxyPauseHTTPSample.addKeyListener(this);
proxyPauseHTTPSample.setName(PROXY_PAUSE_HTTP_SAMPLER);
proxyPauseHTTPSample.setActionCommand(ENABLE_RESTART);
JLabel labelProxyPause = new JLabel(JMeterUtils.getResString("proxy_pause_http_sampler")); // $NON-NLS-1$
labelProxyPause.setLabelFor(proxyPauseHTTPSample);
JLabel labelDefaultEncoding = new JLabel(JMeterUtils.getResString("proxy_default_encoding")); // $NON-NLS-1$
labelDefaultEncoding.setLabelFor(defaultEncoding);
JPanel panel = new JPanel(new MigLayout("fillx, wrap 3"));
panel.setBorder(BorderFactory.createTitledBorder(
JMeterUtils.getResString("proxy_sampler_settings"))); // $NON-NLS-1$
JLabel labelSampleTransactionName = new JLabel(JMeterUtils.getResString("sample_name_transaction"));
labelSampleTransactionName.setLabelFor(prefixHTTPSampleName);
panel.add(labelSampleTransactionName);
panel.add(prefixHTTPSampleName, "growx, span");
JLabel labelNamingScheme = new JLabel(JMeterUtils.getResString("sample_naming_scheme"));
labelNamingScheme.setLabelFor(httpSampleNamingMode);
panel.add(labelNamingScheme, "split 2");
panel.add(httpSampleNamingMode);
panel.add(httpSampleNameFormat, "growx, span");
httpSampleNameFormat.setToolTipText(JMeterUtils.getResString("sample_naming_format_help"));
JLabel labelSetCounter = new JLabel(JMeterUtils.getResString("sample_creator_counter_value"));
counterValue = new JTextField(10);
labelSetCounter.setLabelFor(counterValue);
JButton buttonSetCounter = new JButton(JMeterUtils.getResString("sample_creator_set_counter"));
buttonSetCounter.setActionCommand(SET_COUNTERS);
buttonSetCounter.addActionListener(this);
panel.add(labelSetCounter);
panel.add(counterValue);
panel.add(buttonSetCounter);
panel.add(labelProxyPause);
panel.add(proxyPauseHTTPSample, "growx, span");
panel.add(labelDefaultEncoding);
panel.add(defaultEncoding, "growx, span");
panel.add(samplerDownloadImages);
panel.add(samplerRedirectAutomatically);
panel.add(samplerFollowRedirects);
panel.add(useKeepAlive, "wrap");
panel.add(labelSamplerType);
panel.add(samplerTypeName, "growx, span");
return panel;
}