Search in sources :

Example 1 with JLabeledTextField

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

the class UrlConfigGui method getWebServerPanel.

/**
     * Create a panel containing the webserver (domain+port) and scheme.
     *
     * @return the panel
     */
protected final JPanel getWebServerPanel() {
    // PROTOCOL
    // $NON-NLS-1$
    protocol = new JLabeledTextField(JMeterUtils.getResString("protocol"), 4);
    // $NON-NLS-1$
    port = new JLabeledTextField(JMeterUtils.getResString("web_server_port"), 7);
    // $NON-NLS-1$
    domain = new JLabeledTextField(JMeterUtils.getResString("web_server_domain"), 40);
    JPanel webServerPanel = new HorizontalPanel();
    webServerPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), // $NON-NLS-1$
    JMeterUtils.getResString("web_server")));
    webServerPanel.add(protocol);
    webServerPanel.add(domain);
    webServerPanel.add(port);
    return webServerPanel;
}
Also used : JLabeledTextField(org.apache.jorphan.gui.JLabeledTextField) JPanel(javax.swing.JPanel) HorizontalPanel(org.apache.jmeter.gui.util.HorizontalPanel)

Example 2 with JLabeledTextField

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

the class SearchTreeDialog method init.

private void init() {
    // WARNING: called from ctor so must not be overridden (i.e. must be private or final)
    this.getContentPane().setLayout(new BorderLayout(10, 10));
    //$NON-NLS-1$
    searchTF = new JLabeledTextField(JMeterUtils.getResString("search_text_field"), 20);
    if (!StringUtils.isEmpty(lastSearch)) {
        searchTF.setText(lastSearch);
    }
    //$NON-NLS-1$
    replaceTF = new JLabeledTextField(JMeterUtils.getResString("search_text_replace"), 20);
    statusLabel = new JLabel(" ");
    statusLabel.setPreferredSize(new Dimension(100, 20));
    statusLabel.setMinimumSize(new Dimension(100, 20));
    //$NON-NLS-1$
    isRegexpCB = new JCheckBox(JMeterUtils.getResString("search_text_chkbox_regexp"), false);
    //$NON-NLS-1$
    isCaseSensitiveCB = new JCheckBox(JMeterUtils.getResString("search_text_chkbox_case"), true);
    isRegexpCB.setFont(FONT_SMALL);
    isCaseSensitiveCB.setFont(FONT_SMALL);
    JPanel searchCriterionPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
    searchCriterionPanel.add(isCaseSensitiveCB);
    searchCriterionPanel.add(isRegexpCB);
    JPanel searchPanel = new JPanel();
    searchPanel.setLayout(new BoxLayout(searchPanel, BoxLayout.Y_AXIS));
    searchPanel.setBorder(BorderFactory.createEmptyBorder(7, 3, 3, 3));
    searchPanel.add(searchTF);
    searchPanel.add(replaceTF);
    searchPanel.add(statusLabel);
    JPanel buttonsPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
    //$NON-NLS-1$
    searchButton = new JButton(JMeterUtils.getResString("search"));
    searchButton.addActionListener(this);
    //$NON-NLS-1$
    searchAndExpandButton = new JButton(JMeterUtils.getResString("search_expand"));
    searchAndExpandButton.addActionListener(this);
    //$NON-NLS-1$
    replaceButton = new JButton(JMeterUtils.getResString("search_replace_all"));
    replaceButton.addActionListener(this);
    //$NON-NLS-1$
    cancelButton = new JButton(JMeterUtils.getResString("cancel"));
    cancelButton.addActionListener(this);
    buttonsPanel.add(searchButton);
    buttonsPanel.add(searchAndExpandButton);
    buttonsPanel.add(replaceButton);
    buttonsPanel.add(cancelButton);
    JPanel searchAndReplacePanel = new JPanel();
    searchAndReplacePanel.setLayout(new VerticalLayout());
    searchAndReplacePanel.add(searchPanel);
    searchAndReplacePanel.add(searchCriterionPanel);
    searchAndReplacePanel.add(buttonsPanel);
    this.getContentPane().add(searchAndReplacePanel);
    searchTF.requestFocusInWindow();
    this.pack();
    ComponentUtil.centerComponentInWindow(this);
}
Also used : JCheckBox(javax.swing.JCheckBox) JLabeledTextField(org.apache.jorphan.gui.JLabeledTextField) JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout) BorderLayout(java.awt.BorderLayout) BoxLayout(javax.swing.BoxLayout) JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) VerticalLayout(org.apache.jorphan.gui.layout.VerticalLayout) Dimension(java.awt.Dimension)

Example 3 with JLabeledTextField

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

the class ResultSaverGui method init.

private void init() {
    // WARNING: called from ctor so must not be overridden (i.e. must be private or final)
    setLayout(new BorderLayout());
    setBorder(makeBorder());
    Box box = Box.createVerticalBox();
    box.add(makeTitlePanel());
    box.add(createFilenamePrefixPanel());
    box.add(createVariableNamePanel());
    // $NON-NLS-1$
    errorsOnly = new JCheckBox(JMeterUtils.getResString("resultsaver_errors"));
    box.add(errorsOnly);
    // $NON-NLS-1$
    successOnly = new JCheckBox(JMeterUtils.getResString("resultsaver_success"));
    box.add(successOnly);
    // $NON-NLS-1$
    skipAutoNumber = new JCheckBox(JMeterUtils.getResString("resultsaver_skipautonumber"));
    box.add(skipAutoNumber);
    // $NON-NLS-1$
    skipSuffix = new JCheckBox(JMeterUtils.getResString("resultsaver_skipsuffix"));
    box.add(skipSuffix);
    // $NON-NLS-1$
    addTimestamp = new JCheckBox(JMeterUtils.getResString("resultsaver_addtimestamp"));
    box.add(addTimestamp);
    // $NON-NLS-1$
    numberPadLength = new JLabeledTextField(JMeterUtils.getResString("resultsaver_numberpadlen"));
    box.add(numberPadLength);
    add(box, BorderLayout.NORTH);
}
Also used : JCheckBox(javax.swing.JCheckBox) JLabeledTextField(org.apache.jorphan.gui.JLabeledTextField) BorderLayout(java.awt.BorderLayout) Box(javax.swing.Box) JCheckBox(javax.swing.JCheckBox)

Example 4 with JLabeledTextField

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

the class CounterConfigGui method init.

private void init() {
    // WARNING: called from ctor so must not be overridden (i.e. must be private or final)
    setBorder(makeBorder());
    setLayout(new VerticalLayout(5, VerticalLayout.BOTH));
    //$NON-NLS-1$
    startField = new JLabeledTextField(JMeterUtils.getResString("start"));
    //$NON-NLS-1$
    incrField = new JLabeledTextField(JMeterUtils.getResString("increment"));
    //$NON-NLS-1$
    endField = new JLabeledTextField(JMeterUtils.getResString("max"));
    //$NON-NLS-1$
    varNameField = new JLabeledTextField(JMeterUtils.getResString("var_name"));
    //$NON-NLS-1$
    formatField = new JLabeledTextField(JMeterUtils.getResString("format"));
    //$NON-NLS-1$
    perUserField = new JCheckBox(JMeterUtils.getResString("counter_per_user"));
    //$NON-NLS-1$
    resetCounterOnEachThreadGroupIteration = new JCheckBox(JMeterUtils.getResString("counter_reset_per_tg_iteration"));
    add(makeTitlePanel());
    add(startField);
    add(incrField);
    add(endField);
    add(formatField);
    add(varNameField);
    add(CheckBoxPanel.wrap(perUserField));
    add(CheckBoxPanel.wrap(resetCounterOnEachThreadGroupIteration));
    perUserField.addActionListener(this);
}
Also used : JCheckBox(javax.swing.JCheckBox) JLabeledTextField(org.apache.jorphan.gui.JLabeledTextField) VerticalLayout(org.apache.jorphan.gui.layout.VerticalLayout)

Example 5 with JLabeledTextField

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

the class RenderAsCssJQuery method createCssJqueryTasksPanel.

/**
     * Create the CssJquery task pane
     *
     * @return CssJquery task pane
     */
private JPanel createCssJqueryTasksPanel() {
    GridBagLayout g = new GridBagLayout();
    GridBagConstraints c = new GridBagConstraints();
    JPanel cssJqueryActionPanel = new JPanel();
    cssJqueryActionPanel.setLayout(g);
    Border margin = new EmptyBorder(5, 5, 0, 5);
    cssJqueryActionPanel.setBorder(margin);
    // $NON-NLS-1$
    cssJqueryField = new JLabeledTextField(JMeterUtils.getResString("cssjquery_tester_field"));
    c.fill = GridBagConstraints.HORIZONTAL;
    c.gridx = 0;
    c.gridy = 0;
    cssJqueryActionPanel.add(cssJqueryField, c);
    cssJqueryLabeledChoice = new JLabeledChoice(// $NON-NLS-1$
    JMeterUtils.getResString("cssjquery_impl"), getImplementations());
    c.fill = GridBagConstraints.HORIZONTAL;
    c.gridx = 1;
    c.gridy = 0;
    cssJqueryActionPanel.add(cssJqueryLabeledChoice, c);
    // $NON-NLS-1$
    attributeField = new JLabeledTextField(JMeterUtils.getResString("cssjquery_attribute"));
    c.fill = GridBagConstraints.HORIZONTAL;
    c.gridx = 0;
    c.gridy = 1;
    cssJqueryActionPanel.add(attributeField, c);
    // $NON-NLS-1$
    JButton cssJqueryTester = new JButton(JMeterUtils.getResString("cssjquery_tester_button_test"));
    cssJqueryTester.setActionCommand(CSSJQUEY_TESTER_COMMAND);
    cssJqueryTester.addActionListener(this);
    c.fill = GridBagConstraints.HORIZONTAL;
    c.gridx = 1;
    c.gridy = 1;
    cssJqueryActionPanel.add(cssJqueryTester, c);
    cssJqueryResultField = new JTextArea();
    cssJqueryResultField.setEditable(false);
    cssJqueryResultField.setLineWrap(true);
    cssJqueryResultField.setWrapStyleWord(true);
    JPanel cssJqueryTasksPanel = new JPanel(new BorderLayout(0, 5));
    cssJqueryTasksPanel.add(cssJqueryActionPanel, BorderLayout.NORTH);
    cssJqueryTasksPanel.add(GuiUtils.makeScrollPane(cssJqueryResultField), BorderLayout.CENTER);
    return cssJqueryTasksPanel;
}
Also used : JPanel(javax.swing.JPanel) JLabeledTextField(org.apache.jorphan.gui.JLabeledTextField) GridBagConstraints(java.awt.GridBagConstraints) JTextArea(javax.swing.JTextArea) GridBagLayout(java.awt.GridBagLayout) JLabeledChoice(org.apache.jorphan.gui.JLabeledChoice) BorderLayout(java.awt.BorderLayout) JButton(javax.swing.JButton) EmptyBorder(javax.swing.border.EmptyBorder) Border(javax.swing.border.Border) EmptyBorder(javax.swing.border.EmptyBorder)

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