use of org.apache.jmeter.gui.util.HorizontalPanel in project jmeter by apache.
the class ProxyControlGui method createGroupingPanel.
private JPanel createGroupingPanel() {
DefaultComboBoxModel<String> m = new DefaultComboBoxModel<>();
// Note: position of these elements in the menu *must* match the
// corresponding ProxyControl.GROUPING_* values.
// $NON-NLS-1$
m.addElement(JMeterUtils.getResString("grouping_no_groups"));
// $NON-NLS-1$
m.addElement(JMeterUtils.getResString("grouping_add_separators"));
// $NON-NLS-1$
m.addElement(JMeterUtils.getResString("grouping_in_controllers"));
// $NON-NLS-1$
m.addElement(JMeterUtils.getResString("grouping_store_first_only"));
// $NON-NLS-1$
m.addElement(JMeterUtils.getResString("grouping_in_transaction_controllers"));
groupingMode = new JComboBox<>(m);
groupingMode.setPreferredSize(new Dimension(150, 20));
groupingMode.setSelectedIndex(0);
groupingMode.addItemListener(this);
// $NON-NLS-1$
JLabel label2 = new JLabel(JMeterUtils.getResString("grouping_mode"));
label2.setLabelFor(groupingMode);
HorizontalPanel panel = new HorizontalPanel();
panel.add(label2);
panel.add(groupingMode);
return panel;
}
use of org.apache.jmeter.gui.util.HorizontalPanel in project jmeter by apache.
the class ProxyControlGui method createPortPanel.
private JPanel createPortPanel() {
portField = new JTextField(ProxyControl.DEFAULT_PORT_S, 20);
portField.setName(PORTFIELD);
portField.addKeyListener(this);
Dimension portPreferredSize = portField.getPreferredSize();
portField.setMinimumSize(new Dimension((int) Math.round(portPreferredSize.width * 0.75), portPreferredSize.height));
// $NON-NLS-1$
JLabel label = new JLabel(JMeterUtils.getResString("port"));
label.setLabelFor(portField);
HorizontalPanel panel = new HorizontalPanel();
panel.add(label);
panel.add(portField);
// $NON-NLS-1$
sslDomains = new JLabeledTextField(JMeterUtils.getResString("proxy_domains"));
sslDomains.setEnabled(ProxyControl.isDynamicMode());
if (ProxyControl.isDynamicMode()) {
sslDomains.setToolTipText(JMeterUtils.getResString("proxy_domains_dynamic_mode_tooltip"));
} else {
sslDomains.setToolTipText(JMeterUtils.getResString("proxy_domains_dynamic_mode_tooltip_java6"));
}
GridBagLayout gridBagLayout = new GridBagLayout();
GridBagConstraints gbc = new GridBagConstraints();
gbc.anchor = GridBagConstraints.NORTHWEST;
gbc.fill = GridBagConstraints.NONE;
gbc.gridheight = 1;
gbc.gridwidth = 1;
gbc.gridx = 0;
gbc.gridy = 0;
gbc.weightx = 1;
gbc.weighty = 1;
JPanel gPane = new JPanel(gridBagLayout);
gPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), // $NON-NLS-1$
JMeterUtils.getResString("proxy_general_settings")));
gPane.add(panel, gbc.clone());
gbc.gridx++;
gbc.fill = GridBagConstraints.HORIZONTAL;
gbc.weightx = 6;
gPane.add(sslDomains, gbc);
return gPane;
}
Aggregations