Search in sources :

Example 11 with JLabeledTextField

use of org.apache.jorphan.gui.JLabeledTextField in project jmeter by apache.

the class RegExUserParametersGui method makeParameterPanel.

private JPanel makeParameterPanel() {
    //$NON-NLS-1$
    refRegExRefNameField = new JLabeledTextField(JMeterUtils.getResString("regex_params_ref_name_field"));
    //$NON-NLS-1$
    paramNamesGrNrField = new JLabeledTextField(JMeterUtils.getResString("regex_params_names_field"));
    //$NON-NLS-1$
    paramValuesGrNrField = new JLabeledTextField(JMeterUtils.getResString("regex_params_values_field"));
    JPanel panel = new JPanel(new GridBagLayout());
    GridBagConstraints gbc = new GridBagConstraints();
    initConstraints(gbc);
    addField(panel, refRegExRefNameField, gbc);
    resetContraints(gbc);
    addField(panel, paramNamesGrNrField, gbc);
    resetContraints(gbc);
    gbc.weighty = 1;
    addField(panel, paramValuesGrNrField, gbc);
    return panel;
}
Also used : JLabeledTextField(org.apache.jorphan.gui.JLabeledTextField) JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) GridBagLayout(java.awt.GridBagLayout)

Example 12 with JLabeledTextField

use of org.apache.jorphan.gui.JLabeledTextField in project jmeter by apache.

the class URLRewritingModifierGui 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());
    add(makeTitlePanel(), BorderLayout.NORTH);
    VerticalPanel mainPanel = new VerticalPanel();
    // $NON-NLS-1$
    argumentName = new JLabeledTextField(JMeterUtils.getResString("session_argument_name"), 10);
    mainPanel.add(argumentName);
    // $NON-NLS-1$
    pathExt = new JCheckBox(JMeterUtils.getResString("path_extension_choice"));
    mainPanel.add(pathExt);
    // $NON-NLS-1$
    pathExtNoEquals = new JCheckBox(JMeterUtils.getResString("path_extension_dont_use_equals"));
    mainPanel.add(pathExtNoEquals);
    // $NON-NLS-1$
    pathExtNoQuestionmark = new JCheckBox(JMeterUtils.getResString("path_extension_dont_use_questionmark"));
    mainPanel.add(pathExtNoQuestionmark);
    // $NON-NLS-1$
    shouldCache = new JCheckBox(JMeterUtils.getResString("cache_session_id"));
    shouldCache.setSelected(true);
    mainPanel.add(shouldCache);
    // $NON-NLS-1$
    encode = new JCheckBox(JMeterUtils.getResString("encode"));
    encode.setSelected(false);
    mainPanel.add(encode);
    add(mainPanel, BorderLayout.CENTER);
}
Also used : JCheckBox(javax.swing.JCheckBox) JLabeledTextField(org.apache.jorphan.gui.JLabeledTextField) VerticalPanel(org.apache.jmeter.gui.util.VerticalPanel) BorderLayout(java.awt.BorderLayout)

Example 13 with JLabeledTextField

use of org.apache.jorphan.gui.JLabeledTextField in project jmeter by apache.

the class HtmlExtractorGui method makeParameterPanel.

private JPanel makeParameterPanel() {
    //$NON-NLS-1$
    expressionField = new JLabeledTextField(JMeterUtils.getResString("expression_field"));
    //$NON-NLS-1$
    attributeField = new JLabeledTextField(JMeterUtils.getResString("attribute_field"));
    //$NON-NLS-1$
    refNameField = new JLabeledTextField(JMeterUtils.getResString("ref_name_field"));
    //$NON-NLS-1$
    matchNumberField = new JLabeledTextField(JMeterUtils.getResString("match_num_field"));
    JPanel panel = new JPanel(new GridBagLayout());
    GridBagConstraints gbc = new GridBagConstraints();
    initConstraints(gbc);
    addField(panel, refNameField, gbc);
    resetContraints(gbc);
    addField(panel, expressionField, gbc);
    resetContraints(gbc);
    addField(panel, attributeField, gbc);
    resetContraints(gbc);
    addField(panel, matchNumberField, gbc);
    resetContraints(gbc);
    gbc.weighty = 1;
    //$NON-NLS-1$
    defaultField = new JLabeledTextField(JMeterUtils.getResString("default_value_field"));
    List<JComponent> item = defaultField.getComponentList();
    panel.add(item.get(0), gbc.clone());
    JPanel p = new JPanel(new BorderLayout());
    p.add(item.get(1), BorderLayout.WEST);
    emptyDefaultValue = new JCheckBox(JMeterUtils.getResString("cssjquery_empty_default_value"));
    emptyDefaultValue.addItemListener(evt -> {
        if (emptyDefaultValue.isSelected()) {
            defaultField.setText("");
        }
        defaultField.setEnabled(!emptyDefaultValue.isSelected());
    });
    p.add(emptyDefaultValue, BorderLayout.CENTER);
    gbc.gridx++;
    gbc.weightx = 1;
    gbc.fill = GridBagConstraints.HORIZONTAL;
    panel.add(p, gbc.clone());
    return panel;
}
Also used : JCheckBox(javax.swing.JCheckBox) JLabeledTextField(org.apache.jorphan.gui.JLabeledTextField) JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) GridBagLayout(java.awt.GridBagLayout) BorderLayout(java.awt.BorderLayout) JComponent(javax.swing.JComponent)

Example 14 with JLabeledTextField

use of org.apache.jorphan.gui.JLabeledTextField in project jmeter by apache.

the class RegexExtractorGui method makeParameterPanel.

private JPanel makeParameterPanel() {
    //$NON-NLS-1$
    regexField = new JLabeledTextField(JMeterUtils.getResString("regex_field"));
    //$NON-NLS-1$
    templateField = new JLabeledTextField(JMeterUtils.getResString("template_field"));
    //$NON-NLS-1$
    refNameField = new JLabeledTextField(JMeterUtils.getResString("ref_name_field"));
    //$NON-NLS-1$
    matchNumberField = new JLabeledTextField(JMeterUtils.getResString("match_num_field"));
    JPanel panel = new JPanel(new GridBagLayout());
    GridBagConstraints gbc = new GridBagConstraints();
    initConstraints(gbc);
    addField(panel, refNameField, gbc);
    resetContraints(gbc);
    addField(panel, regexField, gbc);
    resetContraints(gbc);
    addField(panel, templateField, gbc);
    resetContraints(gbc);
    addField(panel, matchNumberField, gbc);
    resetContraints(gbc);
    gbc.weighty = 1;
    //$NON-NLS-1$
    defaultField = new JLabeledTextField(JMeterUtils.getResString("default_value_field"));
    List<JComponent> item = defaultField.getComponentList();
    panel.add(item.get(0), gbc.clone());
    JPanel p = new JPanel(new BorderLayout());
    p.add(item.get(1), BorderLayout.WEST);
    //$NON-NLS-1$
    emptyDefaultValue = new JCheckBox(JMeterUtils.getResString("assertion_regex_empty_default_value"));
    emptyDefaultValue.addItemListener(evt -> {
        if (emptyDefaultValue.isSelected()) {
            defaultField.setText("");
        }
        defaultField.setEnabled(!emptyDefaultValue.isSelected());
    });
    p.add(emptyDefaultValue, BorderLayout.CENTER);
    gbc.gridx++;
    gbc.weightx = 1;
    gbc.fill = GridBagConstraints.HORIZONTAL;
    panel.add(p, gbc.clone());
    return panel;
}
Also used : JCheckBox(javax.swing.JCheckBox) JLabeledTextField(org.apache.jorphan.gui.JLabeledTextField) JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) GridBagLayout(java.awt.GridBagLayout) BorderLayout(java.awt.BorderLayout) JComponent(javax.swing.JComponent)

Example 15 with JLabeledTextField

use of org.apache.jorphan.gui.JLabeledTextField in project jmeter by apache.

the class JSONPostProcessorGui method makeParameterPanel.

private JPanel makeParameterPanel() {
    //$NON-NLS-1$
    refNamesField = new JLabeledTextField(JMeterUtils.getResString("jsonpp_variable_names"));
    //$NON-NLS-1$
    jsonPathExpressionsField = new JLabeledTextField(JMeterUtils.getResString("jsonpp_json_path_expressions"));
    //$NON-NLS-1$
    matchNumbersField = new JLabeledTextField(JMeterUtils.getResString("jsonpp_match_numbers"));
    //$NON-NLS-1$
    defaultValuesField = new JLabeledTextField(JMeterUtils.getResString("jsonpp_default_values"));
    //$NON-NLS-1$
    computeConcatenationField = new JCheckBox();
    JPanel panel = new JPanel(new GridBagLayout());
    GridBagConstraints gbc = new GridBagConstraints();
    initConstraints(gbc);
    addField(panel, refNamesField, gbc);
    nextLine(gbc);
    addField(panel, jsonPathExpressionsField, gbc);
    nextLine(gbc);
    addField(panel, matchNumbersField, gbc);
    nextLine(gbc);
    addField(panel, new JLabel(JMeterUtils.getResString("jsonpp_compute_concat")), computeConcatenationField, gbc);
    nextLine(gbc);
    gbc.weighty = 1;
    addField(panel, defaultValuesField, gbc);
    return panel;
}
Also used : JCheckBox(javax.swing.JCheckBox) JLabeledTextField(org.apache.jorphan.gui.JLabeledTextField) JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) GridBagLayout(java.awt.GridBagLayout) JLabel(javax.swing.JLabel)

Aggregations

JLabeledTextField (org.apache.jorphan.gui.JLabeledTextField)22 JPanel (javax.swing.JPanel)18 BorderLayout (java.awt.BorderLayout)12 JCheckBox (javax.swing.JCheckBox)12 BoxLayout (javax.swing.BoxLayout)7 Dimension (java.awt.Dimension)6 GridBagConstraints (java.awt.GridBagConstraints)6 GridBagLayout (java.awt.GridBagLayout)6 JButton (javax.swing.JButton)6 HorizontalPanel (org.apache.jmeter.gui.util.HorizontalPanel)6 JLabel (javax.swing.JLabel)4 JTextArea (javax.swing.JTextArea)4 Border (javax.swing.border.Border)4 EmptyBorder (javax.swing.border.EmptyBorder)4 VerticalPanel (org.apache.jmeter.gui.util.VerticalPanel)4 FlowLayout (java.awt.FlowLayout)3 JTextField (javax.swing.JTextField)3 Box (javax.swing.Box)2 JComponent (javax.swing.JComponent)2 VerticalLayout (org.apache.jorphan.gui.layout.VerticalLayout)2