Search in sources :

Example 1 with ZapTextArea

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

the class CertificateView 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() {
    closeButton = new JButton();
    certificateScrollPane = new JScrollPane();
    certificateTextArea = new ZapTextArea();
    //TODO: Constant for messages.properties
    setTitle("Certificate");
    //TODO: Constant for messages.properties
    closeButton.setText("Close");
    closeButton.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent evt) {
            closeButtonActionPerformed(evt);
        }
    });
    certificateScrollPane.setViewportView(certificateTextArea);
    GroupLayout layout = new GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap().addGroup(layout.createParallelGroup(GroupLayout.Alignment.TRAILING).addComponent(closeButton, GroupLayout.PREFERRED_SIZE, 93, GroupLayout.PREFERRED_SIZE).addComponent(certificateScrollPane, GroupLayout.DEFAULT_SIZE, 658, Short.MAX_VALUE)).addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap().addComponent(certificateScrollPane, GroupLayout.DEFAULT_SIZE, 439, Short.MAX_VALUE).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(closeButton).addContainerGap()));
    pack();
}
Also used : JScrollPane(javax.swing.JScrollPane) ActionListener(java.awt.event.ActionListener) ActionEvent(java.awt.event.ActionEvent) JButton(javax.swing.JButton) GroupLayout(javax.swing.GroupLayout) ZapTextArea(org.zaproxy.zap.utils.ZapTextArea)

Example 2 with ZapTextArea

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

the class AlertViewPanel method createZapTextArea.

private ZapTextArea createZapTextArea() {
    ZapTextArea ZapTextArea = new ZapTextArea(3, 30);
    ZapTextArea.setLineWrap(true);
    ZapTextArea.setWrapStyleWord(true);
    ZapTextArea.setEditable(editable);
    return ZapTextArea;
}
Also used : ZapTextArea(org.zaproxy.zap.utils.ZapTextArea)

Example 3 with ZapTextArea

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

the class OutputPanel method getTxtOutput.

/**
 * This method initializes txtOutput
 *
 * @return org.zaproxy.zap.utils.ZapTextArea
 */
private ZapTextArea getTxtOutput() {
    if (txtOutput == null) {
        txtOutput = new ZapTextArea();
        txtOutput.setEditable(false);
        txtOutput.setLineWrap(true);
        txtOutput.setName("");
        txtOutput.addMouseListener(new java.awt.event.MouseAdapter() {

            @Override
            public void mousePressed(java.awt.event.MouseEvent e) {
                showPopupMenuIfTriggered(e);
            }

            @Override
            public void mouseReleased(java.awt.event.MouseEvent e) {
                showPopupMenuIfTriggered(e);
            }

            private void showPopupMenuIfTriggered(java.awt.event.MouseEvent e) {
                if (e.isPopupTrigger()) {
                    View.getSingleton().getPopupMenu().show(e.getComponent(), e.getX(), e.getY());
                }
            }
        });
    }
    return txtOutput;
}
Also used : ZapTextArea(org.zaproxy.zap.utils.ZapTextArea)

Example 4 with ZapTextArea

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

the class SessionGeneralPanel method getSessionLocation.

private ZapTextArea getSessionLocation() {
    if (location == null) {
        location = new ZapTextArea();
        location.setEditable(false);
    }
    return location;
}
Also used : ZapTextArea(org.zaproxy.zap.utils.ZapTextArea)

Example 5 with ZapTextArea

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

the class DialogEditRuleConfig method init.

public void init(RuleConfig rc, RuleConfigTableModel model) {
    this.rc = rc;
    this.model = model;
    this.removeAllFields();
    this.addReadOnlyField(FIELD_KEY, rc.getKey(), false);
    this.addReadOnlyField(FIELD_DEFAULT, rc.getDefaultValue(), false);
    this.addTextField(FIELD_VALUE, rc.getValue());
    String desc = "";
    if (Constant.messages.containsKey(rc.getKey())) {
        desc = Constant.messages.getString(rc.getKey());
    }
    this.addMultilineField(FIELD_DESC, desc);
    ZapTextArea descField = (ZapTextArea) this.getField(FIELD_DESC);
    descField.setEditable(false);
    descField.setWrapStyleWord(true);
}
Also used : ZapTextArea(org.zaproxy.zap.utils.ZapTextArea)

Aggregations

ZapTextArea (org.zaproxy.zap.utils.ZapTextArea)15 JScrollPane (javax.swing.JScrollPane)3 ActionEvent (java.awt.event.ActionEvent)1 ActionListener (java.awt.event.ActionListener)1 GroupLayout (javax.swing.GroupLayout)1 JButton (javax.swing.JButton)1