use of org.apache.jorphan.gui.layout.VerticalLayout in project jmeter by apache.
the class CookiePanel method init.
/**
* Shows the main cookie configuration panel.
*/
private void init() {
// WARNING: called from ctor so must not be overridden (i.e. must be private or final)
tableModel = new PowerTableModel(COLUMN_RESOURCE_NAMES, columnClasses);
clearEachIteration = //$NON-NLS-1$
new JCheckBox(JMeterUtils.getResString("clear_cookies_per_iter"), false);
policy = new JLabeledChoice(//$NON-NLS-1$
JMeterUtils.getResString("cookie_manager_policy"), new HC4CookieHandler().getPolicies());
setLayout(new BorderLayout());
setBorder(makeBorder());
JPanel northPanel = new JPanel();
northPanel.setLayout(new VerticalLayout(5, VerticalLayout.BOTH));
northPanel.add(makeTitlePanel());
JPanel optionsPane = new JPanel();
optionsPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), // $NON-NLS-1$
JMeterUtils.getResString("cookie_options")));
optionsPane.setLayout(new VerticalLayout(5, VerticalLayout.BOTH));
optionsPane.add(clearEachIteration);
JPanel policyTypePane = new JPanel();
policyTypePane.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
policyTypePane.add(policy);
optionsPane.add(policyTypePane);
northPanel.add(optionsPane);
add(northPanel, BorderLayout.NORTH);
add(createCookieTablePanel(), BorderLayout.CENTER);
}
use of org.apache.jorphan.gui.layout.VerticalLayout in project jmeter by apache.
the class SMIMEAssertionGui method createSignerPanel.
private JPanel createSignerPanel() {
JPanel panel = new JPanel();
panel.setBorder(BorderFactory.createTitledBorder(JMeterUtils.getResString(// $NON-NLS-1$
"smime_assertion_signer")));
panel.setLayout(new VerticalLayout(5, VerticalLayout.LEFT));
ButtonGroup buttonGroup = new ButtonGroup();
buttonGroup.add(signerNoCheck);
buttonGroup.add(signerCheckConstraints);
buttonGroup.add(signerCheckByFile);
panel.add(signerNoCheck);
panel.add(signerCheckConstraints);
signerCheckConstraints.addChangeListener(evt -> {
boolean signerCC = signerCheckConstraints.isSelected();
signerDnField.setEnabled(signerCC);
signerSerialNumberField.setEnabled(signerCC);
signerEmailField.setEnabled(signerCC);
issuerDnField.setEnabled(signerCC);
});
Box box = Box.createHorizontalBox();
// $NON-NLS-1$
box.add(new JLabel(JMeterUtils.getResString("smime_assertion_signer_dn")));
box.add(Box.createHorizontalStrut(5));
box.add(signerDnField);
panel.add(box);
box = Box.createHorizontalBox();
// $NON-NLS-1$
box.add(new JLabel(JMeterUtils.getResString("smime_assertion_signer_email")));
box.add(Box.createHorizontalStrut(5));
box.add(signerEmailField);
panel.add(box);
box = Box.createHorizontalBox();
// $NON-NLS-1$
box.add(new JLabel(JMeterUtils.getResString("smime_assertion_issuer_dn")));
box.add(Box.createHorizontalStrut(5));
box.add(issuerDnField);
panel.add(box);
box = Box.createHorizontalBox();
// $NON-NLS-1$
box.add(new JLabel(JMeterUtils.getResString("smime_assertion_signer_serial")));
box.add(Box.createHorizontalStrut(5));
box.add(signerSerialNumberField);
panel.add(box);
signerCheckByFile.addChangeListener(evt -> signerCertFile.setEnabled(signerCheckByFile.isSelected()));
box = Box.createHorizontalBox();
box.add(signerCheckByFile);
box.add(Box.createHorizontalStrut(5));
box.add(signerCertFile);
panel.add(box);
return panel;
}
use of org.apache.jorphan.gui.layout.VerticalLayout in project jmeter by apache.
the class SizeAssertionGui 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());
add(createScopePanel(true));
add(createFieldPanel());
// USER_INPUT
JPanel sizePanel = new JPanel();
sizePanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), //$NON-NLS-1$
JMeterUtils.getResString("size_assertion_size_test")));
//$NON-NLS-1$
sizePanel.add(new JLabel(JMeterUtils.getResString("size_assertion_label")));
size = new JTextField(12);
sizePanel.add(size);
sizePanel.add(createComparatorButtonPanel());
add(sizePanel);
}
use of org.apache.jorphan.gui.layout.VerticalLayout in project jmeter by apache.
the class TestActionGui 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());
// Target
HorizontalPanel targetPanel = new HorizontalPanel();
targetPanel.add(new JLabel(targetLabel));
DefaultComboBoxModel<String> targetModel = new DefaultComboBoxModel<>();
targetModel.addElement(threadTarget);
targetModel.addElement(testTarget);
targetBox = new JComboBox<>(targetModel);
targetBox.addActionListener(evt -> {
if (((String) targetBox.getSelectedItem()).equals(threadTarget)) {
target = TestAction.THREAD;
} else {
target = TestAction.TEST;
}
});
targetPanel.add(targetBox);
add(targetPanel);
// Action
HorizontalPanel actionPanel = new HorizontalPanel();
ButtonGroup actionButtons = new ButtonGroup();
pauseButton = new JRadioButton(pauseAction, true);
pauseButton.addChangeListener(evt -> {
if (pauseButton.isSelected()) {
action = TestAction.PAUSE;
durationField.setEnabled(true);
targetBox.setEnabled(true);
}
});
stopButton = new JRadioButton(stopAction, false);
stopButton.addChangeListener(evt -> {
if (stopButton.isSelected()) {
action = TestAction.STOP;
durationField.setEnabled(false);
targetBox.setEnabled(true);
}
});
stopNowButton = new JRadioButton(stopNowAction, false);
stopNowButton.addChangeListener(evt -> {
if (stopNowButton.isSelected()) {
action = TestAction.STOP_NOW;
durationField.setEnabled(false);
targetBox.setEnabled(true);
}
});
restartNextLoopButton = new JRadioButton(restartNextLoopAction, false);
restartNextLoopButton.addChangeListener(evt -> {
if (restartNextLoopButton.isSelected()) {
action = TestAction.RESTART_NEXT_LOOP;
durationField.setEnabled(false);
targetBox.setSelectedIndex(TestAction.THREAD);
targetBox.setEnabled(false);
}
});
actionButtons.add(pauseButton);
actionButtons.add(stopButton);
actionButtons.add(stopNowButton);
actionButtons.add(restartNextLoopButton);
actionPanel.add(new JLabel(actionLabel));
actionPanel.add(pauseButton);
actionPanel.add(stopButton);
actionPanel.add(stopNowButton);
actionPanel.add(restartNextLoopButton);
add(actionPanel);
// Duration
HorizontalPanel durationPanel = new HorizontalPanel();
durationField = new JTextField(15);
// $NON-NLS-1$
durationField.setText("");
durationPanel.add(new JLabel(durationLabel));
durationPanel.add(durationField);
add(durationPanel);
}
use of org.apache.jorphan.gui.layout.VerticalLayout 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);
}
Aggregations