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;
}
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;
}
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;
}
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;
}
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;
}
Aggregations