Search in sources :

Example 1 with ArgumentsPanel

use of org.apache.jmeter.config.gui.ArgumentsPanel 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 2 with ArgumentsPanel

use of org.apache.jmeter.config.gui.ArgumentsPanel in project jmeter by apache.

the class JMSSamplerGui method createJNDIPanel.

/**
     * Creates the panel for the JNDI configuration.
     *
     * @return the JNDI Panel
     */
private JPanel createJNDIPanel() {
    JPanel jndiPanel = new JPanel(new BorderLayout());
    jndiPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), //$NON-NLS-1$
    JMeterUtils.getResString("jms_jndi_props")));
    JPanel contextPanel = new JPanel(new BorderLayout(10, 0));
    contextPanel.add(initialContextFactory);
    jndiPanel.add(contextPanel, BorderLayout.NORTH);
    JPanel providerPanel = new JPanel(new BorderLayout(10, 0));
    providerPanel.add(providerUrl);
    jndiPanel.add(providerPanel, BorderLayout.SOUTH);
    //$NON-NLS-1$
    jndiPropertiesPanel = new ArgumentsPanel(JMeterUtils.getResString("jms_jndi_props"));
    jndiPanel.add(jndiPropertiesPanel);
    return jndiPanel;
}
Also used : JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) ArgumentsPanel(org.apache.jmeter.config.gui.ArgumentsPanel)

Aggregations

BorderLayout (java.awt.BorderLayout)2 JPanel (javax.swing.JPanel)2 ArgumentsPanel (org.apache.jmeter.config.gui.ArgumentsPanel)2 FlowLayout (java.awt.FlowLayout)1 JButton (javax.swing.JButton)1 JLabel (javax.swing.JLabel)1 VerticalPanel (org.apache.jmeter.gui.util.VerticalPanel)1 JLabeledTextField (org.apache.jorphan.gui.JLabeledTextField)1