Search in sources :

Example 26 with ZapTextField

use of org.zaproxy.zap.utils.ZapTextField in project zaproxy by zaproxy.

the class DialogAddAutoTagScanner method getResponseBodyRegexTextField.

protected ZapTextField getResponseBodyRegexTextField() {
    if (responseBodyRegexTextField == null) {
        responseBodyRegexTextField = new ZapTextField();
        responseBodyRegexTextField.getDocument().addDocumentListener(getConfirmButtonValidatorDocListener());
    }
    return responseBodyRegexTextField;
}
Also used : ZapTextField(org.zaproxy.zap.utils.ZapTextField)

Example 27 with ZapTextField

use of org.zaproxy.zap.utils.ZapTextField in project zaproxy by zaproxy.

the class DialogAddAutoTagScanner method getRequestHeaderRegexTextField.

protected ZapTextField getRequestHeaderRegexTextField() {
    if (requestHeaderRegexTextField == null) {
        requestHeaderRegexTextField = new ZapTextField();
        requestHeaderRegexTextField.getDocument().addDocumentListener(getConfirmButtonValidatorDocListener());
    }
    return requestHeaderRegexTextField;
}
Also used : ZapTextField(org.zaproxy.zap.utils.ZapTextField)

Example 28 with ZapTextField

use of org.zaproxy.zap.utils.ZapTextField in project zaproxy by zaproxy.

the class DialogAddAutoTagScanner method getNameTextField.

protected ZapTextField getNameTextField() {
    if (nameTextField == null) {
        nameTextField = new ZapTextField(25);
        nameTextField.getDocument().addDocumentListener(getConfirmButtonValidatorDocListener());
    }
    return nameTextField;
}
Also used : ZapTextField(org.zaproxy.zap.utils.ZapTextField)

Example 29 with ZapTextField

use of org.zaproxy.zap.utils.ZapTextField in project zaproxy by zaproxy.

the class DriversView method initComponents.

/**
	 * This method is called from within the constructor to initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is always
	 * regenerated by the Form Editor.
	 */
private void initComponents() {
    fileLabel = new JLabel();
    fileTextField = new ZapTextField();
    browseButton = new JButton();
    nameLabel = new JLabel();
    nameTextField = new ZapTextField();
    slotLabel = new JLabel();
    slotTextField = new ZapTextField();
    slotListIndexLabel = new JLabel();
    slotListIndexTextField = new ZapTextField();
    addButton = new JButton();
    deleteButton = new JButton();
    closeButton = new JButton();
    driverScrollPane = new JScrollPane();
    driverTable = new JTable();
    setTitle(Constant.messages.getString("certificates.pkcs11.drivers.title"));
    fileLabel.setText(Constant.messages.getString("certificates.pkcs11.drivers.label.path"));
    browseButton.setText(Constant.messages.getString("certificates.pkcs11.drivers.button.browse"));
    browseButton.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent evt) {
            browseButtonActionPerformed(evt);
        }
    });
    nameLabel.setText(Constant.messages.getString("certificates.pkcs11.drivers.label.name"));
    slotLabel.setText(Constant.messages.getString("certificates.pkcs11.drivers.label.slot"));
    slotListIndexLabel.setText(Constant.messages.getString("certificates.pkcs11.drivers.label.slotIndex"));
    addButton.setText(Constant.messages.getString("certificates.pkcs11.drivers.button.add"));
    addButton.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent evt) {
            addButtonActionPerformed(evt);
        }
    });
    deleteButton.setText(Constant.messages.getString("certificates.pkcs11.drivers.button.delete"));
    deleteButton.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent evt) {
            deleteButtonActionPerformed(evt);
        }
    });
    closeButton.setText(Constant.messages.getString("certificates.pkcs11.drivers.button.close"));
    closeButton.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent evt) {
            closeButtonActionPerformed(evt);
        }
    });
    driverTable.setModel(driverTableModel);
    driverScrollPane.setViewportView(driverTable);
    // as only one of these parameters is actually used.
    if (!Model.getSingleton().getOptionsParam().getExperimentalFeaturesParam().isExerimentalSliSupportEnabled()) {
        slotTextField.setEnabled(false);
    }
    final GroupLayout layout = new GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(fileLabel).addComponent(nameLabel).addComponent(slotLabel).addComponent(slotListIndexLabel).addGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(GroupLayout.Alignment.TRAILING, false).addComponent(nameTextField, GroupLayout.Alignment.LEADING).addComponent(slotTextField, GroupLayout.Alignment.LEADING).addComponent(slotListIndexTextField, GroupLayout.Alignment.LEADING).addComponent(fileTextField, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 322, Short.MAX_VALUE)).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(addButton, GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE).addComponent(browseButton)))).addContainerGap(165, Short.MAX_VALUE)).addGroup(GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addGap(499, 499, 499).addComponent(closeButton, GroupLayout.DEFAULT_SIZE, 74, Short.MAX_VALUE).addContainerGap()).addGroup(layout.createSequentialGroup().addContainerGap().addComponent(driverScrollPane, GroupLayout.DEFAULT_SIZE, 561, Short.MAX_VALUE).addContainerGap()).addGroup(GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap(499, Short.MAX_VALUE).addComponent(deleteButton).addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap().addComponent(fileLabel).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING, false).addComponent(browseButton, 0, 0, Short.MAX_VALUE).addComponent(fileTextField)).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(nameLabel).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(nameTextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(slotLabel).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(slotTextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)).addGap(28, 28, 28).addComponent(slotListIndexLabel).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(slotListIndexTextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE).addComponent(addButton, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE)).addGap(28, 28, 28).addComponent(driverScrollPane, GroupLayout.PREFERRED_SIZE, 195, GroupLayout.PREFERRED_SIZE).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(deleteButton).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 9, Short.MAX_VALUE).addComponent(closeButton, GroupLayout.PREFERRED_SIZE, 10, GroupLayout.PREFERRED_SIZE).addContainerGap()));
    layout.linkSize(SwingConstants.VERTICAL, new Component[] { addButton, browseButton, closeButton, deleteButton, fileTextField, nameTextField });
    for (int i = 0; i < driverTableModel.getColumnCount(); i++) {
        driverTable.getColumnModel().getColumn(i).setPreferredWidth(driverTableModel.getPreferredWith(i));
    }
    pack();
}
Also used : JScrollPane(javax.swing.JScrollPane) ActionListener(java.awt.event.ActionListener) ZapTextField(org.zaproxy.zap.utils.ZapTextField) ActionEvent(java.awt.event.ActionEvent) JTable(javax.swing.JTable) JButton(javax.swing.JButton) GroupLayout(javax.swing.GroupLayout) JLabel(javax.swing.JLabel)

Example 30 with ZapTextField

use of org.zaproxy.zap.utils.ZapTextField in project zaproxy by zaproxy.

the class FindDialog method getTxtFind.

/**
	 * This method initializes txtFind	
	 * 	
	 * @return org.zaproxy.zap.utils.ZapTextField	
	 */
private ZapTextField getTxtFind() {
    if (txtFind == null) {
        txtFind = new ZapTextField();
        txtFind.setMinimumSize(new java.awt.Dimension(120, 24));
        txtFind.setPreferredSize(new java.awt.Dimension(120, 24));
    }
    return txtFind;
}
Also used : ZapTextField(org.zaproxy.zap.utils.ZapTextField)

Aggregations

ZapTextField (org.zaproxy.zap.utils.ZapTextField)33 ActionEvent (java.awt.event.ActionEvent)8 ActionListener (java.awt.event.ActionListener)8 DocumentEvent (javax.swing.event.DocumentEvent)7 DocumentListener (javax.swing.event.DocumentListener)7 GridBagLayout (java.awt.GridBagLayout)6 JPanel (javax.swing.JPanel)6 JButton (javax.swing.JButton)5 Insets (java.awt.Insets)4 ImageIcon (javax.swing.ImageIcon)3 JLabel (javax.swing.JLabel)3 KeyEvent (java.awt.event.KeyEvent)2 JScrollPane (javax.swing.JScrollPane)2 SiteNode (org.parosproxy.paros.model.SiteNode)2 KeyAdapter (java.awt.event.KeyAdapter)1 KeyListener (java.awt.event.KeyListener)1 File (java.io.File)1 GroupLayout (javax.swing.GroupLayout)1 JFileChooser (javax.swing.JFileChooser)1 JPasswordField (javax.swing.JPasswordField)1