Search in sources :

Example 16 with JLabeledTextField

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

the class RenderAsJsonRenderer method createJSonPathExtractorTasksPanel.

/**
     * Create the JSON PATH task pane
     *
     * @return JSON PATH task pane
     */
private JPanel createJSonPathExtractorTasksPanel() {
    JPanel jsonPathActionPanel = new JPanel();
    jsonPathActionPanel.setLayout(new BoxLayout(jsonPathActionPanel, BoxLayout.X_AXIS));
    Border margin = new EmptyBorder(5, 5, 0, 5);
    jsonPathActionPanel.setBorder(margin);
    // $NON-NLS-1$
    jsonPathExpressionField = new JLabeledTextField(JMeterUtils.getResString("jsonpath_tester_field"));
    jsonPathActionPanel.add(jsonPathExpressionField, BorderLayout.WEST);
    // $NON-NLS-1$
    JButton xpathTester = new JButton(JMeterUtils.getResString("jsonpath_tester_button_test"));
    xpathTester.setActionCommand(JSONPATH_TESTER_COMMAND);
    xpathTester.addActionListener(this);
    jsonPathActionPanel.add(xpathTester, BorderLayout.EAST);
    jsonPathResultField = new JTextArea();
    jsonPathResultField.setEditable(false);
    jsonPathResultField.setLineWrap(true);
    jsonPathResultField.setWrapStyleWord(true);
    jsonPathResultField.setMinimumSize(new Dimension(100, 150));
    JPanel xpathTasksPanel = new JPanel(new BorderLayout(0, 5));
    xpathTasksPanel.add(jsonPathActionPanel, BorderLayout.NORTH);
    xpathTasksPanel.add(GuiUtils.makeScrollPane(jsonPathResultField), BorderLayout.CENTER);
    return xpathTasksPanel;
}
Also used : JPanel(javax.swing.JPanel) JLabeledTextField(org.apache.jorphan.gui.JLabeledTextField) JTextArea(javax.swing.JTextArea) BorderLayout(java.awt.BorderLayout) BoxLayout(javax.swing.BoxLayout) JButton(javax.swing.JButton) Dimension(java.awt.Dimension) EmptyBorder(javax.swing.border.EmptyBorder) Border(javax.swing.border.Border) EmptyBorder(javax.swing.border.EmptyBorder)

Example 17 with JLabeledTextField

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

the class RenderAsRegexp method createRegexpTasksPanel.

/**
     * Create the Regexp task pane
     *
     * @return Regexp task pane
     */
private JPanel createRegexpTasksPanel() {
    JPanel regexpActionPanel = new JPanel();
    regexpActionPanel.setLayout(new BoxLayout(regexpActionPanel, BoxLayout.X_AXIS));
    Border margin = new EmptyBorder(5, 5, 0, 5);
    regexpActionPanel.setBorder(margin);
    // $NON-NLS-1$
    regexpField = new JLabeledTextField(JMeterUtils.getResString("regexp_tester_field"));
    regexpActionPanel.add(regexpField, BorderLayout.WEST);
    // $NON-NLS-1$
    JButton regexpTester = new JButton(JMeterUtils.getResString("regexp_tester_button_test"));
    regexpTester.setActionCommand(REGEXP_TESTER_COMMAND);
    regexpTester.addActionListener(this);
    regexpActionPanel.add(regexpTester, BorderLayout.EAST);
    regexpResultField = new JTextArea();
    regexpResultField.setEditable(false);
    regexpResultField.setLineWrap(true);
    regexpResultField.setWrapStyleWord(true);
    JPanel regexpTasksPanel = new JPanel(new BorderLayout(0, 5));
    regexpTasksPanel.add(regexpActionPanel, BorderLayout.NORTH);
    regexpTasksPanel.add(GuiUtils.makeScrollPane(regexpResultField), BorderLayout.CENTER);
    return regexpTasksPanel;
}
Also used : JPanel(javax.swing.JPanel) JLabeledTextField(org.apache.jorphan.gui.JLabeledTextField) JTextArea(javax.swing.JTextArea) BorderLayout(java.awt.BorderLayout) BoxLayout(javax.swing.BoxLayout) JButton(javax.swing.JButton) EmptyBorder(javax.swing.border.EmptyBorder) Border(javax.swing.border.Border) EmptyBorder(javax.swing.border.EmptyBorder)

Example 18 with JLabeledTextField

use of org.apache.jorphan.gui.JLabeledTextField 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 19 with JLabeledTextField

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

the class SystemSamplerGui method makeTimeoutPanel.

/**
     * @return JPanel timeout config
     */
private JPanel makeTimeoutPanel() {
    JPanel panel = new JPanel();
    panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
    panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), // $NON-NLS-1$
    JMeterUtils.getResString("timeout_config_box_title")));
    // $NON-NLS-1$
    timeout = new JLabeledTextField(JMeterUtils.getResString("timeout_title"));
    timeout.setSize(timeout.getSize().height, 30);
    panel.add(timeout);
    return panel;
}
Also used : JPanel(javax.swing.JPanel) JLabeledTextField(org.apache.jorphan.gui.JLabeledTextField) BoxLayout(javax.swing.BoxLayout)

Example 20 with JLabeledTextField

use of org.apache.jorphan.gui.JLabeledTextField 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

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