use of javax.swing.Box in project jmeter by apache.
the class XPathExtractorGui 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(createScopePanel(true, true, true));
xml.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString(//$NON-NLS-1$
"xpath_assertion_option")));
box.add(xml);
box.add(getFragment);
box.add(makeParameterPanel());
add(box, BorderLayout.NORTH);
}
use of javax.swing.Box in project jmeter by apache.
the class JSONPostProcessorGui 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(createScopePanel(true));
add(box, BorderLayout.NORTH);
add(makeParameterPanel(), BorderLayout.CENTER);
}
use of javax.swing.Box in project jmeter by apache.
the class RegexExtractorGui 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(createScopePanel(true));
box.add(makeSourcePanel());
add(box, BorderLayout.NORTH);
add(makeParameterPanel(), BorderLayout.CENTER);
}
use of javax.swing.Box in project jmeter by apache.
the class GraphVisualizer method createInfoColumn.
/**
* Creates a panel containing two pairs of labels and fields for displaying
* the current graph values. This method exists to help with laying out the
* fields in columns. If one or more components are null then these
* components will be represented by blank space.
*
* @param label1
* the label for the first field. This label will be placed in
* the upper left section of the panel. If this parameter is
* null, this section of the panel will be left blank.
* @param field1
* the field corresponding to the first label. This field will be
* placed in the upper right section of the panel. If this
* parameter is null, this section of the panel will be left
* blank.
* @param label2
* the label for the second field. This label will be placed in
* the lower left section of the panel. If this parameter is
* null, this section of the panel will be left blank.
* @param field2
* the field corresponding to the second label. This field will
* be placed in the lower right section of the panel. If this
* parameter is null, this section of the panel will be left
* blank.
*/
private Box createInfoColumn(JLabel label1, JTextField field1, JLabel label2, JTextField field2) {
// This column actually consists of a row with two sub-columns
// The first column contains the labels, and the second
// column contains the fields.
Box row = Box.createHorizontalBox();
Box col = Box.createVerticalBox();
col.add(label1 != null ? label1 : Box.createVerticalGlue());
col.add(label2 != null ? label2 : Box.createVerticalGlue());
row.add(col);
row.add(Box.createHorizontalStrut(5));
col = Box.createVerticalBox();
col.add(field1 != null ? field1 : Box.createVerticalGlue());
col.add(field2 != null ? field2 : Box.createVerticalGlue());
row.add(col);
row.add(Box.createHorizontalStrut(5));
return row;
}
use of javax.swing.Box in project jmeter by apache.
the class RenderAsXPath method createXpathExtractorTasksPanel.
/**
* Create the XPath task pane
*
* @return XPath task pane
*/
private JPanel createXpathExtractorTasksPanel() {
Box xpathActionPanel = Box.createVerticalBox();
Box selectorAndButton = Box.createHorizontalBox();
Border margin = new EmptyBorder(5, 5, 0, 5);
xpathActionPanel.setBorder(margin);
// $NON-NLS-1$
xpathExpressionField = new JLabeledTextField(JMeterUtils.getResString("xpath_tester_field"));
// $NON-NLS-1$
JButton xpathTester = new JButton(JMeterUtils.getResString("xpath_tester_button_test"));
xpathTester.setActionCommand(XPATH_TESTER_COMMAND);
xpathTester.addActionListener(this);
selectorAndButton.add(xpathExpressionField);
selectorAndButton.add(xpathTester);
xpathActionPanel.add(selectorAndButton);
xpathActionPanel.add(xmlConfPanel);
xpathActionPanel.add(getFragment);
xpathResultField = new JTextArea();
xpathResultField.setEditable(false);
xpathResultField.setLineWrap(true);
xpathResultField.setWrapStyleWord(true);
JPanel xpathTasksPanel = new JPanel(new BorderLayout(0, 5));
xpathTasksPanel.add(xpathActionPanel, BorderLayout.NORTH);
xpathTasksPanel.add(GuiUtils.makeScrollPane(xpathResultField), BorderLayout.CENTER);
return xpathTasksPanel;
}
Aggregations