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