Search in sources :

Example 36 with JCheckBox

use of javax.swing.JCheckBox in project zaproxy by zaproxy.

the class CustomScanDialog method populateRequestField.

private void populateRequestField(SiteNode node) {
    try {
        if (node == null || node.getHistoryReference() == null || node.getHistoryReference().getHttpMessage() == null) {
            this.getRequestField().setText("");
        } else {
            // Populate the custom vectors http pane
            HttpMessage msg = node.getHistoryReference().getHttpMessage();
            String header = msg.getRequestHeader().toString();
            StringBuilder sb = new StringBuilder();
            sb.append(header);
            this.headerLength = header.length();
            // Ignore <METHOD> http(s)://host:port/
            this.urlPathStart = header.indexOf("/", header.indexOf("://") + 2) + 1;
            sb.append(msg.getRequestBody().toString());
            this.getRequestField().setText(sb.toString());
            // Only set the recurse option if the node has children, and disable it otherwise
            JCheckBox recurseChk = (JCheckBox) this.getField(FIELD_RECURSE);
            recurseChk.setEnabled(node.getChildCount() > 0);
            recurseChk.setSelected(node.getChildCount() > 0);
        }
        this.setFieldStates();
    } catch (HttpMalformedHeaderException | DatabaseException e) {
        // 
        this.getRequestField().setText("");
    }
}
Also used : JCheckBox(javax.swing.JCheckBox) HttpMalformedHeaderException(org.parosproxy.paros.network.HttpMalformedHeaderException) HttpMessage(org.parosproxy.paros.network.HttpMessage) DatabaseException(org.parosproxy.paros.db.DatabaseException)

Example 37 with JCheckBox

use of javax.swing.JCheckBox in project zaproxy by zaproxy.

the class OptionsVariantPanel method getChkRPCXML.

private JCheckBox getChkRPCXML() {
    if (chkRPCXML == null) {
        chkRPCXML = new JCheckBox();
        chkRPCXML.setText(Constant.messages.getString("variant.options.rpc.xml.label"));
    }
    return chkRPCXML;
}
Also used : JCheckBox(javax.swing.JCheckBox)

Example 38 with JCheckBox

use of javax.swing.JCheckBox in project zaproxy by zaproxy.

the class OptionsVariantPanel method getChkInjectableHeadersAllRequests.

private JCheckBox getChkInjectableHeadersAllRequests() {
    if (chkInjectableHeadersAllRequests == null) {
        chkInjectableHeadersAllRequests = new JCheckBox();
        chkInjectableHeadersAllRequests.setText(Constant.messages.getString("variant.options.injectable.headersAllRequests.label"));
        chkInjectableHeadersAllRequests.setToolTipText(Constant.messages.getString("variant.options.injectable.headersAllRequests.toolTip"));
    }
    return chkInjectableHeadersAllRequests;
}
Also used : JCheckBox(javax.swing.JCheckBox)

Example 39 with JCheckBox

use of javax.swing.JCheckBox in project zaproxy by zaproxy.

the class OptionsVariantPanel method getChkRPCJSON.

private JCheckBox getChkRPCJSON() {
    if (chkRPCJSON == null) {
        chkRPCJSON = new JCheckBox();
        chkRPCJSON.setText(Constant.messages.getString("variant.options.rpc.json.label"));
    }
    return chkRPCJSON;
}
Also used : JCheckBox(javax.swing.JCheckBox)

Example 40 with JCheckBox

use of javax.swing.JCheckBox in project zaproxy by zaproxy.

the class OptionsVariantPanel method getChkInjectableCookie.

private JCheckBox getChkInjectableCookie() {
    if (chkInjectableCookie == null) {
        chkInjectableCookie = new JCheckBox();
        chkInjectableCookie.setText(Constant.messages.getString("variant.options.injectable.cookie.label"));
    }
    return chkInjectableCookie;
}
Also used : JCheckBox(javax.swing.JCheckBox)

Aggregations

JCheckBox (javax.swing.JCheckBox)491 JPanel (javax.swing.JPanel)199 JLabel (javax.swing.JLabel)155 JButton (javax.swing.JButton)108 ActionEvent (java.awt.event.ActionEvent)98 ActionListener (java.awt.event.ActionListener)93 JTextField (javax.swing.JTextField)88 GridBagConstraints (java.awt.GridBagConstraints)82 GridBagLayout (java.awt.GridBagLayout)77 Insets (java.awt.Insets)66 BorderLayout (java.awt.BorderLayout)63 Dimension (java.awt.Dimension)59 BoxLayout (javax.swing.BoxLayout)56 JScrollPane (javax.swing.JScrollPane)38 ItemEvent (java.awt.event.ItemEvent)37 ItemListener (java.awt.event.ItemListener)34 FlowLayout (java.awt.FlowLayout)33 JComboBox (javax.swing.JComboBox)33 JRadioButton (javax.swing.JRadioButton)32 Box (javax.swing.Box)30