Search in sources :

Example 6 with ZapTextArea

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

the class SplashScreen method getLogPanel.

private ZapTextArea getLogPanel() {
    if (logPanel == null) {
        logPanel = new ZapTextArea();
        logPanel.setEditable(false);
        logPanel.setLineWrap(true);
        logPanel.setName("");
        logPanel.append(Constant.messages.getString("start.splash.start"));
    }
    return logPanel;
}
Also used : ZapTextArea(org.zaproxy.zap.utils.ZapTextArea)

Example 7 with ZapTextArea

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

the class StandardFieldsDialog method addMultilineField.

public void addMultilineField(int tabIndex, String fieldLabel, String value) {
    if (!isTabbed()) {
        throw new IllegalArgumentException("Not initialised as a tabbed dialog - must use method without tab parameters");
    }
    if (tabIndex < 0 || tabIndex >= this.tabPanels.size()) {
        throw new IllegalArgumentException("Invalid tab index: " + tabIndex);
    }
    ZapTextArea field = new ZapTextArea();
    field.setLineWrap(true);
    JScrollPane scrollPane = new JScrollPane();
    scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
    scrollPane.setViewportView(field);
    if (value != null) {
        field.setText(value);
    }
    this.addField(this.tabPanels.get(tabIndex), this.tabOffsets.get(tabIndex), fieldLabel, field, scrollPane, 1.0D);
    this.incTabOffset(tabIndex);
}
Also used : JScrollPane(javax.swing.JScrollPane) ZapTextArea(org.zaproxy.zap.utils.ZapTextArea)

Example 8 with ZapTextArea

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

the class StandardFieldsDialog method addMultilineField.

public void addMultilineField(String fieldLabel, String value) {
    if (isTabbed()) {
        throw new IllegalArgumentException("Initialised as a tabbed dialog - must use method with tab parameters");
    }
    ZapTextArea field = new ZapTextArea();
    field.setLineWrap(true);
    JScrollPane scrollPane = new JScrollPane();
    scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
    scrollPane.setViewportView(field);
    if (value != null) {
        field.setText(value);
    }
    this.addField(fieldLabel, field, scrollPane, 1.0D);
}
Also used : JScrollPane(javax.swing.JScrollPane) ZapTextArea(org.zaproxy.zap.utils.ZapTextArea)

Example 9 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)

Example 10 with ZapTextArea

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

the class EncodeDecodeDialog method newField.

private ZapTextArea newField(boolean editable) {
    final ZapTextArea field = new ZapTextArea();
    field.setLineWrap(true);
    field.setBorder(BorderFactory.createEtchedBorder());
    field.setEditable(editable);
    field.setName(ENCODE_DECODE_RESULTFIELD);
    field.addMouseListener(new java.awt.event.MouseAdapter() {

        @Override
        public void mousePressed(java.awt.event.MouseEvent e) {
            if (SwingUtilities.isRightMouseButton(e)) {
                View.getSingleton().getPopupMenu().show(e.getComponent(), e.getX(), e.getY());
            }
        }
    });
    return field;
}
Also used : ZapTextArea(org.zaproxy.zap.utils.ZapTextArea)

Aggregations

ZapTextArea (org.zaproxy.zap.utils.ZapTextArea)14 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