Search in sources :

Example 51 with JTextField

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

the class CriticalSectionControllerGui method createCriticalSectionPanel.

/**
     * Create a GUI panel containing the lockName
     * 
     * @return a GUI panel containing the lock name components
     */
private JPanel createCriticalSectionPanel() {
    JPanel conditionPanel = new JPanel(new BorderLayout(5, 0));
    // Condition LABEL
    JLabel conditionLabel = new JLabel(// $NON-NLS-1$
    JMeterUtils.getResString("critical_section_controller_label"));
    conditionPanel.add(conditionLabel, BorderLayout.WEST);
    // TEXT FIELD
    // $NON-NLS-1$
    tfLockName = new JTextField("");
    conditionLabel.setLabelFor(tfLockName);
    conditionPanel.add(tfLockName, BorderLayout.CENTER);
    conditionPanel.add(Box.createHorizontalStrut(conditionLabel.getPreferredSize().width + tfLockName.getPreferredSize().width), BorderLayout.NORTH);
    return conditionPanel;
}
Also used : JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) JLabel(javax.swing.JLabel) JTextField(javax.swing.JTextField)

Example 52 with JTextField

use of javax.swing.JTextField 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 53 with JTextField

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

the class SwitchControllerGui method createSwitchPanel.

private JPanel createSwitchPanel() {
    JPanel switchPanel = new JPanel(new BorderLayout(5, 0));
    JLabel selectionLabel = new JLabel(JMeterUtils.getResString(SWITCH_LABEL));
    // $NON-NLS-1$
    switchValue = new JTextField("");
    selectionLabel.setLabelFor(switchValue);
    switchPanel.add(selectionLabel, BorderLayout.WEST);
    switchPanel.add(switchValue, BorderLayout.CENTER);
    return switchPanel;
}
Also used : JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) JLabel(javax.swing.JLabel) JTextField(javax.swing.JTextField)

Example 54 with JTextField

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

the class RunTimeGui method createLoopCountPanel.

/**
     * Create a GUI panel containing the components related to the number of
     * seconds which should be executed.
     *
     * @return a GUI panel containing the loop count components
     */
private JPanel createLoopCountPanel() {
    JPanel loopPanel = new JPanel(new BorderLayout(5, 0));
    // SECONDS LABEL
    // $NON-NLS-1$
    JLabel secondsLabel = new JLabel(JMeterUtils.getResString("runtime_seconds"));
    loopPanel.add(secondsLabel, BorderLayout.WEST);
    JPanel loopSubPanel = new JPanel(new BorderLayout(5, 0));
    // TEXT FIELD
    // $NON-NLS-1$
    seconds = new JTextField("1", 5);
    secondsLabel.setLabelFor(seconds);
    loopSubPanel.add(seconds, BorderLayout.CENTER);
    loopPanel.add(loopSubPanel, BorderLayout.CENTER);
    loopPanel.add(Box.createHorizontalStrut(secondsLabel.getPreferredSize().width + seconds.getPreferredSize().width), BorderLayout.NORTH);
    return loopPanel;
}
Also used : JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) JLabel(javax.swing.JLabel) JTextField(javax.swing.JTextField)

Example 55 with JTextField

use of javax.swing.JTextField 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

JTextField (javax.swing.JTextField)450 JLabel (javax.swing.JLabel)270 JPanel (javax.swing.JPanel)236 JButton (javax.swing.JButton)135 BorderLayout (java.awt.BorderLayout)115 GridBagLayout (java.awt.GridBagLayout)94 Insets (java.awt.Insets)94 GridBagConstraints (java.awt.GridBagConstraints)93 Dimension (java.awt.Dimension)91 JCheckBox (javax.swing.JCheckBox)89 ActionEvent (java.awt.event.ActionEvent)84 ActionListener (java.awt.event.ActionListener)75 JScrollPane (javax.swing.JScrollPane)64 BoxLayout (javax.swing.BoxLayout)50 JTextArea (javax.swing.JTextArea)40 FlowLayout (java.awt.FlowLayout)39 JComboBox (javax.swing.JComboBox)39 JRadioButton (javax.swing.JRadioButton)37 ButtonGroup (javax.swing.ButtonGroup)35 JTable (javax.swing.JTable)34