Search in sources :

Example 71 with FlowLayout

use of java.awt.FlowLayout in project jmeter by apache.

the class ArgumentsPanel method makeLabelPanel.

/**
     * Create a panel containing the title label for the table.
     *
     * @return a panel containing the title label
     */
protected Component makeLabelPanel() {
    JPanel labelPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
    labelPanel.add(tableLabel);
    if (this.background != null) {
        labelPanel.setBackground(this.background);
    }
    return labelPanel;
}
Also used : JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout)

Example 72 with FlowLayout

use of java.awt.FlowLayout in project jmeter by apache.

the class StatGraphVisualizer method createGraphColumnPane.

private JPanel createGraphColumnPane() {
    JPanel colPanel = new JPanel();
    colPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 0));
    //$NON-NLS-1$
    JLabel label = new JLabel(JMeterUtils.getResString("aggregate_graph_columns_to_display"));
    colPanel.add(label);
    for (BarGraph bar : eltList) {
        colPanel.add(bar.getChkBox());
        colPanel.add(createColorBarButton(bar, eltList.indexOf(bar)));
    }
    colPanel.add(Box.createRigidArea(new Dimension(5, 0)));
    chooseForeColor.setFont(FONT_SMALL);
    colPanel.add(chooseForeColor);
    chooseForeColor.addActionListener(this);
    JPanel optionsPanel = new JPanel();
    optionsPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
    optionsPanel.add(createGraphFontValuePane());
    optionsPanel.add(drawOutlinesBar);
    optionsPanel.add(numberShowGrouping);
    optionsPanel.add(valueLabelsVertical);
    JPanel barPane = new JPanel(new BorderLayout());
    barPane.add(colPanel, BorderLayout.NORTH);
    barPane.add(Box.createRigidArea(new Dimension(0, 3)), BorderLayout.CENTER);
    barPane.add(optionsPanel, BorderLayout.SOUTH);
    JPanel columnPane = new JPanel(new BorderLayout());
    columnPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), // $NON-NLS-1$
    JMeterUtils.getResString("aggregate_graph_column_settings")));
    columnPane.add(barPane, BorderLayout.NORTH);
    columnPane.add(Box.createRigidArea(new Dimension(0, 3)), BorderLayout.CENTER);
    columnPane.add(createGraphSelectionSubPane(), BorderLayout.SOUTH);
    return columnPane;
}
Also used : JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout) BorderLayout(java.awt.BorderLayout) JLabel(javax.swing.JLabel) Dimension(java.awt.Dimension)

Example 73 with FlowLayout

use of java.awt.FlowLayout in project jmeter by apache.

the class GuiUtils method createLabelCombo.

/**
     * Create a GUI component JLabel + JComboBox with a left and right margin (5px)
     * @param label the label
     * @param comboBox the combo box
     * @return the JComponent (margin+JLabel+margin+JComboBox)
     */
public static JComponent createLabelCombo(String label, JComboBox<?> comboBox) {
    JPanel labelCombo = new JPanel();
    labelCombo.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
    JLabel caption = new JLabel(label);
    caption.setBorder(new EmptyBorder(0, 5, 0, 5));
    labelCombo.add(caption);
    labelCombo.add(comboBox);
    return labelCombo;
}
Also used : JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout) JLabel(javax.swing.JLabel) EmptyBorder(javax.swing.border.EmptyBorder)

Example 74 with FlowLayout

use of java.awt.FlowLayout in project jmeter by apache.

the class TCPConfigGui method createNoDelayPanel.

private JPanel createNoDelayPanel() {
    // $NON-NLS-1$
    JLabel label = new JLabel(JMeterUtils.getResString("tcp_nodelay"));
    setNoDelay = new TristateCheckBox();
    label.setLabelFor(setNoDelay);
    JPanel nodelayPanel = new JPanel(new FlowLayout());
    nodelayPanel.add(label);
    nodelayPanel.add(setNoDelay);
    return nodelayPanel;
}
Also used : TristateCheckBox(org.apache.jmeter.gui.util.TristateCheckBox) JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout) JLabel(javax.swing.JLabel)

Example 75 with FlowLayout

use of java.awt.FlowLayout 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);
}
Also used : JCheckBox(javax.swing.JCheckBox) JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout) JLabeledChoice(org.apache.jorphan.gui.JLabeledChoice) HC4CookieHandler(org.apache.jmeter.protocol.http.control.HC4CookieHandler) BorderLayout(java.awt.BorderLayout) PowerTableModel(org.apache.jmeter.gui.util.PowerTableModel) VerticalLayout(org.apache.jorphan.gui.layout.VerticalLayout)

Aggregations

FlowLayout (java.awt.FlowLayout)400 JPanel (javax.swing.JPanel)338 JLabel (javax.swing.JLabel)189 JButton (javax.swing.JButton)161 ActionEvent (java.awt.event.ActionEvent)134 BoxLayout (javax.swing.BoxLayout)129 BorderLayout (java.awt.BorderLayout)118 ActionListener (java.awt.event.ActionListener)113 Dimension (java.awt.Dimension)95 JScrollPane (javax.swing.JScrollPane)94 Container (java.awt.Container)49 GridBagLayout (java.awt.GridBagLayout)42 JTextField (javax.swing.JTextField)41 Insets (java.awt.Insets)39 GridBagConstraints (java.awt.GridBagConstraints)38 ButtonGroup (javax.swing.ButtonGroup)38 JCheckBox (javax.swing.JCheckBox)35 JTable (javax.swing.JTable)32 JmriJFrame (jmri.util.JmriJFrame)30 JSeparator (javax.swing.JSeparator)24