Search in sources :

Example 91 with JCheckBox

use of javax.swing.JCheckBox in project jmeter by apache.

the class IfControllerPanel method createConditionPanel.

/**
     * Create a GUI panel containing the condition.
     *
     * @return a GUI panel containing the condition components
     */
private JPanel createConditionPanel() {
    JPanel conditionPanel = new JPanel(new BorderLayout(5, 0));
    // Condition LABEL
    // $NON-NLS-1$
    JLabel conditionLabel = new JLabel(JMeterUtils.getResString("if_controller_label"));
    conditionPanel.add(conditionLabel, BorderLayout.WEST);
    // Condition
    // $NON-NLS-1$
    theCondition = JSyntaxTextArea.getInstance(5, 50);
    // $NON-NLS-1$
    theCondition.setToolTipText(JMeterUtils.getResString("if_controller_performance"));
    conditionLabel.setLabelFor(theCondition);
    conditionPanel.add(JTextScrollPane.getInstance(theCondition), BorderLayout.CENTER);
    conditionPanel.add(Box.createHorizontalGlue(), BorderLayout.NORTH);
    JPanel optionPanel = new JPanel();
    // Use expression instead of Javascript
    // $NON-NLS-1$
    useExpression = new JCheckBox(JMeterUtils.getResString("if_controller_expression"));
    // $NON-NLS-1$
    useExpression.setToolTipText(JMeterUtils.getResString("if_controller_performance"));
    optionPanel.add(useExpression);
    // Evaluate All checkbox
    // $NON-NLS-1$
    evaluateAll = new JCheckBox(JMeterUtils.getResString("if_controller_evaluate_all"));
    optionPanel.add(evaluateAll);
    conditionPanel.add(optionPanel, BorderLayout.SOUTH);
    return conditionPanel;
}
Also used : JCheckBox(javax.swing.JCheckBox) JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) JLabel(javax.swing.JLabel)

Example 92 with JCheckBox

use of javax.swing.JCheckBox in project jmeter by apache.

the class ResultSaverGui method init.

private void init() {
    // WARNING: called from ctor so must not be overridden (i.e. must be private or final)
    setLayout(new BorderLayout());
    setBorder(makeBorder());
    Box box = Box.createVerticalBox();
    box.add(makeTitlePanel());
    box.add(createFilenamePrefixPanel());
    box.add(createVariableNamePanel());
    // $NON-NLS-1$
    errorsOnly = new JCheckBox(JMeterUtils.getResString("resultsaver_errors"));
    box.add(errorsOnly);
    // $NON-NLS-1$
    successOnly = new JCheckBox(JMeterUtils.getResString("resultsaver_success"));
    box.add(successOnly);
    // $NON-NLS-1$
    skipAutoNumber = new JCheckBox(JMeterUtils.getResString("resultsaver_skipautonumber"));
    box.add(skipAutoNumber);
    // $NON-NLS-1$
    skipSuffix = new JCheckBox(JMeterUtils.getResString("resultsaver_skipsuffix"));
    box.add(skipSuffix);
    // $NON-NLS-1$
    addTimestamp = new JCheckBox(JMeterUtils.getResString("resultsaver_addtimestamp"));
    box.add(addTimestamp);
    // $NON-NLS-1$
    numberPadLength = new JLabeledTextField(JMeterUtils.getResString("resultsaver_numberpadlen"));
    box.add(numberPadLength);
    add(box, BorderLayout.NORTH);
}
Also used : JCheckBox(javax.swing.JCheckBox) JLabeledTextField(org.apache.jorphan.gui.JLabeledTextField) BorderLayout(java.awt.BorderLayout) Box(javax.swing.Box) JCheckBox(javax.swing.JCheckBox)

Example 93 with JCheckBox

use of javax.swing.JCheckBox 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 94 with JCheckBox

use of javax.swing.JCheckBox in project jmeter by apache.

the class SmtpPanel method initComponents.

/**
     * Main method of class, builds all gui-components for SMTP-sampler.
     */
private void initComponents() {
    // $NON-NLS-1$
    jlAddressReplyTo = new JLabel(JMeterUtils.getResString("smtp_replyto"));
    // $NON-NLS-1$
    jlAddressFrom = new JLabel(JMeterUtils.getResString("smtp_from"));
    // $NON-NLS-1$
    jlAddressTo = new JLabel(JMeterUtils.getResString("smtp_to"));
    // $NON-NLS-1$
    jlAddressToCC = new JLabel(JMeterUtils.getResString("smtp_cc"));
    // $NON-NLS-1$
    jlAddressToBCC = new JLabel(JMeterUtils.getResString("smtp_bcc"));
    // $NON-NLS-1$
    jlMailServerPort = new JLabel(JMeterUtils.getResString("smtp_server_port"));
    // $NON-NLS-1$
    jlMailServer = new JLabel(JMeterUtils.getResString("smtp_server"));
    // $NON-NLS-1$
    jlMailServerTimeout = new JLabel(JMeterUtils.getResString("smtp_server_timeout"));
    // $NON-NLS-1$
    jlMailServerConnectionTimeout = new JLabel(JMeterUtils.getResString("smtp_server_connection_timeout"));
    // $NON-NLS-1$
    jlAttachFile = new JLabel(JMeterUtils.getResString("smtp_attach_file"));
    // $NON-NLS-1$
    jlDutPortStandard = new JLabel(JMeterUtils.getResString("smtp_default_port"));
    // $NON-NLS-1$
    jlUsername = new JLabel(JMeterUtils.getResString("smtp_username"));
    // $NON-NLS-1$
    jlPassword = new JLabel(JMeterUtils.getResString("smtp_password"));
    // $NON-NLS-1$
    jlSubject = new JLabel(JMeterUtils.getResString("smtp_subject"));
    // $NON-NLS-1$
    jlMessage = new JLabel(JMeterUtils.getResString("smtp_message"));
    tfMailServer = new JTextField(30);
    tfMailServerPort = new JTextField(6);
    tfMailServerTimeout = new JTextField(6);
    tfMailServerConnectionTimeout = new JTextField(6);
    tfMailFrom = new JTextField(25);
    tfMailReplyTo = new JTextField(25);
    tfMailTo = new JTextField(25);
    tfMailToCC = new JTextField(25);
    tfMailToBCC = new JTextField(25);
    tfAuthUsername = new JTextField(20);
    tfAuthPassword = new JPasswordField(20);
    tfSubject = new JTextField(20);
    tfAttachment = new JTextField(30);
    tfEmlMessage = new JTextField(30);
    taMessage = new JTextArea(5, 20);
    // $NON-NLS-1$
    cbPlainBody = new JCheckBox(JMeterUtils.getResString("smtp_plainbody"));
    // $NON-NLS-1$
    cbSuppressSubject = new JCheckBox(JMeterUtils.getResString("smtp_suppresssubj"));
    cbSuppressSubject.addChangeListener(this::emptySubjectActionPerformed);
    // $NON-NLS-1$
    cbUseAuth = new JCheckBox(JMeterUtils.getResString("smtp_useauth"));
    // $NON-NLS-1$
    cbIncludeTimestamp = new JCheckBox(JMeterUtils.getResString("smtp_timestamp"));
    // $NON-NLS-1$
    cbMessageSizeStats = new JCheckBox(JMeterUtils.getResString("smtp_messagesize"));
    // $NON-NLS-1$
    cbEnableDebug = new JCheckBox(JMeterUtils.getResString("smtp_enabledebug"));
    // $NON-NLS-1$
    cbUseEmlMessage = new JCheckBox(JMeterUtils.getResString("smtp_eml"));
    attachmentFileChooser = new JFileChooser();
    emlFileChooser = new JFileChooser();
    // $NON-NLS-1$
    browseButton = new JButton(JMeterUtils.getResString("browse"));
    // $NON-NLS-1$
    emlBrowseButton = new JButton(JMeterUtils.getResString("browse"));
    attachmentFileChooser.addActionListener(this::attachmentFolderFileChooserActionPerformed);
    emlFileChooser.addActionListener(this::emlFileChooserActionPerformed);
    setLayout(new GridBagLayout());
    GridBagConstraints gridBagConstraintsMain = new GridBagConstraints();
    gridBagConstraintsMain.fill = GridBagConstraints.HORIZONTAL;
    gridBagConstraintsMain.anchor = GridBagConstraints.WEST;
    gridBagConstraintsMain.weightx = 0.5;
    GridBagConstraints gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
    gridBagConstraints.fill = GridBagConstraints.NONE;
    gridBagConstraints.anchor = GridBagConstraints.WEST;
    gridBagConstraints.weightx = 0.5;
    /*
         * Server Settings
         */
    JPanel panelServerSettings = new VerticalPanel();
    panelServerSettings.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), // $NON-NLS-1$
    JMeterUtils.getResString("smtp_server_settings")));
    JPanel panelMailServer = new JPanel(new BorderLayout(5, 0));
    panelMailServer.add(jlMailServer, BorderLayout.WEST);
    panelMailServer.add(tfMailServer, BorderLayout.CENTER);
    JPanel panelMailServerPort = new JPanel(new BorderLayout(5, 0));
    panelMailServerPort.add(jlMailServerPort, BorderLayout.WEST);
    panelMailServerPort.add(tfMailServerPort, BorderLayout.CENTER);
    panelMailServerPort.add(jlDutPortStandard, BorderLayout.EAST);
    panelServerSettings.add(panelMailServer, BorderLayout.CENTER);
    panelServerSettings.add(panelMailServerPort, BorderLayout.SOUTH);
    JPanel panelServerTimeoutsSettings = new VerticalPanel();
    panelServerTimeoutsSettings.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), // $NON-NLS-1$
    JMeterUtils.getResString("smtp_server_timeouts_settings")));
    JPanel panelMailServerConnectionTimeout = new JPanel(new BorderLayout(5, 0));
    panelMailServerConnectionTimeout.add(jlMailServerConnectionTimeout, BorderLayout.WEST);
    panelMailServerConnectionTimeout.add(tfMailServerConnectionTimeout, BorderLayout.CENTER);
    JPanel panelMailServerTimeout = new JPanel(new BorderLayout(5, 0));
    panelMailServerTimeout.add(jlMailServerTimeout, BorderLayout.WEST);
    panelMailServerTimeout.add(tfMailServerTimeout, BorderLayout.CENTER);
    panelServerTimeoutsSettings.add(panelMailServerConnectionTimeout, BorderLayout.CENTER);
    panelServerTimeoutsSettings.add(panelMailServerTimeout, BorderLayout.SOUTH);
    JPanel panelServerConfig = new HorizontalPanel();
    panelServerConfig.add(panelServerSettings, BorderLayout.CENTER);
    panelServerConfig.add(panelServerTimeoutsSettings, BorderLayout.EAST);
    gridBagConstraintsMain.gridx = 0;
    gridBagConstraintsMain.gridy = 0;
    add(panelServerConfig, gridBagConstraintsMain);
    /*
         * E-Mail Settings
         */
    JPanel panelMailSettings = new JPanel(new GridBagLayout());
    panelMailSettings.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), // $NON-NLS-1$
    JMeterUtils.getResString("smtp_mail_settings")));
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    panelMailSettings.add(jlAddressFrom, gridBagConstraints);
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    panelMailSettings.add(tfMailFrom, gridBagConstraints);
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    panelMailSettings.add(jlAddressTo, gridBagConstraints);
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    panelMailSettings.add(tfMailTo, gridBagConstraints);
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 2;
    panelMailSettings.add(jlAddressToCC, gridBagConstraints);
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 2;
    panelMailSettings.add(tfMailToCC, gridBagConstraints);
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    panelMailSettings.add(jlAddressToBCC, gridBagConstraints);
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 3;
    panelMailSettings.add(tfMailToBCC, gridBagConstraints);
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    panelMailSettings.add(jlAddressReplyTo, gridBagConstraints);
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 4;
    panelMailSettings.add(tfMailReplyTo, gridBagConstraints);
    gridBagConstraintsMain.gridx = 0;
    gridBagConstraintsMain.gridy = 1;
    add(panelMailSettings, gridBagConstraintsMain);
    /*
         * Auth Settings
         */
    JPanel panelAuthSettings = new JPanel(new GridBagLayout());
    panelAuthSettings.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), // $NON-NLS-1$
    JMeterUtils.getResString("smtp_auth_settings")));
    cbUseAuth.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
    cbUseAuth.setMargin(new java.awt.Insets(0, 0, 0, 0));
    cbUseAuth.addActionListener(this::cbUseAuthActionPerformed);
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    panelAuthSettings.add(cbUseAuth, gridBagConstraints);
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridwidth = 1;
    gridBagConstraints.weightx = 0;
    panelAuthSettings.add(jlUsername, gridBagConstraints);
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.weightx = 0.5;
    panelAuthSettings.add(tfAuthUsername, gridBagConstraints);
    tfAuthUsername.setEditable(false);
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = 1;
    gridBagConstraints.weightx = 0;
    panelAuthSettings.add(jlPassword, gridBagConstraints);
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.weightx = 0.5;
    panelAuthSettings.add(tfAuthPassword, gridBagConstraints);
    tfAuthPassword.setEditable(false);
    gridBagConstraintsMain.gridx = 0;
    gridBagConstraintsMain.gridy = 2;
    add(panelAuthSettings, gridBagConstraintsMain);
    /*
         * Security Settings
         */
    securitySettingsPanel = new SecuritySettingsPanel();
    gridBagConstraintsMain.gridx = 0;
    gridBagConstraintsMain.gridy = 3;
    add(securitySettingsPanel, gridBagConstraintsMain);
    /*
         * (non-Javadoc) Message Settings
         */
    JPanel panelMessageSettings = new JPanel(new GridBagLayout());
    panelMessageSettings.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), // $NON-NLS-1$
    JMeterUtils.getResString("smtp_message_settings")));
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    panelMessageSettings.add(jlSubject, gridBagConstraints);
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
    panelMessageSettings.add(tfSubject, gridBagConstraints);
    cbSuppressSubject.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
    cbSuppressSubject.setMargin(new java.awt.Insets(0, 0, 0, 0));
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.fill = GridBagConstraints.NONE;
    panelMessageSettings.add(cbSuppressSubject, gridBagConstraints);
    cbIncludeTimestamp.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
    cbIncludeTimestamp.setMargin(new java.awt.Insets(0, 0, 0, 0));
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.fill = GridBagConstraints.NONE;
    panelMessageSettings.add(cbIncludeTimestamp, gridBagConstraints);
    /*
         * Add the header panel
         */
    // $NON-NLS-1$
    addHeaderFieldButton = new JButton(JMeterUtils.getResString("smtp_header_add"));
    addHeaderFieldButton.addActionListener(this::addHeaderActionPerformed);
    // $NON-NLS-1$
    headerFieldName = new JLabel(JMeterUtils.getResString("smtp_header_name"));
    // $NON-NLS-1$
    headerFieldValue = new JLabel(JMeterUtils.getResString("smtp_header_value"));
    headerFieldsPanel = new JPanel(new GridBagLayout());
    headerFieldName.setVisible(false);
    headerFieldValue.setVisible(false);
    headerGridY = 0;
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = headerGridY++;
    headerFieldsPanel.add(addHeaderFieldButton, gridBagConstraints);
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = headerGridY;
    headerFieldsPanel.add(headerFieldName, gridBagConstraints);
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = headerGridY++;
    headerFieldsPanel.add(headerFieldValue, gridBagConstraints);
    gridBagConstraintsMain.gridx = 1;
    gridBagConstraintsMain.gridy = 2;
    panelMessageSettings.add(headerFieldsPanel, gridBagConstraintsMain);
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 3;
    panelMessageSettings.add(jlMessage, gridBagConstraints);
    taMessage.setBorder(BorderFactory.createBevelBorder(1));
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = GridBagConstraints.BOTH;
    panelMessageSettings.add(taMessage, gridBagConstraints);
    cbPlainBody.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
    cbPlainBody.setMargin(new java.awt.Insets(0, 0, 0, 0));
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 3;
    gridBagConstraints.fill = GridBagConstraints.NONE;
    panelMessageSettings.add(cbPlainBody, gridBagConstraints);
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = GridBagConstraints.NONE;
    panelMessageSettings.add(jlAttachFile, gridBagConstraints);
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
    panelMessageSettings.add(tfAttachment, gridBagConstraints);
    // $NON-NLS-1$
    tfAttachment.setToolTipText(JMeterUtils.getResString("smtp_attach_file_tooltip"));
    browseButton.addActionListener(this::browseButtonActionPerformed);
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 4;
    gridBagConstraints.fill = GridBagConstraints.NONE;
    panelMessageSettings.add(browseButton, gridBagConstraints);
    cbUseEmlMessage.setSelected(false);
    cbUseEmlMessage.addActionListener(this::cbUseEmlMessageActionPerformed);
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.fill = GridBagConstraints.NONE;
    panelMessageSettings.add(cbUseEmlMessage, gridBagConstraints);
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
    tfEmlMessage.setEnabled(false);
    panelMessageSettings.add(tfEmlMessage, gridBagConstraints);
    emlBrowseButton.addActionListener(this::emlBrowseButtonActionPerformed);
    emlBrowseButton.setEnabled(false);
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 5;
    gridBagConstraints.fill = GridBagConstraints.NONE;
    panelMessageSettings.add(emlBrowseButton, gridBagConstraints);
    gridBagConstraintsMain.gridx = 0;
    gridBagConstraintsMain.gridy = 6;
    add(panelMessageSettings, gridBagConstraintsMain);
    /*
         * Additional Settings
         */
    JPanel panelAdditionalSettings = new JPanel(new GridBagLayout());
    panelAdditionalSettings.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), // $NON-NLS-1$
    JMeterUtils.getResString("smtp_additional_settings")));
    cbMessageSizeStats.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
    cbMessageSizeStats.setMargin(new java.awt.Insets(0, 0, 0, 0));
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    panelAdditionalSettings.add(cbMessageSizeStats, gridBagConstraints);
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 0;
    panelAdditionalSettings.add(cbEnableDebug, gridBagConstraints);
    gridBagConstraintsMain.gridx = 0;
    gridBagConstraintsMain.gridy = 7;
    add(panelAdditionalSettings, gridBagConstraintsMain);
}
Also used : JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) JTextArea(javax.swing.JTextArea) GridBagLayout(java.awt.GridBagLayout) JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) JTextField(javax.swing.JTextField) JCheckBox(javax.swing.JCheckBox) VerticalPanel(org.apache.jmeter.gui.util.VerticalPanel) JFileChooser(javax.swing.JFileChooser) BorderLayout(java.awt.BorderLayout) JPasswordField(javax.swing.JPasswordField) HorizontalPanel(org.apache.jmeter.gui.util.HorizontalPanel)

Example 95 with JCheckBox

use of javax.swing.JCheckBox in project jmeter by apache.

the class HttpTestSampleGui 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 column 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;
}
Also used : JCheckBox(javax.swing.JCheckBox) JPanel(javax.swing.JPanel) JLabeledTextField(org.apache.jorphan.gui.JLabeledTextField) HorizontalPanel(org.apache.jmeter.gui.util.HorizontalPanel) Dimension(java.awt.Dimension) JTextField(javax.swing.JTextField)

Aggregations

JCheckBox (javax.swing.JCheckBox)491 JPanel (javax.swing.JPanel)199 JLabel (javax.swing.JLabel)155 JButton (javax.swing.JButton)108 ActionEvent (java.awt.event.ActionEvent)98 ActionListener (java.awt.event.ActionListener)93 JTextField (javax.swing.JTextField)88 GridBagConstraints (java.awt.GridBagConstraints)82 GridBagLayout (java.awt.GridBagLayout)77 Insets (java.awt.Insets)66 BorderLayout (java.awt.BorderLayout)63 Dimension (java.awt.Dimension)59 BoxLayout (javax.swing.BoxLayout)56 JScrollPane (javax.swing.JScrollPane)38 ItemEvent (java.awt.event.ItemEvent)37 ItemListener (java.awt.event.ItemListener)34 FlowLayout (java.awt.FlowLayout)33 JComboBox (javax.swing.JComboBox)33 JRadioButton (javax.swing.JRadioButton)32 Box (javax.swing.Box)30