Search in sources :

Example 41 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(BorderFactory.createEtchedBorder(), // $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(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);
    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 42 with VerticalPanel

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

the class JavaConfigGui method createClassnamePanel.

/**
     * Create a panel with GUI components allowing the user to select a test
     * class.
     *
     * @return a panel containing the relevant components
     */
private JPanel createClassnamePanel() {
    List<String> possibleClasses = new ArrayList<>();
    try {
        // Find all the classes which implement the JavaSamplerClient
        // interface.
        possibleClasses = ClassFinder.findClassesThatExtend(JMeterUtils.getSearchPaths(), new Class[] { JavaSamplerClient.class });
        // Remove the JavaConfig class from the list since it only
        // implements the interface for error conditions.
        possibleClasses.remove(JavaSampler.class.getName() + "$ErrorSamplerClient");
    } catch (Exception e) {
        log.debug("Exception getting interfaces.", e);
    }
    classNameLabeledChoice = new JLabeledChoice(JMeterUtils.getResString("protocol_java_classname"), possibleClasses.toArray(ArrayUtils.EMPTY_STRING_ARRAY), true, false);
    classNameLabeledChoice.addChangeListener(this);
    warningLabel.setForeground(Color.RED);
    Font font = warningLabel.getFont();
    warningLabel.setFont(new Font(font.getFontName(), Font.BOLD, (int) (font.getSize() * 1.1)));
    warningLabel.setVisible(false);
    VerticalPanel panel = new VerticalPanel();
    panel.add(classNameLabeledChoice);
    panel.add(warningLabel);
    return panel;
}
Also used : VerticalPanel(org.apache.jmeter.gui.util.VerticalPanel) JLabeledChoice(org.apache.jorphan.gui.JLabeledChoice) ArrayList(java.util.ArrayList) JavaSamplerClient(org.apache.jmeter.protocol.java.sampler.JavaSamplerClient) Font(java.awt.Font)

Example 43 with VerticalPanel

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

the class JMSSubscriberGui method init.

/**
     * init() adds jndiICF to the mainPanel. The class reuses logic from
     * SOAPSampler, since it is common.
     */
private void init() {
    // WARNING: called from ctor so must not be overridden (i.e. must be private or final)
    setLayout(new BorderLayout());
    setBorder(makeBorder());
    add(makeTitlePanel(), BorderLayout.NORTH);
    JPanel mainPanel = new VerticalPanel();
    add(mainPanel, BorderLayout.CENTER);
    jndiICF.setToolTipText(Context.INITIAL_CONTEXT_FACTORY);
    urlField.setToolTipText(Context.PROVIDER_URL);
    jmsUser.setToolTipText(Context.SECURITY_PRINCIPAL);
    jmsPwd.setToolTipText(Context.SECURITY_CREDENTIALS);
    mainPanel.add(useProperties);
    mainPanel.add(jndiICF);
    mainPanel.add(urlField);
    mainPanel.add(jndiConnFac);
    mainPanel.add(createDestinationPane());
    mainPanel.add(jmsDurableSubscriptionId);
    mainPanel.add(jmsClientId);
    mainPanel.add(jmsSelector);
    mainPanel.add(useAuth);
    mainPanel.add(jmsUser);
    mainPanel.add(jmsPwd);
    mainPanel.add(samplesToAggregate);
    mainPanel.add(storeResponse);
    mainPanel.add(timeout);
    JPanel choice = new HorizontalPanel();
    choice.add(clientChoice);
    choice.add(stopBetweenSamples);
    mainPanel.add(choice);
    mainPanel.add(separator);
    mainPanel.add(jmsErrorReconnectOnCodes);
    mainPanel.add(jmsErrorPauseBetween);
    useProperties.addChangeListener(this);
    useAuth.addChangeListener(this);
}
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 44 with VerticalPanel

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

the class FunctionHelper method init.

private void init() {
    // WARNING: called from ctor so must not be overridden (i.e. must be private or final)
    //$NON-NLS-1$
    parameterPanel = new ArgumentsPanel(JMeterUtils.getResString("function_params"), false);
    initializeFunctionList();
    this.getContentPane().setLayout(new BorderLayout(10, 10));
    JPanel comboPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
    comboPanel.add(functionList);
    //$NON-NLS-1$
    JButton helpButton = new JButton(JMeterUtils.getResString("help"));
    helpButton.addActionListener(new HelpListener());
    comboPanel.add(helpButton);
    this.getContentPane().add(comboPanel, BorderLayout.NORTH);
    this.getContentPane().add(parameterPanel, BorderLayout.CENTER);
    JPanel resultsPanel = new VerticalPanel();
    JPanel generatePanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
    JPanel displayPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
    //$NON-NLS-1$
    cutPasteFunction = new JLabeledTextField(JMeterUtils.getResString("cut_paste_function"), 35);
    generatePanel.add(cutPasteFunction);
    //$NON-NLS-1$
    JButton generateButton = new JButton(JMeterUtils.getResString("generate"));
    generateButton.addActionListener(this);
    generatePanel.add(generateButton);
    resultTextArea = JSyntaxTextArea.getInstance(5, 50);
    resultTextArea.setToolTipText(JMeterUtils.getResString("function_helper_dialog_result_warn"));
    displayPanel.add(new JLabel(JMeterUtils.getResString("result_function")));
    displayPanel.add(JTextScrollPane.getInstance(resultTextArea));
    resultsPanel.add(generatePanel);
    resultsPanel.add(displayPanel);
    this.getContentPane().add(resultsPanel, BorderLayout.SOUTH);
    this.pack();
    ComponentUtil.centerComponentInWindow(this);
}
Also used : JPanel(javax.swing.JPanel) JLabeledTextField(org.apache.jorphan.gui.JLabeledTextField) VerticalPanel(org.apache.jmeter.gui.util.VerticalPanel) FlowLayout(java.awt.FlowLayout) BorderLayout(java.awt.BorderLayout) JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) ArgumentsPanel(org.apache.jmeter.config.gui.ArgumentsPanel)

Example 45 with VerticalPanel

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

the class SystemSamplerGui method makeCommandPanel.

/**
     * @return JPanel Command + directory
     */
private JPanel makeCommandPanel() {
    JPanel cmdPanel = new JPanel();
    cmdPanel.setLayout(new BoxLayout(cmdPanel, BoxLayout.X_AXIS));
    JPanel cmdWkDirPane = new JPanel(new BorderLayout());
    // $NON-NLS-1$
    command = new JLabeledTextField(JMeterUtils.getResString("command_field_title"));
    cmdWkDirPane.add(command, BorderLayout.CENTER);
    // $NON-NLS-1$
    directory = new JLabeledTextField(JMeterUtils.getResString("directory_field_title"));
    cmdWkDirPane.add(directory, BorderLayout.EAST);
    cmdPanel.add(cmdWkDirPane);
    JPanel panel = new VerticalPanel();
    panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), // $NON-NLS-1$
    JMeterUtils.getResString("command_config_box_title")));
    panel.add(cmdPanel, BorderLayout.NORTH);
    panel.add(makeArgumentsPanel(), BorderLayout.CENTER);
    panel.add(makeEnvironmentPanel(), BorderLayout.SOUTH);
    return panel;
}
Also used : JPanel(javax.swing.JPanel) JLabeledTextField(org.apache.jorphan.gui.JLabeledTextField) VerticalPanel(org.apache.jmeter.gui.util.VerticalPanel) BorderLayout(java.awt.BorderLayout) BoxLayout(javax.swing.BoxLayout)

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