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