add(createOptionalTasksPanel(), BorderLayout.SOUTH);
}
protected JPanel createOptionalTasksPanel() {
// OPTIONAL TASKS
final JPanel optionalTasksPanel = new VerticalPanel();
optionalTasksPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils
.getResString("optional_tasks"))); // $NON-NLS-1$
final JPanel checkBoxPanel = new HorizontalPanel();
// RETRIEVE IMAGES
getImages = new JCheckBox(JMeterUtils.getResString("web_testing_retrieve_images")); // $NON-NLS-1$
// add a listener to activate or not concurrent dwn.
getImages.addItemListener(new ItemListener() {
public void itemStateChanged(final ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) { enableConcurrentDwn(true); }
else { enableConcurrentDwn(false); }
}
});
// Download concurrent resources
concurrentDwn = new JCheckBox(JMeterUtils.getResString("web_testing_concurrent_download")); // $NON-NLS-1$
concurrentDwn.addItemListener(new ItemListener() {
public void itemStateChanged(final ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) { concurrentPool.setEnabled(true); }
else { concurrentPool.setEnabled(false); }
}
});
concurrentPool = new JTextField(2); // 2 column size
concurrentPool.setMaximumSize(new Dimension(30,20));
// Is monitor
isMon = new JCheckBox(JMeterUtils.getResString("monitor_is_title")); // $NON-NLS-1$
// Use MD5
useMD5 = new JCheckBox(JMeterUtils.getResString("response_save_as_md5")); // $NON-NLS-1$
checkBoxPanel.add(getImages);
checkBoxPanel.add(concurrentDwn);
checkBoxPanel.add(concurrentPool);
checkBoxPanel.add(isMon);
checkBoxPanel.add(useMD5);
optionalTasksPanel.add(checkBoxPanel);
// Embedded URL match regex
embeddedRE = new JLabeledTextField(JMeterUtils.getResString("web_testing_embedded_url_pattern"),30); // $NON-NLS-1$
optionalTasksPanel.add(embeddedRE, BorderLayout.CENTER);
if (!isAJP) {
// Add a new field source ip address (for HC implementations only)
sourceIpAddr = new JLabeledTextField(JMeterUtils.getResString("web_testing2_source_ip")); // $NON-NLS-1$
optionalTasksPanel.add(sourceIpAddr, BorderLayout.EAST);
}
return optionalTasksPanel;
}