Search in sources :

Example 1 with HorizontalPanel

use of org.apache.jmeter.gui.util.HorizontalPanel in project jmeter by apache.

the class FtpConfigGui method createOptionsPanel.

private JPanel createOptionsPanel() {
    ButtonGroup group = new ButtonGroup();
    //$NON-NLS-1$
    getBox = new JRadioButton(JMeterUtils.getResString("ftp_get"));
    group.add(getBox);
    getBox.setSelected(true);
    //$NON-NLS-1$
    putBox = new JRadioButton(JMeterUtils.getResString("ftp_put"));
    group.add(putBox);
    //$NON-NLS-1$
    binaryMode = new JCheckBox(JMeterUtils.getResString("ftp_binary_mode"));
    //$NON-NLS-1$
    saveResponseData = new JCheckBox(JMeterUtils.getResString("ftp_save_response_data"));
    JPanel optionsPanel = new HorizontalPanel();
    optionsPanel.add(getBox);
    optionsPanel.add(putBox);
    optionsPanel.add(binaryMode);
    optionsPanel.add(saveResponseData);
    return optionsPanel;
}
Also used : JCheckBox(javax.swing.JCheckBox) JPanel(javax.swing.JPanel) JRadioButton(javax.swing.JRadioButton) ButtonGroup(javax.swing.ButtonGroup) HorizontalPanel(org.apache.jmeter.gui.util.HorizontalPanel)

Example 2 with HorizontalPanel

use of org.apache.jmeter.gui.util.HorizontalPanel in project jmeter by apache.

the class HttpDefaultsGui method getTimeOutPanel.

private JPanel getTimeOutPanel() {
    JPanel timeOut = new HorizontalPanel();
    timeOut.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), // $NON-NLS-1$
    JMeterUtils.getResString("web_server_timeout_title")));
    final JPanel connPanel = getConnectTimeOutPanel();
    final JPanel reqPanel = getResponseTimeOutPanel();
    timeOut.add(connPanel);
    timeOut.add(reqPanel);
    return timeOut;
}
Also used : JPanel(javax.swing.JPanel) HorizontalPanel(org.apache.jmeter.gui.util.HorizontalPanel)

Example 3 with HorizontalPanel

use of org.apache.jmeter.gui.util.HorizontalPanel in project jmeter by apache.

the class UrlConfigGui method getWebServerPanel.

/**
     * Create a panel containing the webserver (domain+port) and scheme.
     *
     * @return the panel
     */
protected final JPanel getWebServerPanel() {
    // PROTOCOL
    // $NON-NLS-1$
    protocol = new JLabeledTextField(JMeterUtils.getResString("protocol"), 4);
    // $NON-NLS-1$
    port = new JLabeledTextField(JMeterUtils.getResString("web_server_port"), 7);
    // $NON-NLS-1$
    domain = new JLabeledTextField(JMeterUtils.getResString("web_server_domain"), 40);
    JPanel webServerPanel = new HorizontalPanel();
    webServerPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), // $NON-NLS-1$
    JMeterUtils.getResString("web_server")));
    webServerPanel.add(protocol);
    webServerPanel.add(domain);
    webServerPanel.add(port);
    return webServerPanel;
}
Also used : JLabeledTextField(org.apache.jorphan.gui.JLabeledTextField) JPanel(javax.swing.JPanel) HorizontalPanel(org.apache.jmeter.gui.util.HorizontalPanel)

Example 4 with HorizontalPanel

use of org.apache.jmeter.gui.util.HorizontalPanel in project jmeter by apache.

the class HttpDefaultsGui 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));
    setBorder(makeBorder());
    // URL CONFIG
    urlConfigGui = new UrlConfigGui(false, true, false);
    // HTTP request options
    JPanel httpOptions = new HorizontalPanel();
    httpOptions.add(getImplementationPanel());
    httpOptions.add(getTimeOutPanel());
    // AdvancedPanel (embedded resources, source address and optional tasks)
    JPanel advancedPanel = new VerticalPanel();
    advancedPanel.add(httpOptions);
    advancedPanel.add(createEmbeddedRsrcPanel());
    advancedPanel.add(createSourceAddrPanel());
    advancedPanel.add(getProxyServerPanel());
    advancedPanel.add(createOptionalTasksPanel());
    JTabbedPane tabbedPane = new JTabbedPane();
    tabbedPane.add(JMeterUtils.getResString("web_testing_basic"), urlConfigGui);
    tabbedPane.add(JMeterUtils.getResString("web_testing_advanced"), advancedPanel);
    JPanel emptyPanel = new JPanel();
    emptyPanel.setMaximumSize(new Dimension());
    add(makeTitlePanel(), BorderLayout.NORTH);
    add(tabbedPane, BorderLayout.CENTER);
    add(emptyPanel, BorderLayout.SOUTH);
}
Also used : JPanel(javax.swing.JPanel) VerticalPanel(org.apache.jmeter.gui.util.VerticalPanel) BorderLayout(java.awt.BorderLayout) JTabbedPane(javax.swing.JTabbedPane) HorizontalPanel(org.apache.jmeter.gui.util.HorizontalPanel) Dimension(java.awt.Dimension)

Example 5 with HorizontalPanel

use of org.apache.jmeter.gui.util.HorizontalPanel in project jmeter by apache.

the class HttpDefaultsGui method createSourceAddrPanel.

protected JPanel createSourceAddrPanel() {
    final JPanel sourceAddrPanel = new HorizontalPanel();
    sourceAddrPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString(// $NON-NLS-1$
    "web_testing_source_ip")));
    //default: IP/Hostname
    sourceIpType.setSelectedIndex(HTTPSamplerBase.SourceType.HOSTNAME.ordinal());
    sourceAddrPanel.add(sourceIpType);
    sourceIpAddr = new JTextField();
    sourceAddrPanel.add(sourceIpAddr);
    return sourceAddrPanel;
}
Also used : JPanel(javax.swing.JPanel) HorizontalPanel(org.apache.jmeter.gui.util.HorizontalPanel) JTextField(javax.swing.JTextField)

Aggregations

HorizontalPanel (org.apache.jmeter.gui.util.HorizontalPanel)37 JPanel (javax.swing.JPanel)30 JLabel (javax.swing.JLabel)17 BorderLayout (java.awt.BorderLayout)15 JTextField (javax.swing.JTextField)15 VerticalPanel (org.apache.jmeter.gui.util.VerticalPanel)11 JCheckBox (javax.swing.JCheckBox)10 Dimension (java.awt.Dimension)6 JLabeledTextField (org.apache.jorphan.gui.JLabeledTextField)6 ButtonGroup (javax.swing.ButtonGroup)5 JRadioButton (javax.swing.JRadioButton)4 GridBagConstraints (java.awt.GridBagConstraints)3 GridBagLayout (java.awt.GridBagLayout)3 DefaultComboBoxModel (javax.swing.DefaultComboBoxModel)3 FlowLayout (java.awt.FlowLayout)2 JPasswordField (javax.swing.JPasswordField)2 JScrollPane (javax.swing.JScrollPane)2 JTabbedPane (javax.swing.JTabbedPane)2 Color (java.awt.Color)1 Format (java.text.Format)1