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;
}
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);
}
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);
}
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);
}
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;
}
Aggregations