Search in sources :

Example 51 with VerticalPanel

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

the class ViewResultsFullVisualizer method createLeftPanel.

private synchronized Component createLeftPanel() {
    SampleResult rootSampleResult = new SampleResult();
    rootSampleResult.setSampleLabel("Root");
    rootSampleResult.setSuccessful(true);
    root = new SearchableTreeNode(rootSampleResult, null);
    treeModel = new DefaultTreeModel(root);
    jTree = new JTree(treeModel);
    jTree.setCellRenderer(new ResultsNodeRenderer());
    jTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
    jTree.addTreeSelectionListener(this);
    jTree.setRootVisible(false);
    jTree.setShowsRootHandles(true);
    JScrollPane treePane = new JScrollPane(jTree);
    treePane.setPreferredSize(new Dimension(200, 300));
    VerticalPanel leftPane = new VerticalPanel();
    leftPane.add(treePane, BorderLayout.CENTER);
    leftPane.add(createComboRender(), BorderLayout.NORTH);
    // $NON-NLS-1$
    autoScrollCB = new JCheckBox(JMeterUtils.getResString("view_results_autoscroll"));
    autoScrollCB.setSelected(false);
    autoScrollCB.addItemListener(this);
    leftPane.add(autoScrollCB, BorderLayout.SOUTH);
    return leftPane;
}
Also used : JScrollPane(javax.swing.JScrollPane) JCheckBox(javax.swing.JCheckBox) JTree(javax.swing.JTree) VerticalPanel(org.apache.jmeter.gui.util.VerticalPanel) SampleResult(org.apache.jmeter.samplers.SampleResult) DefaultTreeModel(javax.swing.tree.DefaultTreeModel) Dimension(java.awt.Dimension)

Example 52 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(// $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)

Example 53 with VerticalPanel

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

the class ServerPanel method init.

private void init() {
    // WARNING: called from ctor so must not be overridden (i.e. must be private or final)
    setLayout(new BorderLayout(5, 0));
    // Target server panel
    JPanel webServerPanel = new HorizontalPanel();
    webServerPanel.setBorder(BorderFactory.createTitledBorder(// $NON-NLS-1$
    JMeterUtils.getResString("target_server")));
    final JPanel domainPanel = getDomainPanel();
    final JPanel portPanel = getPortPanel();
    webServerPanel.add(domainPanel, BorderLayout.CENTER);
    webServerPanel.add(portPanel, BorderLayout.EAST);
    JPanel timeOut = new HorizontalPanel();
    timeOut.setBorder(BorderFactory.createTitledBorder(// $NON-NLS-1$
    JMeterUtils.getResString("web_server_timeout_title")));
    final JPanel connPanel = getConnectTimeOutPanel();
    final JPanel reqPanel = getResponseTimeOutPanel();
    timeOut.add(connPanel);
    timeOut.add(reqPanel);
    JPanel webServerTimeoutPanel = new VerticalPanel();
    webServerTimeoutPanel.add(webServerPanel, BorderLayout.CENTER);
    webServerTimeoutPanel.add(timeOut, BorderLayout.EAST);
    JPanel bigPanel = new VerticalPanel();
    bigPanel.add(webServerTimeoutPanel);
    add(bigPanel);
}
Also used : JPanel(javax.swing.JPanel) VerticalPanel(org.apache.jmeter.gui.util.VerticalPanel) BorderLayout(java.awt.BorderLayout) HorizontalPanel(org.apache.jmeter.gui.util.HorizontalPanel)

Example 54 with VerticalPanel

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

the class MailReaderSamplerGui method init.

/*
     * Helper method to set up the GUI screen
     */
private void init() {
    // WARNING: called from ctor so must not be overridden (i.e. must be private or final)
    setLayout(new BorderLayout());
    setBorder(makeBorder());
    JPanel settingsPanel = new JPanel(new GridBagLayout());
    GridBagConstraints gbc = getConstraints();
    serverTypeBox = new JTextField(20);
    serverTypeBox.addActionListener(this);
    serverTypeBox.addFocusListener(this);
    addField(settingsPanel, serverTypeLabel, serverTypeBox, gbc);
    serverBox = new JTextField(20);
    addField(settingsPanel, serverLabel, serverBox, gbc);
    portBox = new JTextField(20);
    addField(settingsPanel, portLabel, portBox, gbc);
    usernameBox = new JTextField(20);
    addField(settingsPanel, accountLabel, usernameBox, gbc);
    passwordBox = new JPasswordField(20);
    addField(settingsPanel, passwordLabel, passwordBox, gbc);
    folderLabel = new JLabel(folderLabelStr);
    folderBox = new JTextField(INBOX, 20);
    addField(settingsPanel, folderLabel, folderBox, gbc);
    HorizontalPanel numMessagesPanel = new HorizontalPanel();
    numMessagesPanel.add(new JLabel(numMessagesLabel));
    ButtonGroup nmbg = new ButtonGroup();
    allMessagesButton = new JRadioButton(allMessagesLabel);
    allMessagesButton.addChangeListener(e -> {
        if (allMessagesButton.isSelected()) {
            someMessagesField.setEnabled(false);
        }
    });
    someMessagesButton = new JRadioButton();
    someMessagesButton.addChangeListener(e -> {
        if (someMessagesButton.isSelected()) {
            someMessagesField.setEnabled(true);
        }
    });
    nmbg.add(allMessagesButton);
    nmbg.add(someMessagesButton);
    someMessagesField = new JTextField(5);
    allMessagesButton.setSelected(true);
    numMessagesPanel.add(allMessagesButton);
    numMessagesPanel.add(someMessagesButton);
    numMessagesPanel.add(someMessagesField);
    headerOnlyBox = new JCheckBox(headerOnlyLabel);
    deleteBox = new JCheckBox(deleteLabel);
    storeMimeMessageBox = new JCheckBox(storeMime);
    securitySettingsPanel = new SecuritySettingsPanel();
    JPanel settings = new VerticalPanel();
    settings.add(Box.createVerticalStrut(5));
    settings.add(settingsPanel);
    settings.add(numMessagesPanel);
    settings.add(headerOnlyBox);
    settings.add(deleteBox);
    settings.add(storeMimeMessageBox);
    settings.add(securitySettingsPanel);
    add(makeTitlePanel(), BorderLayout.NORTH);
    add(settings, BorderLayout.CENTER);
}
Also used : JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) JRadioButton(javax.swing.JRadioButton) GridBagLayout(java.awt.GridBagLayout) JLabel(javax.swing.JLabel) JTextField(javax.swing.JTextField) JCheckBox(javax.swing.JCheckBox) VerticalPanel(org.apache.jmeter.gui.util.VerticalPanel) BorderLayout(java.awt.BorderLayout) JPasswordField(javax.swing.JPasswordField) ButtonGroup(javax.swing.ButtonGroup) HorizontalPanel(org.apache.jmeter.gui.util.HorizontalPanel) SecuritySettingsPanel(org.apache.jmeter.protocol.smtp.sampler.gui.SecuritySettingsPanel)

Example 55 with VerticalPanel

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

the class LdapConfigGui method init.

/**
 * This will initialise all the panel in the LdapConfigGui.
 */
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);
    }
    VerticalPanel mainPanel = new VerticalPanel();
    mainPanel.add(createServernamePanel());
    mainPanel.add(createPortPanel());
    mainPanel.add(createRootdnPanel());
    mainPanel.add(createTestPanel());
    mainPanel.add(testPanel());
    add(mainPanel, BorderLayout.CENTER);
    userDefined.addItemListener(this);
    addTest.addItemListener(this);
    modifyTest.addItemListener(this);
    deleteTest.addItemListener(this);
    searchTest.addItemListener(this);
}
Also used : VerticalPanel(org.apache.jmeter.gui.util.VerticalPanel) BorderLayout(java.awt.BorderLayout)

Aggregations

VerticalPanel (org.apache.jmeter.gui.util.VerticalPanel)59 BorderLayout (java.awt.BorderLayout)33 JPanel (javax.swing.JPanel)27 JCheckBox (javax.swing.JCheckBox)14 JLabel (javax.swing.JLabel)12 HorizontalPanel (org.apache.jmeter.gui.util.HorizontalPanel)12 JTextField (javax.swing.JTextField)11 JLabeledTextField (org.apache.jorphan.gui.JLabeledTextField)7 Dimension (java.awt.Dimension)5 JButton (javax.swing.JButton)5 BoxLayout (javax.swing.BoxLayout)4 JTabbedPane (javax.swing.JTabbedPane)4 Border (javax.swing.border.Border)4 EmptyBorder (javax.swing.border.EmptyBorder)4 LoginConfigGui (org.apache.jmeter.config.gui.LoginConfigGui)4 FilePanel (org.apache.jmeter.gui.util.FilePanel)4 ArrayList (java.util.ArrayList)3 Box (javax.swing.Box)3 ButtonGroup (javax.swing.ButtonGroup)3 JComboBox (javax.swing.JComboBox)3