use of org.apache.jorphan.gui.layout.VerticalLayout in project jmeter by apache.
the class XMLAssertionGui method init.
/**
* Inits the GUI.
*/
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());
}
use of org.apache.jorphan.gui.layout.VerticalLayout in project jmeter by apache.
the class ThroughputControllerGui 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());
DefaultComboBoxModel<String> styleModel = new DefaultComboBoxModel<>();
styleModel.addElement(BYNUMBER_LABEL);
styleModel.addElement(BYPERCENT_LABEL);
styleBox = new JComboBox<>(styleModel);
styleBox.addActionListener(evt -> {
if (((String) styleBox.getSelectedItem()).equals(BYNUMBER_LABEL)) {
style = ThroughputController.BYNUMBER;
} else {
style = ThroughputController.BYPERCENT;
}
});
add(styleBox);
// TYPE FIELD
JPanel tpPanel = new JPanel();
JLabel tpLabel = new JLabel(THROUGHPUT_LABEL);
tpPanel.add(tpLabel);
// TEXT FIELD
throughput = new JTextField(15);
tpPanel.add(throughput);
// $NON-NLS-1$
throughput.setText("1");
tpPanel.add(throughput);
add(tpPanel);
// PERTHREAD FIELD
perthread = new JCheckBox(PERTHREAD_LABEL, isPerThread);
perthread.addItemListener(evt -> {
if (evt.getStateChange() == ItemEvent.SELECTED) {
isPerThread = true;
} else {
isPerThread = false;
}
});
add(CheckBoxPanel.wrap(perthread));
}
use of org.apache.jorphan.gui.layout.VerticalLayout in project jmeter by apache.
the class OnceOnlyControllerGui 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());
}
use of org.apache.jorphan.gui.layout.VerticalLayout in project jmeter by apache.
the class ModuleControllerGui 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());
JPanel modulesPanel = new JPanel();
//$NON-NLS-1$
expandButton = new JButton(JMeterUtils.getResString("find_target_element"));
expandButton.addActionListener(this);
modulesPanel.add(expandButton);
modulesPanel.setLayout(new BoxLayout(modulesPanel, BoxLayout.Y_AXIS));
modulesPanel.add(Box.createRigidArea(new Dimension(0, 5)));
// $NON-NLS-1$
JLabel nodesLabel = new JLabel(JMeterUtils.getResString("module_controller_module_to_run"));
modulesPanel.add(nodesLabel);
modulesPanel.add(warningLabel);
add(modulesPanel);
JPanel treePanel = new JPanel();
treePanel.setLayout(new FlowLayout(FlowLayout.LEFT));
treePanel.add(moduleToRunTreeNodes);
add(treePanel);
}
use of org.apache.jorphan.gui.layout.VerticalLayout in project jmeter by apache.
the class AbstractRandomTimerGui method init.
/**
* Initialize this component.
*/
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));
setBorder(makeBorder());
add(makeTitlePanel());
JPanel threadDelayPropsPanel = new JPanel();
threadDelayPropsPanel.setLayout(new VerticalLayout(5, VerticalLayout.LEFT));
threadDelayPropsPanel.setBorder(BorderFactory.createTitledBorder(//$NON-NLS-1$
JMeterUtils.getResString("thread_delay_properties")));
// DELAY DEVIATION
Box delayDevPanel = Box.createHorizontalBox();
//$NON-NLS-1$
delayDevPanel.add(new JLabel(getTimerRangeLabelKey()));
delayDevPanel.add(Box.createHorizontalStrut(5));
rangeField = new JTextField(20);
rangeField.setText(getDefaultRange());
rangeField.setName(RANGE_FIELD);
delayDevPanel.add(rangeField);
threadDelayPropsPanel.add(delayDevPanel);
// AVG DELAY
Box avgDelayPanel = Box.createHorizontalBox();
//$NON-NLS-1$
avgDelayPanel.add(new JLabel(getTimerDelayLabelKey()));
avgDelayPanel.add(Box.createHorizontalStrut(5));
delayField = new JTextField(20);
delayField.setText(getDefaultDelay());
delayField.setName(DELAY_FIELD);
avgDelayPanel.add(delayField);
threadDelayPropsPanel.add(avgDelayPanel);
threadDelayPropsPanel.setMaximumSize(new Dimension(threadDelayPropsPanel.getMaximumSize().width, threadDelayPropsPanel.getPreferredSize().height));
add(threadDelayPropsPanel);
}
Aggregations