Search in sources :

Example 1 with HC4CookieHandler

use of org.apache.jmeter.protocol.http.control.HC4CookieHandler 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

BorderLayout (java.awt.BorderLayout)1 FlowLayout (java.awt.FlowLayout)1 JCheckBox (javax.swing.JCheckBox)1 JPanel (javax.swing.JPanel)1 PowerTableModel (org.apache.jmeter.gui.util.PowerTableModel)1 HC4CookieHandler (org.apache.jmeter.protocol.http.control.HC4CookieHandler)1 JLabeledChoice (org.apache.jorphan.gui.JLabeledChoice)1 VerticalLayout (org.apache.jorphan.gui.layout.VerticalLayout)1