Search in sources :

Example 26 with VerticalPanel

use of org.apache.jmeter.gui.util.VerticalPanel 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 27 with VerticalPanel

use of org.apache.jmeter.gui.util.VerticalPanel 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);
}
Also used : JPanel(javax.swing.JPanel) VerticalPanel(org.apache.jmeter.gui.util.VerticalPanel) BorderLayout(java.awt.BorderLayout) HorizontalPanel(org.apache.jmeter.gui.util.HorizontalPanel) JLabel(javax.swing.JLabel) JTextField(javax.swing.JTextField)

Example 28 with VerticalPanel

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

the class DurationAssertionGui 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 VerticalPanel();
    mainPanel.add(createScopePanel());
    // USER_INPUT
    VerticalPanel durationPanel = new VerticalPanel();
    durationPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), getDurationAttributesTitle()));
    JPanel labelPanel = new JPanel(new BorderLayout(5, 0));
    JLabel durationLabel = // $NON-NLS-1$
    new JLabel(JMeterUtils.getResString("duration_assertion_label"));
    labelPanel.add(durationLabel, BorderLayout.WEST);
    duration = new JTextField();
    labelPanel.add(duration, BorderLayout.CENTER);
    durationLabel.setLabelFor(duration);
    durationPanel.add(labelPanel);
    mainPanel.add(durationPanel);
    add(mainPanel, BorderLayout.CENTER);
}
Also used : JPanel(javax.swing.JPanel) VerticalPanel(org.apache.jmeter.gui.util.VerticalPanel) BorderLayout(java.awt.BorderLayout) JLabel(javax.swing.JLabel) JTextField(javax.swing.JTextField)

Example 29 with VerticalPanel

use of org.apache.jmeter.gui.util.VerticalPanel 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);
}
Also used : JCheckBox(javax.swing.JCheckBox) JPanel(javax.swing.JPanel) VerticalPanel(org.apache.jmeter.gui.util.VerticalPanel) JRadioButton(javax.swing.JRadioButton) BorderLayout(java.awt.BorderLayout) ButtonGroup(javax.swing.ButtonGroup) HorizontalPanel(org.apache.jmeter.gui.util.HorizontalPanel) JLabel(javax.swing.JLabel) FilePanel(org.apache.jmeter.gui.util.FilePanel) JTextField(javax.swing.JTextField)

Example 30 with VerticalPanel

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

the class MailerVisualizer method initGui.

/**
     * Initializes the GUI. Lays out components and adds them to the container.
     */
private void initGui() {
    this.setLayout(new BorderLayout());
    // MAIN PANEL
    JPanel mainPanel = new VerticalPanel();
    Border margin = new EmptyBorder(5, 10, 5, 10);
    this.setBorder(margin);
    mainPanel.add(makeTitlePanel());
    JPanel attributePane = new VerticalPanel();
    attributePane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), // $NON-NLS-1$
    JMeterUtils.getResString("mailer_title_settings")));
    // Settings panes
    attributePane.add(createMailingSettings());
    attributePane.add(createSmtpSettings());
    // Test mail button
    JPanel testerPanel = new JPanel(new BorderLayout());
    // $NON-NLS-1$
    testerButton = new JButton(JMeterUtils.getResString("mailer_test_mail"));
    testerButton.addActionListener(this);
    testerButton.setEnabled(true);
    testerPanel.add(testerButton, BorderLayout.EAST);
    attributePane.add(testerPanel);
    mainPanel.add(attributePane);
    mainPanel.add(Box.createRigidArea(new Dimension(0, 5)));
    // Failures count
    JPanel mailerPanel = new JPanel(new BorderLayout());
    // $NON-NLS-1$
    mailerPanel.add(new JLabel(JMeterUtils.getResString("mailer_failures")), BorderLayout.WEST);
    failureField = new JTextField(6);
    failureField.setEditable(false);
    mailerPanel.add(failureField, BorderLayout.CENTER);
    mainPanel.add(mailerPanel);
    this.add(mainPanel, BorderLayout.CENTER);
}
Also used : JPanel(javax.swing.JPanel) VerticalPanel(org.apache.jmeter.gui.util.VerticalPanel) BorderLayout(java.awt.BorderLayout) JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) Dimension(java.awt.Dimension) EmptyBorder(javax.swing.border.EmptyBorder) JTextField(javax.swing.JTextField) Border(javax.swing.border.Border) EmptyBorder(javax.swing.border.EmptyBorder)

Aggregations

VerticalPanel (org.apache.jmeter.gui.util.VerticalPanel)46 BorderLayout (java.awt.BorderLayout)30 JPanel (javax.swing.JPanel)23 JCheckBox (javax.swing.JCheckBox)13 JLabel (javax.swing.JLabel)12 HorizontalPanel (org.apache.jmeter.gui.util.HorizontalPanel)11 JTextField (javax.swing.JTextField)9 Dimension (java.awt.Dimension)5 JTabbedPane (javax.swing.JTabbedPane)5 JLabeledTextField (org.apache.jorphan.gui.JLabeledTextField)5 BoxLayout (javax.swing.BoxLayout)4 JButton (javax.swing.JButton)4 Border (javax.swing.border.Border)3 EmptyBorder (javax.swing.border.EmptyBorder)3 LoginConfigGui (org.apache.jmeter.config.gui.LoginConfigGui)3 FlowLayout (java.awt.FlowLayout)2 Font (java.awt.Font)2 GridBagConstraints (java.awt.GridBagConstraints)2 GridBagLayout (java.awt.GridBagLayout)2 ArrayList (java.util.ArrayList)2