use of org.apache.jmeter.gui.util.HorizontalPanel in project jmeter by apache.
the class HttpDefaultsGui method createEmbeddedRsrcPanel.
protected JPanel createEmbeddedRsrcPanel() {
// retrieve Embedded resources
// $NON-NLS-1$
retrieveEmbeddedResources = new JCheckBox(JMeterUtils.getResString("web_testing_retrieve_images"));
// add a listener to activate or not concurrent dwn.
retrieveEmbeddedResources.addItemListener(e -> {
if (e.getStateChange() == ItemEvent.SELECTED) {
enableConcurrentDwn(true);
} else {
enableConcurrentDwn(false);
}
});
// Download concurrent resources
// $NON-NLS-1$
concurrentDwn = new JCheckBox(JMeterUtils.getResString("web_testing_concurrent_download"));
concurrentDwn.addItemListener(e -> {
if (retrieveEmbeddedResources.isSelected() && e.getStateChange() == ItemEvent.SELECTED) {
concurrentPool.setEnabled(true);
} else {
concurrentPool.setEnabled(false);
}
});
// 2 columns size
concurrentPool = new JTextField(2);
concurrentPool.setMinimumSize(new Dimension(10, (int) concurrentPool.getPreferredSize().getHeight()));
concurrentPool.setMaximumSize(new Dimension(30, (int) concurrentPool.getPreferredSize().getHeight()));
final JPanel embeddedRsrcPanel = new HorizontalPanel();
embeddedRsrcPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString(// $NON-NLS-1$
"web_testing_retrieve_title")));
embeddedRsrcPanel.add(retrieveEmbeddedResources);
embeddedRsrcPanel.add(concurrentDwn);
embeddedRsrcPanel.add(concurrentPool);
// Embedded URL match regex
// $NON-NLS-1$
embeddedRE = new JLabeledTextField(JMeterUtils.getResString("web_testing_embedded_url_pattern"), 20);
embeddedRsrcPanel.add(embeddedRE);
return embeddedRsrcPanel;
}
use of org.apache.jmeter.gui.util.HorizontalPanel in project jmeter by apache.
the class FtpConfigGui method init.
private void init() {
// WARNING: called from ctor so must not be overridden (i.e. must be private or final)
setLayout(new BorderLayout(0, 5));
if (displayName) {
setBorder(makeBorder());
add(makeTitlePanel(), BorderLayout.NORTH);
}
// MAIN PANEL
VerticalPanel mainPanel = new VerticalPanel();
JPanel serverPanel = new HorizontalPanel();
serverPanel.add(createServerPanel(), BorderLayout.CENTER);
serverPanel.add(getPortPanel(), BorderLayout.EAST);
mainPanel.add(serverPanel);
mainPanel.add(createRemoteFilenamePanel());
mainPanel.add(createLocalFilenamePanel());
mainPanel.add(createLocalFileContentsPanel());
mainPanel.add(createOptionsPanel());
add(mainPanel, BorderLayout.CENTER);
}
use of org.apache.jmeter.gui.util.HorizontalPanel in project jmeter by apache.
the class MD5HexAssertionGUI method init.
private void init() {
// WARNING: called from ctor so must not be overridden (i.e. must be private or final)
setLayout(new BorderLayout(0, 10));
setBorder(makeBorder());
add(makeTitlePanel(), BorderLayout.NORTH);
JPanel mainPanel = new JPanel(new BorderLayout());
// USER_INPUT
HorizontalPanel md5HexPanel = new HorizontalPanel();
md5HexPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), // $NON-NLS-1$
JMeterUtils.getResString("md5hex_assertion_md5hex_test")));
//$NON-NLS-1$
md5HexPanel.add(new JLabel(JMeterUtils.getResString("md5hex_assertion_label")));
md5HexInput = new JTextField(25);
md5HexPanel.add(md5HexInput);
mainPanel.add(md5HexPanel, BorderLayout.NORTH);
add(mainPanel, BorderLayout.CENTER);
}
use of org.apache.jmeter.gui.util.HorizontalPanel in project jmeter by apache.
the class XMLSchemaAssertionGUI method init.
/**
* Inits the GUI.
*/
private void init() {
// WARNING: called from ctor so must not be overridden (i.e. must be private or final)
setLayout(new BorderLayout(0, 10));
setBorder(makeBorder());
add(makeTitlePanel(), BorderLayout.NORTH);
JPanel mainPanel = new JPanel(new BorderLayout());
// USER_INPUT
VerticalPanel assertionPanel = new VerticalPanel();
assertionPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "XML Schema"));
// doctype
HorizontalPanel xmlSchemaPanel = new HorizontalPanel();
//$NON-NLS-1$
xmlSchemaPanel.add(new JLabel(JMeterUtils.getResString("xmlschema_assertion_label")));
xmlSchema = new JTextField(26);
xmlSchemaPanel.add(xmlSchema);
assertionPanel.add(xmlSchemaPanel);
mainPanel.add(assertionPanel, BorderLayout.NORTH);
add(mainPanel, BorderLayout.CENTER);
}
use of org.apache.jmeter.gui.util.HorizontalPanel in project jmeter by apache.
the class HTMLAssertionGui method init.
/**
* Inits the GUI.
*/
private void init() {
// WARNING: called from ctor so must not be overridden (i.e. must be private or final)
setLayout(new BorderLayout(0, 10));
setBorder(makeBorder());
add(makeTitlePanel(), BorderLayout.NORTH);
JPanel mainPanel = new JPanel(new BorderLayout());
// USER_INPUT
VerticalPanel assertionPanel = new VerticalPanel();
assertionPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Tidy Settings"));
// doctype
HorizontalPanel docTypePanel = new HorizontalPanel();
docTypeBox = new JComboBox<>(new String[] { "omit", "auto", "strict", "loose" });
// docTypePanel.add(new
// JLabel(JMeterUtils.getResString("duration_assertion_label"))); //$NON-NLS-1$
docTypePanel.add(new JLabel("Doctype:"));
docTypePanel.add(docTypeBox);
assertionPanel.add(docTypePanel);
// format (HTML, XHTML, XML)
VerticalPanel formatPanel = new VerticalPanel();
formatPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Format"));
//$NON-NLS-1$
htmlRadioButton = new JRadioButton("HTML", true);
//$NON-NLS-1$
xhtmlRadioButton = new JRadioButton("XHTML", false);
//$NON-NLS-1$
xmlRadioButton = new JRadioButton("XML", false);
ButtonGroup buttonGroup = new ButtonGroup();
buttonGroup.add(htmlRadioButton);
buttonGroup.add(xhtmlRadioButton);
buttonGroup.add(xmlRadioButton);
formatPanel.add(htmlRadioButton);
formatPanel.add(xhtmlRadioButton);
formatPanel.add(xmlRadioButton);
assertionPanel.add(formatPanel);
// errors only
errorsOnly = new JCheckBox("Errors only", false);
errorsOnly.addActionListener(this);
assertionPanel.add(errorsOnly);
// thresholds
HorizontalPanel thresholdPanel = new HorizontalPanel();
thresholdPanel.add(new JLabel("Error threshold:"));
// $NON-NLS-1$
errorThresholdField = new JTextField("0", 5);
errorThresholdField.setName(ERROR_THRESHOLD_FIELD);
errorThresholdField.addKeyListener(this);
thresholdPanel.add(errorThresholdField);
thresholdPanel.add(new JLabel("Warning threshold:"));
// $NON-NLS-1$
warningThresholdField = new JTextField("0", 5);
warningThresholdField.setName(WARNING_THRESHOLD_FIELD);
warningThresholdField.addKeyListener(this);
thresholdPanel.add(warningThresholdField);
assertionPanel.add(thresholdPanel);
// file panel
//$NON-NLS-1$ //$NON-NLS-2$
filePanel = new FilePanel(JMeterUtils.getResString("html_assertion_file"), ".txt");
assertionPanel.add(filePanel);
mainPanel.add(assertionPanel, BorderLayout.NORTH);
add(mainPanel, BorderLayout.CENTER);
}
Aggregations