Package org.apache.jmeter.gui.util

Examples of org.apache.jmeter.gui.util.HorizontalPanel


        binaryMode = new JCheckBox(JMeterUtils.getResString("ftp_binary_mode")); //$NON-NLS-1$
        saveResponseData = new JCheckBox(JMeterUtils.getResString("ftp_save_response_data")); //$NON-NLS-1$


        JPanel optionsPanel = new HorizontalPanel();
        optionsPanel.add(getBox);
        optionsPanel.add(putBox);
        optionsPanel.add(binaryMode);
        optionsPanel.add(saveResponseData);
        return optionsPanel;
    }
View Full Code Here


            add(makeTitlePanel(), BorderLayout.NORTH);
        }

        // MAIN PANEL
        VerticalPanel mainPanel = new VerticalPanel();
        JPanel serverPanel = new HorizontalPanel();
        serverPanel.add(createServerPanel(), BorderLayout.CENTER);
        serverPanel.add(getPortPanel(), BorderLayout.EAST);
        mainPanel.add(serverPanel);
        mainPanel.add(createRemoteFilenamePanel());
        mainPanel.add(createLocalFilenamePanel());
        mainPanel.add(createLocalFileContentsPanel());
        mainPanel.add(createOptionsPanel());
View Full Code Here

        // USER_INPUT
        VerticalPanel assertionPanel = new VerticalPanel();
        assertionPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Tidy Settings"));

        // doctype
        HorizontalPanel docTypePanel = new HorizontalPanel();
        docTypeBox = new JComboBox(new Object[] { "omit", "auto", "strict", "loose" });
        // docTypePanel.add(new
        // JLabel(JMeterUtils.getResString("duration_assertion_label"))); //$NON-NLS-1$
        docTypePanel.add(new JLabel("Doctype:"));
        docTypePanel.add(docTypeBox);
        assertionPanel.add(docTypePanel);

        // format (HMTL, XHTML, XML)
        VerticalPanel formatPanel = new VerticalPanel();
        formatPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Format"));
        htmlRadioButton = new JRadioButton("HTML", true); //$NON-NLS-1$
        xhtmlRadioButton = new JRadioButton("XHTML", false); //$NON-NLS-1$
        xmlRadioButton = new JRadioButton("XML", false); //$NON-NLS-1$
        ButtonGroup buttonGroup = new ButtonGroup();
        buttonGroup.add(htmlRadioButton);
        buttonGroup.add(xhtmlRadioButton);
        buttonGroup.add(xmlRadioButton);
        formatPanel.add(htmlRadioButton);
        formatPanel.add(xhtmlRadioButton);
        formatPanel.add(xmlRadioButton);
        assertionPanel.add(formatPanel);

        // errors only
        errorsOnly = new JCheckBox("Errors only", false);
        errorsOnly.addActionListener(this);
        assertionPanel.add(errorsOnly);

        // thresholds
        HorizontalPanel thresholdPanel = new HorizontalPanel();
        thresholdPanel.add(new JLabel("Error threshold:"));
        errorThresholdField = new JTextField("0", 5); // $NON-NLS-1$
        errorThresholdField.setName(ERROR_THRESHOLD_FIELD);
        errorThresholdField.addKeyListener(this);
        thresholdPanel.add(errorThresholdField);
        thresholdPanel.add(new JLabel("Warning threshold:"));
        warningThresholdField = new JTextField("0", 5); // $NON-NLS-1$
        warningThresholdField.setName(WARNING_THRESHOLD_FIELD);
        warningThresholdField.addKeyListener(this);
        thresholdPanel.add(warningThresholdField);
        assertionPanel.add(thresholdPanel);

        // file panel
        filePanel = new FilePanel(JMeterUtils.getResString("html_assertion_file"), ".txt"); //$NON-NLS-1$ //$NON-NLS-2$
        assertionPanel.add(filePanel);
View Full Code Here

        JPanel gPane = new JPanel(new BorderLayout());
        gPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),
                JMeterUtils.getResString("proxy_general_settings"))); // $NON-NLS-1$

        HorizontalPanel panel = new HorizontalPanel();
        panel.add(label);
        panel.add(portField);
        panel.add(Box.createHorizontalStrut(10));

        gPane.add(panel, BorderLayout.WEST);

        sslDomains = new JLabeledTextField(JMeterUtils.getResString("proxy_domains")); // $NON-NLS-1$
        sslDomains.setEnabled(ProxyControl.isDynamicMode());
View Full Code Here

        setLayout(new VerticalLayout(5, VerticalLayout.BOTH, VerticalLayout.TOP));
        setBorder(makeBorder());
        add(makeTitlePanel());

        // Target
        HorizontalPanel targetPanel = new HorizontalPanel();
        targetPanel.add(new JLabel(targetLabel));
        DefaultComboBoxModel targetModel = new DefaultComboBoxModel();
        targetModel.addElement(threadTarget);
        targetModel.addElement(testTarget);
        targetBox = new JComboBox(targetModel);
        targetBox.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                if (((String) targetBox.getSelectedItem()).equals(threadTarget)) {
                    target = TestAction.THREAD;
                } else {
                    target = TestAction.TEST;
                }
            }
        });
        targetPanel.add(targetBox);
        add(targetPanel);

        // Action
        HorizontalPanel actionPanel = new HorizontalPanel();
        ButtonGroup actionButtons = new ButtonGroup();
        pauseButton = new JRadioButton(pauseAction, true);
        pauseButton.addChangeListener(new ChangeListener() {
            @Override
            public void stateChanged(ChangeEvent e) {
                if (pauseButton.isSelected()) {
                    action = TestAction.PAUSE;
                    durationField.setEnabled(true);
                    targetBox.setEnabled(true);
                }

            }
        });
        stopButton = new JRadioButton(stopAction, false);
        stopButton.addChangeListener(new ChangeListener() {
            @Override
            public void stateChanged(ChangeEvent e) {
                if (stopButton.isSelected()) {
                    action = TestAction.STOP;
                    durationField.setEnabled(false);
                    targetBox.setEnabled(true);
                }
            }
        });
        stopNowButton = new JRadioButton(stopNowAction, false);
        stopNowButton.addChangeListener(new ChangeListener() {
            @Override
            public void stateChanged(ChangeEvent e) {
                if (stopNowButton.isSelected()) {
                    action = TestAction.STOP_NOW;
                    durationField.setEnabled(false);
                    targetBox.setEnabled(true);
                }
            }
        });
       
        restartNextLoopButton = new JRadioButton(restartNextLoopAction, false);
        restartNextLoopButton.addChangeListener(new ChangeListener() {
            @Override
            public void stateChanged(ChangeEvent e) {
                if (restartNextLoopButton.isSelected()) {
                    action = TestAction.RESTART_NEXT_LOOP;
                    durationField.setEnabled(false);
                    targetBox.setSelectedIndex(TestAction.THREAD);
                    targetBox.setEnabled(false);
                }
            }
        });
       
        actionButtons.add(pauseButton);
        actionButtons.add(stopButton);
        actionButtons.add(stopNowButton);
        actionButtons.add(restartNextLoopButton);

        actionPanel.add(new JLabel(actionLabel));
        actionPanel.add(pauseButton);
        actionPanel.add(stopButton);
        actionPanel.add(stopNowButton);
        actionPanel.add(restartNextLoopButton);
        add(actionPanel);

        // Duration
        HorizontalPanel durationPanel = new HorizontalPanel();
        durationField = new JTextField(15);
        durationField.setText(""); // $NON-NLS-1$
        durationPanel.add(new JLabel(durationLabel));
        durationPanel.add(durationField);
        add(durationPanel);
    }
View Full Code Here

        setLayout(new BorderLayout(5, 0));
        setBorder(BorderFactory.createTitledBorder(JMeterUtils.getResString("sample_scope"))); //$NON-NLS-1$

        parentButton.setSelected(true);

        JPanel buttonPanel = new HorizontalPanel();
        ButtonGroup group = new ButtonGroup();
        if(allButton != null) {
            group.add(allButton);
            buttonPanel.add(allButton);
        }
        group.add(parentButton);
        buttonPanel.add(parentButton);
        if(childButton != null) {
            group.add(childButton);
            buttonPanel.add(childButton);
        }
       
        if (variableButton != null){
            variableButton.addActionListener(this);
            group.add(variableButton);
            buttonPanel.add(variableButton);
            buttonPanel.add(variableName);
        }
        add(buttonPanel);
    }
View Full Code Here

        classnameCombo = new JComboBox(possibleClasses.toArray());
        classnameCombo.addActionListener(this);
        classnameCombo.setEditable(false);
        label.setLabelFor(classnameCombo);

        HorizontalPanel panel = new HorizontalPanel();
        panel.add(label);
        panel.add(classnameCombo);

        return panel;
    }
View Full Code Here

        panel.add(field, BorderLayout.CENTER);
        return panel;
    }

    private JPanel getParameterMaskPanel() {
        HorizontalPanel panel = new HorizontalPanel(10, Component.TOP_ALIGNMENT);
        panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),
                JMeterUtils.getResString("html_parameter_mask"))); //$NON-NLS-1$

        _fieldName = new JTextField(10);
        _fieldName.setName(NAME);
        panel.add(createLabeledField("name", _fieldName)); //$NON-NLS-1$ resource name

        _prefix = new JTextField(5);
        _prefix.setName(PREFIX);
        panel.add(createLabeledField("id_prefix", _prefix)); //$NON-NLS-1$ resource name

        _lowerBound = new JTextField(ZERO, 5);
        _lowerBound.addFocusListener(this);
        _lowerBound.setName(LOWERBOUND);
        panel.add(createLabeledField("lower_bound", _lowerBound)); //$NON-NLS-1$ resource name

        _upperBound = new JTextField("10", 5);
        _upperBound.addFocusListener(this);
        _upperBound.setName(UPPERBOUND);
        panel.add(createLabeledField("upper_bound", _upperBound)); //$NON-NLS-1$ resource name

        _increment = new JTextField("1", 3);
        _increment.addFocusListener(this);
        _increment.setName(INCREMENT);
        panel.add(createLabeledField("increment", _increment)); //$NON-NLS-1$ resource name

        _suffix = new JTextField(5);
        _suffix.setName(SUFFIX);
        panel.add(createLabeledField("id_suffix", _suffix)); //$NON-NLS-1$ resource name

        JPanel mainPanel = new JPanel(new BorderLayout());
        mainPanel.add(panel, BorderLayout.NORTH);
        return mainPanel;
    }
View Full Code Here

        VerticalPanel mainPanel = new VerticalPanel();
        mainPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),
                JMeterUtils.getResString("proxy_test_plan_content"))); // $NON-NLS-1$

        HorizontalPanel nodeCreationPanel = new HorizontalPanel();
        nodeCreationPanel.add(createGroupingPanel());
        nodeCreationPanel.add(httpHeaders);
        nodeCreationPanel.add(addAssertions);
        nodeCreationPanel.add(regexMatch);

        HorizontalPanel targetPanel = new HorizontalPanel();
        targetPanel.add(createTargetPanel());
        mainPanel.add(targetPanel);
        mainPanel.add(nodeCreationPanel);

        return mainPanel;
    }
View Full Code Here

        samplerDownloadImages = new JCheckBox(JMeterUtils.getResString("web_testing_retrieve_images")); // $NON-NLS-1$
        samplerDownloadImages.setSelected(false);
        samplerDownloadImages.addActionListener(this);
        samplerDownloadImages.setActionCommand(ENABLE_RESTART);

        HorizontalPanel panel = new HorizontalPanel();
        panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),
                JMeterUtils.getResString("proxy_sampler_settings"))); // $NON-NLS-1$
        panel.add(label2);
        panel.add(samplerTypeName);
        panel.add(samplerRedirectAutomatically);
        panel.add(samplerFollowRedirects);
        panel.add(useKeepAlive);
        panel.add(samplerDownloadImages);

        return panel;
    }
View Full Code Here

TOP

Related Classes of org.apache.jmeter.gui.util.HorizontalPanel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.