Search in sources :

Example 16 with VerticalPanel

use of org.apache.jmeter.gui.util.VerticalPanel in project jmeter by apache.

the class HttpTestSampleGui method init.

private void init() {
    // called from ctor, so must not be overridable
    setLayout(new BorderLayout(0, 5));
    setBorder(makeBorder());
    // URL CONFIG
    urlConfigGui = new UrlConfigGui(true, true, true);
    // HTTP request options
    JPanel httpOptions = new HorizontalPanel();
    httpOptions.add(getImplementationPanel());
    httpOptions.add(getTimeOutPanel());
    // AdvancedPanel (embedded resources, source address and optional tasks)
    JPanel advancedPanel = new VerticalPanel();
    if (!isAJP) {
        advancedPanel.add(httpOptions);
    }
    advancedPanel.add(createEmbeddedRsrcPanel());
    if (!isAJP) {
        advancedPanel.add(createSourceAddrPanel());
        advancedPanel.add(getProxyServerPanel());
    }
    advancedPanel.add(createOptionalTasksPanel());
    JTabbedPane tabbedPane = new JTabbedPane();
    tabbedPane.add(JMeterUtils.getResString("web_testing_basic"), urlConfigGui);
    tabbedPane.add(JMeterUtils.getResString("web_testing_advanced"), advancedPanel);
    JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, makeTitlePanel(), tabbedPane);
    splitPane.setOneTouchExpandable(true);
    add(splitPane);
}
Also used : JPanel(javax.swing.JPanel) VerticalPanel(org.apache.jmeter.gui.util.VerticalPanel) BorderLayout(java.awt.BorderLayout) UrlConfigGui(org.apache.jmeter.protocol.http.config.gui.UrlConfigGui) JTabbedPane(javax.swing.JTabbedPane) HorizontalPanel(org.apache.jmeter.gui.util.HorizontalPanel) JSplitPane(javax.swing.JSplitPane)

Example 17 with VerticalPanel

use of org.apache.jmeter.gui.util.VerticalPanel in project jmeter by apache.

the class ThreadGroupGui method init.

private void init() {
    // WARNING: called from ctor so must not be overridden (i.e. must be private or final)
    // THREAD PROPERTIES
    VerticalPanel threadPropsPanel = new VerticalPanel();
    threadPropsPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), // $NON-NLS-1$
    JMeterUtils.getResString("thread_properties")));
    // NUMBER OF THREADS
    JPanel threadPanel = new JPanel(new BorderLayout(5, 0));
    // $NON-NLS-1$
    JLabel threadLabel = new JLabel(JMeterUtils.getResString("number_of_threads"));
    threadPanel.add(threadLabel, BorderLayout.WEST);
    threadInput = new JTextField(5);
    threadInput.setName(THREAD_NAME);
    threadLabel.setLabelFor(threadInput);
    threadPanel.add(threadInput, BorderLayout.CENTER);
    threadPropsPanel.add(threadPanel);
    // RAMP-UP
    JPanel rampPanel = new JPanel(new BorderLayout(5, 0));
    // $NON-NLS-1$
    JLabel rampLabel = new JLabel(JMeterUtils.getResString("ramp_up"));
    rampPanel.add(rampLabel, BorderLayout.WEST);
    rampInput = new JTextField(5);
    rampInput.setName(RAMP_NAME);
    rampLabel.setLabelFor(rampInput);
    rampPanel.add(rampInput, BorderLayout.CENTER);
    threadPropsPanel.add(rampPanel);
    // LOOP COUNT
    threadPropsPanel.add(createControllerPanel());
    if (showDelayedStart) {
        // $NON-NLS-1$
        delayedStart = new JCheckBox(JMeterUtils.getResString("delayed_start"));
        threadPropsPanel.add(delayedStart);
    }
    // $NON-NLS-1$
    scheduler = new JCheckBox(JMeterUtils.getResString("scheduler"));
    scheduler.addItemListener(this);
    threadPropsPanel.add(scheduler);
    mainPanel = new VerticalPanel();
    mainPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), // $NON-NLS-1$
    JMeterUtils.getResString("scheduler_configuration")));
    mainPanel.add(createDurationPanel());
    mainPanel.add(createDelayPanel());
    mainPanel.add(createStartTimePanel());
    mainPanel.add(createEndTimePanel());
    toggleSchedulerFields(false);
    VerticalPanel intgrationPanel = new VerticalPanel();
    intgrationPanel.add(threadPropsPanel);
    intgrationPanel.add(mainPanel);
    add(intgrationPanel, BorderLayout.CENTER);
}
Also used : JCheckBox(javax.swing.JCheckBox) JPanel(javax.swing.JPanel) VerticalPanel(org.apache.jmeter.gui.util.VerticalPanel) BorderLayout(java.awt.BorderLayout) JLabel(javax.swing.JLabel) JTextField(javax.swing.JTextField)

Example 18 with VerticalPanel

use of org.apache.jmeter.gui.util.VerticalPanel in project jmeter by apache.

the class UserParametersGui method init.

private void init() {
    // WARNING: called from ctor so must not be overridden (i.e. must be private or final)
    setBorder(makeBorder());
    setLayout(new BorderLayout());
    JPanel vertPanel = new VerticalPanel();
    vertPanel.add(makeTitlePanel());
    // $NON-NLS-1$
    perIterationCheck = new JCheckBox(JMeterUtils.getResString("update_per_iter"), true);
    Box perIterationPanel = Box.createHorizontalBox();
    perIterationPanel.add(perIterationCheck);
    perIterationPanel.add(Box.createHorizontalGlue());
    vertPanel.add(perIterationPanel);
    add(vertPanel, BorderLayout.NORTH);
    add(makeParameterPanel(), BorderLayout.CENTER);
}
Also used : JCheckBox(javax.swing.JCheckBox) JPanel(javax.swing.JPanel) VerticalPanel(org.apache.jmeter.gui.util.VerticalPanel) BorderLayout(java.awt.BorderLayout) Box(javax.swing.Box) JCheckBox(javax.swing.JCheckBox)

Example 19 with VerticalPanel

use of org.apache.jmeter.gui.util.VerticalPanel in project jmeter by apache.

the class RespTimeGraphVisualizer method init.

/**
     * Initialize the GUI.
     */
private void init() {
    // WARNING: called from ctor so must not be overridden (i.e. must be private or final)
    this.setLayout(new BorderLayout());
    // MAIN PANEL
    JPanel mainPanel = new JPanel();
    Border margin = new EmptyBorder(10, 10, 5, 10);
    Border margin2 = new EmptyBorder(10, 10, 5, 10);
    mainPanel.setBorder(margin);
    mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));
    mainPanel.add(makeTitlePanel());
    JPanel settingsPane = new VerticalPanel();
    settingsPane.setBorder(margin2);
    graphPanel = new RespTimeGraphChart();
    graphPanel.setPreferredSize(new Dimension(DEFAULT_WIDTH, DEFAULT_HEIGTH));
    settingsPane.add(createGraphActionsPane());
    settingsPane.add(createGraphSettingsPane());
    settingsPane.add(createGraphTitlePane());
    settingsPane.add(createLinePane());
    settingsPane.add(createGraphDimensionPane());
    JPanel axisPane = new JPanel(new BorderLayout());
    axisPane.add(createGraphXAxisPane(), BorderLayout.WEST);
    axisPane.add(createGraphYAxisPane(), BorderLayout.CENTER);
    settingsPane.add(axisPane);
    settingsPane.add(createLegendPane());
    //$NON-NLS-1$
    tabbedGraph.addTab(JMeterUtils.getResString("aggregate_graph_tab_settings"), settingsPane);
    //$NON-NLS-1$
    tabbedGraph.addTab(JMeterUtils.getResString("aggregate_graph_tab_graph"), graphPanel);
    // If clic on the Graph tab, make the graph (without apply interval or filter)
    ChangeListener changeListener = new ChangeListener() {

        @Override
        public void stateChanged(ChangeEvent changeEvent) {
            JTabbedPane srcTab = (JTabbedPane) changeEvent.getSource();
            int index = srcTab.getSelectedIndex();
            if (srcTab.getTitleAt(index).equals(JMeterUtils.getResString("aggregate_graph_tab_graph"))) {
                //$NON-NLS-1$
                actionMakeGraph();
            }
        }
    };
    tabbedGraph.addChangeListener(changeListener);
    this.add(mainPanel, BorderLayout.NORTH);
    this.add(tabbedGraph, BorderLayout.CENTER);
}
Also used : JPanel(javax.swing.JPanel) VerticalPanel(org.apache.jmeter.gui.util.VerticalPanel) BorderLayout(java.awt.BorderLayout) ChangeEvent(javax.swing.event.ChangeEvent) BoxLayout(javax.swing.BoxLayout) JTabbedPane(javax.swing.JTabbedPane) ChangeListener(javax.swing.event.ChangeListener) Dimension(java.awt.Dimension) EmptyBorder(javax.swing.border.EmptyBorder) Border(javax.swing.border.Border) EmptyBorder(javax.swing.border.EmptyBorder)

Example 20 with VerticalPanel

use of org.apache.jmeter.gui.util.VerticalPanel in project jmeter by apache.

the class ProxyControlGui method init.

private void init() {
    // WARNING: called from ctor so must not be overridden (i.e. must be private or final)
    setLayout(new BorderLayout(0, 5));
    setBorder(makeBorder());
    add(makeTitlePanel(), BorderLayout.NORTH);
    JPanel mainPanel = new JPanel(new BorderLayout());
    mainPanel.add(createControls(), BorderLayout.NORTH);
    JTabbedPane tabbedPane = new JTabbedPane();
    JPanel testPlanPanel = new VerticalPanel();
    testPlanPanel.add(createTestPlanContentPanel());
    testPlanPanel.add(Box.createVerticalStrut(5));
    testPlanPanel.add(createHTTPSamplerPanel());
    tabbedPane.add(JMeterUtils.getResString("proxy_test_plan_creation"), testPlanPanel);
    JPanel filteringPanel = new VerticalPanel();
    tabbedPane.add(JMeterUtils.getResString("proxy_test_plan_filtering"), filteringPanel);
    filteringPanel.add(createContentTypePanel());
    filteringPanel.add(createIncludePanel());
    filteringPanel.add(createExcludePanel());
    filteringPanel.add(createNotifyListenersPanel());
    JPanel vPanel = new VerticalPanel();
    vPanel.add(createPortPanel());
    vPanel.add(Box.createVerticalStrut(5));
    vPanel.add(tabbedPane);
    mainPanel.add(vPanel, BorderLayout.CENTER);
    add(mainPanel, BorderLayout.CENTER);
}
Also used : JPanel(javax.swing.JPanel) VerticalPanel(org.apache.jmeter.gui.util.VerticalPanel) BorderLayout(java.awt.BorderLayout) JTabbedPane(javax.swing.JTabbedPane)

Aggregations

VerticalPanel (org.apache.jmeter.gui.util.VerticalPanel)46 BorderLayout (java.awt.BorderLayout)30 JPanel (javax.swing.JPanel)23 JCheckBox (javax.swing.JCheckBox)13 JLabel (javax.swing.JLabel)12 HorizontalPanel (org.apache.jmeter.gui.util.HorizontalPanel)11 JTextField (javax.swing.JTextField)9 Dimension (java.awt.Dimension)5 JTabbedPane (javax.swing.JTabbedPane)5 JLabeledTextField (org.apache.jorphan.gui.JLabeledTextField)5 BoxLayout (javax.swing.BoxLayout)4 JButton (javax.swing.JButton)4 Border (javax.swing.border.Border)3 EmptyBorder (javax.swing.border.EmptyBorder)3 LoginConfigGui (org.apache.jmeter.config.gui.LoginConfigGui)3 FlowLayout (java.awt.FlowLayout)2 Font (java.awt.Font)2 GridBagConstraints (java.awt.GridBagConstraints)2 GridBagLayout (java.awt.GridBagLayout)2 ArrayList (java.util.ArrayList)2