Search in sources :

Example 86 with JCheckBox

use of javax.swing.JCheckBox in project jmeter by apache.

the class ForeachControlPanel method createLoopCountPanel.

/**
     * Create a GUI panel containing the components related to the number of
     * loops which should be executed.
     *
     * @return a GUI panel containing the loop count components
     */
private JPanel createLoopCountPanel() {
    VerticalPanel loopPanel = new VerticalPanel();
    // LOOP LABEL
    // $NON-NLS-1$
    JLabel inputValLabel = new JLabel(JMeterUtils.getResString("foreach_input"));
    // $NON-NLS-1$
    JLabel startIndexLabel = new JLabel(JMeterUtils.getResString("foreach_start_index"));
    // $NON-NLS-1$
    JLabel endIndexLabel = new JLabel(JMeterUtils.getResString("foreach_end_index"));
    // $NON-NLS-1$
    JLabel returnValLabel = new JLabel(JMeterUtils.getResString("foreach_output"));
    // TEXT FIELD
    JPanel inputValSubPanel = new JPanel(new BorderLayout(5, 0));
    // $NON-NLS-1$
    inputVal = new JTextField("", 5);
    inputVal.setName(INPUTVAL);
    inputValLabel.setLabelFor(inputVal);
    inputValSubPanel.add(inputValLabel, BorderLayout.WEST);
    inputValSubPanel.add(inputVal, BorderLayout.CENTER);
    // TEXT FIELD
    JPanel startIndexSubPanel = new JPanel(new BorderLayout(5, 0));
    // $NON-NLS-1$
    startIndex = new JTextField("", 5);
    startIndex.setName(START_INDEX);
    startIndexLabel.setLabelFor(startIndex);
    startIndexSubPanel.add(startIndexLabel, BorderLayout.WEST);
    startIndexSubPanel.add(startIndex, BorderLayout.CENTER);
    // TEXT FIELD
    JPanel endIndexSubPanel = new JPanel(new BorderLayout(5, 0));
    // $NON-NLS-1$
    endIndex = new JTextField("", 5);
    endIndex.setName(END_INDEX);
    endIndexLabel.setLabelFor(endIndex);
    endIndexSubPanel.add(endIndexLabel, BorderLayout.WEST);
    endIndexSubPanel.add(endIndex, BorderLayout.CENTER);
    // TEXT FIELD
    JPanel returnValSubPanel = new JPanel(new BorderLayout(5, 0));
    // $NON-NLS-1$
    returnVal = new JTextField("", 5);
    returnVal.setName(RETURNVAL);
    returnValLabel.setLabelFor(returnVal);
    returnValSubPanel.add(returnValLabel, BorderLayout.WEST);
    returnValSubPanel.add(returnVal, BorderLayout.CENTER);
    // Checkbox
    // $NON-NLS-1$
    useSeparator = new JCheckBox(JMeterUtils.getResString("foreach_use_separator"), true);
    loopPanel.add(inputValSubPanel);
    loopPanel.add(startIndexSubPanel);
    loopPanel.add(endIndexSubPanel);
    loopPanel.add(returnValSubPanel);
    loopPanel.add(useSeparator);
    return loopPanel;
}
Also used : JCheckBox(javax.swing.JCheckBox) JPanel(javax.swing.JPanel) VerticalPanel(org.apache.jmeter.gui.util.VerticalPanel) BorderLayout(java.awt.BorderLayout) JLabel(javax.swing.JLabel) JTextField(javax.swing.JTextField)

Example 87 with JCheckBox

use of javax.swing.JCheckBox in project jmeter by apache.

the class RandomControlGui method init.

private void init() {
    // WARNING: called from ctor so must not be overridden (i.e. must be private or final)
    setLayout(new VerticalLayout(5, VerticalLayout.BOTH, VerticalLayout.TOP));
    setBorder(makeBorder());
    add(makeTitlePanel());
    // $NON-NLS-1$
    style = new JCheckBox(JMeterUtils.getResString("ignore_subcontrollers"));
    add(CheckBoxPanel.wrap(style));
}
Also used : JCheckBox(javax.swing.JCheckBox) VerticalLayout(org.apache.jorphan.gui.layout.VerticalLayout)

Example 88 with JCheckBox

use of javax.swing.JCheckBox 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 89 with JCheckBox

use of javax.swing.JCheckBox in project jmeter by apache.

the class WorkBenchGui method init.

/**
     * Initialize the components and layout of this component.
     */
private void init() {
    // WARNING: called from ctor so must not be overridden (i.e. must be private or final)
    setLayout(new BorderLayout(0, 5));
    setBorder(makeBorder());
    add(makeTitlePanel(), BorderLayout.NORTH);
    VerticalPanel workBenchPropsPanel = new VerticalPanel(5, 0);
    saveWorkBench = new JCheckBox(JMeterUtils.getResString("save_workbench"));
    saveWorkBench.setSelected(true);
    workBenchPropsPanel.add(saveWorkBench);
    add(workBenchPropsPanel, BorderLayout.CENTER);
}
Also used : JCheckBox(javax.swing.JCheckBox) VerticalPanel(org.apache.jmeter.gui.util.VerticalPanel) BorderLayout(java.awt.BorderLayout)

Example 90 with JCheckBox

use of javax.swing.JCheckBox in project jmeter by apache.

the class LoopControlPanel method createLoopCountPanel.

/**
     * Create a GUI panel containing the components related to the number of
     * loops which should be executed.
     *
     * @return a GUI panel containing the loop count components
     */
private JPanel createLoopCountPanel() {
    JPanel loopPanel = new JPanel(new BorderLayout(5, 0));
    // LOOP LABEL
    // $NON-NLS-1$
    JLabel loopsLabel = new JLabel(JMeterUtils.getResString("iterator_num"));
    loopPanel.add(loopsLabel, BorderLayout.WEST);
    JPanel loopSubPanel = new JPanel(new BorderLayout(5, 0));
    // TEXT FIELD
    // $NON-NLS-1$
    loops = new JTextField("1", 5);
    loops.setName(LOOPS);
    loopsLabel.setLabelFor(loops);
    loopSubPanel.add(loops, BorderLayout.CENTER);
    // FOREVER CHECKBOX
    // $NON-NLS-1$
    infinite = new JCheckBox(JMeterUtils.getResString("infinite"));
    infinite.setActionCommand(INFINITE);
    infinite.addActionListener(this);
    loopSubPanel.add(infinite, BorderLayout.WEST);
    loopPanel.add(loopSubPanel, BorderLayout.CENTER);
    loopPanel.add(Box.createHorizontalStrut(loopsLabel.getPreferredSize().width + loops.getPreferredSize().width + infinite.getPreferredSize().width), BorderLayout.NORTH);
    return loopPanel;
}
Also used : JCheckBox(javax.swing.JCheckBox) JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) JLabel(javax.swing.JLabel) JTextField(javax.swing.JTextField)

Aggregations

JCheckBox (javax.swing.JCheckBox)491 JPanel (javax.swing.JPanel)199 JLabel (javax.swing.JLabel)155 JButton (javax.swing.JButton)108 ActionEvent (java.awt.event.ActionEvent)98 ActionListener (java.awt.event.ActionListener)93 JTextField (javax.swing.JTextField)88 GridBagConstraints (java.awt.GridBagConstraints)82 GridBagLayout (java.awt.GridBagLayout)77 Insets (java.awt.Insets)66 BorderLayout (java.awt.BorderLayout)63 Dimension (java.awt.Dimension)59 BoxLayout (javax.swing.BoxLayout)56 JScrollPane (javax.swing.JScrollPane)38 ItemEvent (java.awt.event.ItemEvent)37 ItemListener (java.awt.event.ItemListener)34 FlowLayout (java.awt.FlowLayout)33 JComboBox (javax.swing.JComboBox)33 JRadioButton (javax.swing.JRadioButton)32 Box (javax.swing.Box)30