use of org.apache.jmeter.gui.util.VerticalPanel in project jmeter by apache.
the class ServerPanel method init.
private void init() {
// WARNING: called from ctor so must not be overridden (i.e. must be private or final)
setLayout(new BorderLayout(5, 0));
// Target server panel
JPanel webServerPanel = new HorizontalPanel();
webServerPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), // $NON-NLS-1$
JMeterUtils.getResString("target_server")));
final JPanel domainPanel = getDomainPanel();
final JPanel portPanel = getPortPanel();
webServerPanel.add(domainPanel, BorderLayout.CENTER);
webServerPanel.add(portPanel, BorderLayout.EAST);
JPanel timeOut = new HorizontalPanel();
timeOut.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), // $NON-NLS-1$
JMeterUtils.getResString("web_server_timeout_title")));
final JPanel connPanel = getConnectTimeOutPanel();
final JPanel reqPanel = getResponseTimeOutPanel();
timeOut.add(connPanel);
timeOut.add(reqPanel);
JPanel webServerTimeoutPanel = new VerticalPanel();
webServerTimeoutPanel.add(webServerPanel, BorderLayout.CENTER);
webServerTimeoutPanel.add(timeOut, BorderLayout.EAST);
JPanel bigPanel = new VerticalPanel();
bigPanel.add(webServerTimeoutPanel);
add(bigPanel);
}
use of org.apache.jmeter.gui.util.VerticalPanel in project jmeter by apache.
the class JavaConfigGui method createClassnamePanel.
/**
* Create a panel with GUI components allowing the user to select a test
* class.
*
* @return a panel containing the relevant components
*/
private JPanel createClassnamePanel() {
List<String> possibleClasses = new ArrayList<>();
try {
// Find all the classes which implement the JavaSamplerClient
// interface.
possibleClasses = ClassFinder.findClassesThatExtend(JMeterUtils.getSearchPaths(), new Class[] { JavaSamplerClient.class });
// Remove the JavaConfig class from the list since it only
// implements the interface for error conditions.
possibleClasses.remove(JavaSampler.class.getName() + "$ErrorSamplerClient");
} catch (Exception e) {
log.debug("Exception getting interfaces.", e);
}
classNameLabeledChoice = new JLabeledChoice(JMeterUtils.getResString("protocol_java_classname"), possibleClasses.toArray(ArrayUtils.EMPTY_STRING_ARRAY), true, false);
classNameLabeledChoice.addChangeListener(this);
warningLabel.setForeground(Color.RED);
Font font = warningLabel.getFont();
warningLabel.setFont(new Font(font.getFontName(), Font.BOLD, (int) (font.getSize() * 1.1)));
warningLabel.setVisible(false);
VerticalPanel panel = new VerticalPanel();
panel.add(classNameLabeledChoice);
panel.add(warningLabel);
return panel;
}
use of org.apache.jmeter.gui.util.VerticalPanel in project jmeter by apache.
the class JMSSubscriberGui method init.
/**
* init() adds jndiICF to the mainPanel. The class reuses logic from
* SOAPSampler, since it is common.
*/
private void init() {
// WARNING: called from ctor so must not be overridden (i.e. must be private or final)
setLayout(new BorderLayout());
setBorder(makeBorder());
add(makeTitlePanel(), BorderLayout.NORTH);
JPanel mainPanel = new VerticalPanel();
add(mainPanel, BorderLayout.CENTER);
jndiICF.setToolTipText(Context.INITIAL_CONTEXT_FACTORY);
urlField.setToolTipText(Context.PROVIDER_URL);
jmsUser.setToolTipText(Context.SECURITY_PRINCIPAL);
jmsPwd.setToolTipText(Context.SECURITY_CREDENTIALS);
mainPanel.add(useProperties);
mainPanel.add(jndiICF);
mainPanel.add(urlField);
mainPanel.add(jndiConnFac);
mainPanel.add(createDestinationPane());
mainPanel.add(jmsDurableSubscriptionId);
mainPanel.add(jmsClientId);
mainPanel.add(jmsSelector);
mainPanel.add(useAuth);
mainPanel.add(jmsUser);
mainPanel.add(jmsPwd);
mainPanel.add(samplesToAggregate);
mainPanel.add(storeResponse);
mainPanel.add(timeout);
JPanel choice = new HorizontalPanel();
choice.add(clientChoice);
choice.add(stopBetweenSamples);
mainPanel.add(choice);
mainPanel.add(separator);
mainPanel.add(jmsErrorReconnectOnCodes);
mainPanel.add(jmsErrorPauseBetween);
useProperties.addChangeListener(this);
useAuth.addChangeListener(this);
}
use of org.apache.jmeter.gui.util.VerticalPanel in project jmeter by apache.
the class FunctionHelper method init.
private void init() {
// WARNING: called from ctor so must not be overridden (i.e. must be private or final)
//$NON-NLS-1$
parameterPanel = new ArgumentsPanel(JMeterUtils.getResString("function_params"), false);
initializeFunctionList();
this.getContentPane().setLayout(new BorderLayout(10, 10));
JPanel comboPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
comboPanel.add(functionList);
//$NON-NLS-1$
JButton helpButton = new JButton(JMeterUtils.getResString("help"));
helpButton.addActionListener(new HelpListener());
comboPanel.add(helpButton);
this.getContentPane().add(comboPanel, BorderLayout.NORTH);
this.getContentPane().add(parameterPanel, BorderLayout.CENTER);
JPanel resultsPanel = new VerticalPanel();
JPanel generatePanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
JPanel displayPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
//$NON-NLS-1$
cutPasteFunction = new JLabeledTextField(JMeterUtils.getResString("cut_paste_function"), 35);
generatePanel.add(cutPasteFunction);
//$NON-NLS-1$
JButton generateButton = new JButton(JMeterUtils.getResString("generate"));
generateButton.addActionListener(this);
generatePanel.add(generateButton);
resultTextArea = JSyntaxTextArea.getInstance(5, 50);
resultTextArea.setToolTipText(JMeterUtils.getResString("function_helper_dialog_result_warn"));
displayPanel.add(new JLabel(JMeterUtils.getResString("result_function")));
displayPanel.add(JTextScrollPane.getInstance(resultTextArea));
resultsPanel.add(generatePanel);
resultsPanel.add(displayPanel);
this.getContentPane().add(resultsPanel, BorderLayout.SOUTH);
this.pack();
ComponentUtil.centerComponentInWindow(this);
}
use of org.apache.jmeter.gui.util.VerticalPanel in project jmeter by apache.
the class SystemSamplerGui method makeCommandPanel.
/**
* @return JPanel Command + directory
*/
private JPanel makeCommandPanel() {
JPanel cmdPanel = new JPanel();
cmdPanel.setLayout(new BoxLayout(cmdPanel, BoxLayout.X_AXIS));
JPanel cmdWkDirPane = new JPanel(new BorderLayout());
// $NON-NLS-1$
command = new JLabeledTextField(JMeterUtils.getResString("command_field_title"));
cmdWkDirPane.add(command, BorderLayout.CENTER);
// $NON-NLS-1$
directory = new JLabeledTextField(JMeterUtils.getResString("directory_field_title"));
cmdWkDirPane.add(directory, BorderLayout.EAST);
cmdPanel.add(cmdWkDirPane);
JPanel panel = new VerticalPanel();
panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), // $NON-NLS-1$
JMeterUtils.getResString("command_config_box_title")));
panel.add(cmdPanel, BorderLayout.NORTH);
panel.add(makeArgumentsPanel(), BorderLayout.CENTER);
panel.add(makeEnvironmentPanel(), BorderLayout.SOUTH);
return panel;
}
Aggregations