Search in sources :

Example 26 with Box

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);
}
Also used : BorderLayout(java.awt.BorderLayout) Box(javax.swing.Box) JCheckBox(javax.swing.JCheckBox)

Example 27 with Box

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);
}
Also used : BorderLayout(java.awt.BorderLayout) Box(javax.swing.Box) JCheckBox(javax.swing.JCheckBox)

Example 28 with Box

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);
}
Also used : BorderLayout(java.awt.BorderLayout) Box(javax.swing.Box) JCheckBox(javax.swing.JCheckBox)

Example 29 with Box

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;
}
Also used : Box(javax.swing.Box) JCheckBox(javax.swing.JCheckBox)

Example 30 with Box

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;
}
Also used : JLabeledTextField(org.apache.jorphan.gui.JLabeledTextField) JPanel(javax.swing.JPanel) JTextArea(javax.swing.JTextArea) BorderLayout(java.awt.BorderLayout) JButton(javax.swing.JButton) Box(javax.swing.Box) JCheckBox(javax.swing.JCheckBox) EmptyBorder(javax.swing.border.EmptyBorder) Border(javax.swing.border.Border) EmptyBorder(javax.swing.border.EmptyBorder)

Aggregations

Box (javax.swing.Box)192 JCheckBox (javax.swing.JCheckBox)95 JLabel (javax.swing.JLabel)93 JPanel (javax.swing.JPanel)87 Dimension (java.awt.Dimension)65 BorderLayout (java.awt.BorderLayout)51 JButton (javax.swing.JButton)48 JComboBox (javax.swing.JComboBox)46 JScrollPane (javax.swing.JScrollPane)42 BoxLayout (javax.swing.BoxLayout)38 ActionEvent (java.awt.event.ActionEvent)31 ActionListener (java.awt.event.ActionListener)28 JTextField (javax.swing.JTextField)25 EmptyBorder (javax.swing.border.EmptyBorder)19 Insets (java.awt.Insets)17 SearchFilterPanel (pcgen.gui2.filter.SearchFilterPanel)14 FlippingSplitPane (pcgen.gui2.tools.FlippingSplitPane)14 TitledBorder (javax.swing.border.TitledBorder)13 FilterBar (pcgen.gui2.filter.FilterBar)13 GridBagConstraints (java.awt.GridBagConstraints)12