Search in sources :

Example 11 with VerticalLayout

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());
}
Also used : VerticalLayout(org.apache.jorphan.gui.layout.VerticalLayout)

Example 12 with VerticalLayout

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));
}
Also used : JCheckBox(javax.swing.JCheckBox) JPanel(javax.swing.JPanel) VerticalLayout(org.apache.jorphan.gui.layout.VerticalLayout) JLabel(javax.swing.JLabel) DefaultComboBoxModel(javax.swing.DefaultComboBoxModel) JTextField(javax.swing.JTextField)

Example 13 with VerticalLayout

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());
}
Also used : VerticalLayout(org.apache.jorphan.gui.layout.VerticalLayout)

Example 14 with VerticalLayout

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);
}
Also used : JPanel(javax.swing.JPanel) FlowLayout(java.awt.FlowLayout) BoxLayout(javax.swing.BoxLayout) JButton(javax.swing.JButton) VerticalLayout(org.apache.jorphan.gui.layout.VerticalLayout) JLabel(javax.swing.JLabel) Dimension(java.awt.Dimension)

Example 15 with VerticalLayout

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);
}
Also used : JPanel(javax.swing.JPanel) VerticalLayout(org.apache.jorphan.gui.layout.VerticalLayout) JLabel(javax.swing.JLabel) Box(javax.swing.Box) Dimension(java.awt.Dimension) JTextField(javax.swing.JTextField)

Aggregations

VerticalLayout (org.apache.jorphan.gui.layout.VerticalLayout)21 JCheckBox (javax.swing.JCheckBox)12 JLabel (javax.swing.JLabel)11 JPanel (javax.swing.JPanel)11 JTextField (javax.swing.JTextField)8 BorderLayout (java.awt.BorderLayout)6 FlowLayout (java.awt.FlowLayout)4 Box (javax.swing.Box)4 Dimension (java.awt.Dimension)3 BoxLayout (javax.swing.BoxLayout)2 ButtonGroup (javax.swing.ButtonGroup)2 DefaultComboBoxModel (javax.swing.DefaultComboBoxModel)2 JButton (javax.swing.JButton)2 HorizontalPanel (org.apache.jmeter.gui.util.HorizontalPanel)2 PowerTableModel (org.apache.jmeter.gui.util.PowerTableModel)2 JLabeledTextField (org.apache.jorphan.gui.JLabeledTextField)2 Color (java.awt.Color)1 Format (java.text.Format)1 SimpleDateFormat (java.text.SimpleDateFormat)1 Comparator (java.util.Comparator)1