use of javax.swing.JScrollPane in project zaproxy by zaproxy.
the class EncodeDecodeDialog method addField.
private void addField(JPanel parent, int index, JComponent c, String title) {
final java.awt.GridBagConstraints gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = index;
gbc.insets = new java.awt.Insets(1, 1, 1, 1);
gbc.anchor = java.awt.GridBagConstraints.NORTHWEST;
gbc.fill = java.awt.GridBagConstraints.BOTH;
gbc.weightx = 0.5D;
gbc.weighty = 0.5D;
final JScrollPane jsp = new JScrollPane();
jsp.setViewportView(c);
jsp.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
jsp.setBorder(BorderFactory.createTitledBorder(null, title, TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, FontUtils.getFont(FontUtils.Size.standard), java.awt.Color.black));
parent.add(jsp, gbc);
}
use of javax.swing.JScrollPane in project zaproxy by zaproxy.
the class EncodeDecodeDialog method getJTabbed.
/**
* This method initializes jPanel
*
* @return javax.swing.JPanel
*/
private JPanel getJTabbed() {
if (jPanel == null) {
/*
jPanel = new JPanel();
jPanel.setPreferredSize(new java.awt.Dimension(800,600));
jPanel.setLayout(new GridBagLayout());
*/
// jPanel is the outside one
jPanel = new JPanel();
jPanel.setPreferredSize(new java.awt.Dimension(800, 600));
jPanel.setLayout(new GridBagLayout());
jTabbed = new JTabbedPane();
jTabbed.setPreferredSize(new java.awt.Dimension(800, 500));
final JPanel jPanel1 = new JPanel();
jPanel1.setLayout(new GridBagLayout());
final JPanel jPanel2 = new JPanel();
//jPanel2.setPreferredSize(new java.awt.Dimension(800,500));
jPanel2.setLayout(new GridBagLayout());
final JPanel jPanel3 = new JPanel();
//jPanel3.setPreferredSize(new java.awt.Dimension(800,500));
jPanel3.setLayout(new GridBagLayout());
final JPanel jPanel4 = new JPanel();
jPanel4.setLayout(new GridBagLayout());
// 3 tabs - Encode, Decode, Hash??
addField(jPanel1, 1, getBase64EncodeField(), Constant.messages.getString("enc2.label.b64Enc"));
addField(jPanel1, 2, getUrlEncodeField(), Constant.messages.getString("enc2.label.urlEnc"));
addField(jPanel1, 3, getAsciiHexEncodeField(), Constant.messages.getString("enc2.label.asciiEnc"));
addField(jPanel1, 4, getHTMLEncodeField(), Constant.messages.getString("enc2.label.HTMLEnc"));
addField(jPanel1, 5, getJavaScriptEncodeField(), Constant.messages.getString("enc2.label.JavaScriptEnc"));
addField(jPanel2, 1, getBase64DecodeField(), Constant.messages.getString("enc2.label.b64Dec"));
addField(jPanel2, 2, getUrlDecodeField(), Constant.messages.getString("enc2.label.urlDec"));
addField(jPanel2, 3, getAsciiHexDecodeField(), Constant.messages.getString("enc2.label.asciiDec"));
addField(jPanel2, 4, getHTMLDecodeField(), Constant.messages.getString("enc2.label.HTMLDec"));
addField(jPanel2, 5, getJavaScriptDecodeField(), Constant.messages.getString("enc2.label.JavaScriptDec"));
addField(jPanel3, 1, getSha1HashField(), Constant.messages.getString("enc2.label.sha1Hash"));
addField(jPanel3, 2, getMd5HashField(), Constant.messages.getString("enc2.label.md5Hash"));
addField(jPanel4, 1, getIllegalUTF82ByteField(), Constant.messages.getString("enc2.label.illegalUTF8.2byte"));
addField(jPanel4, 2, getIllegalUTF83ByteField(), Constant.messages.getString("enc2.label.illegalUTF8.3byte"));
addField(jPanel4, 3, getIllegalUTF84ByteField(), Constant.messages.getString("enc2.label.illegalUTF8.4byte"));
jTabbed.addTab(Constant.messages.getString("enc2.tab.encode"), jPanel1);
jTabbed.addTab(Constant.messages.getString("enc2.tab.decode"), jPanel2);
jTabbed.addTab(Constant.messages.getString("enc2.tab.hash"), jPanel3);
jTabbed.addTab(Constant.messages.getString("enc2.tab.illegalUTF8"), jPanel4);
final java.awt.GridBagConstraints gbc1 = new GridBagConstraints();
gbc1.gridx = 0;
gbc1.gridy = 1;
gbc1.insets = new java.awt.Insets(1, 1, 1, 1);
gbc1.anchor = java.awt.GridBagConstraints.NORTHWEST;
gbc1.fill = java.awt.GridBagConstraints.BOTH;
gbc1.weightx = 1.0D;
gbc1.weighty = 0.25D;
final java.awt.GridBagConstraints gbc2 = new GridBagConstraints();
gbc2.gridx = 0;
gbc2.gridy = 2;
gbc2.insets = new java.awt.Insets(1, 1, 1, 1);
gbc2.anchor = java.awt.GridBagConstraints.NORTHWEST;
gbc2.fill = java.awt.GridBagConstraints.BOTH;
gbc2.weightx = 1.0D;
gbc2.weighty = 1.0D;
final JScrollPane jsp = new JScrollPane();
jsp.setViewportView(getInputField());
jsp.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
jsp.setBorder(BorderFactory.createTitledBorder(null, Constant.messages.getString("enc2.label.text"), TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, FontUtils.getFont(FontUtils.Size.standard), java.awt.Color.black));
//addField(jPanel, 1, getInputField(), "Text to be encoded/decoded/hashed");
//addField(jPanel, 2, jTabbed, "Text to be encoded/decoded/hashed");
jPanel.add(jsp, gbc1);
jPanel.add(jTabbed, gbc2);
jPanel2.requestFocus();
}
return jPanel;
}
use of javax.swing.JScrollPane in project zaproxy by zaproxy.
the class OptionsExtensionPanel method getExtDescJScrollPane.
private JScrollPane getExtDescJScrollPane() {
if (extDescScrollPane == null) {
extDescScrollPane = new JScrollPane();
extDescScrollPane.setViewportView(extDescription);
extDescription.setEditable(false);
extDescription.setLineWrap(true);
}
return extDescScrollPane;
}
use of javax.swing.JScrollPane in project zaproxy by zaproxy.
the class ManageAddOnsDialog method getInstalledAddOnsPanel.
private JPanel getInstalledAddOnsPanel() {
if (installedAddOnsPanel == null) {
installedAddOnsPanel = new JPanel();
installedAddOnsPanel.setLayout(new GridBagLayout());
installedAddOnsPanel.setBorder(BorderFactory.createTitledBorder(null, Constant.messages.getString("cfu.label.addons.border"), TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, FontUtils.getFont(FontUtils.Size.standard), java.awt.Color.black));
getInstalledAddOnsTable();
JScrollPane scrollPane = new JScrollPane();
scrollPane.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
scrollPane.setViewportView(getInstalledAddOnsTable());
installedAddOnsFilterPanel = createFilterPanel(getInstalledAddOnsTable());
int row = 0;
installedAddOnsPanel.add(installedAddOnsFilterPanel, LayoutHelper.getGBC(0, row++, 5, 0.0D));
installedAddOnsPanel.add(scrollPane, LayoutHelper.getGBC(0, row++, 5, 1.0D, 1.0D));
installedAddOnsPanel.add(new JLabel(""), LayoutHelper.getGBC(0, row, 1, 1.0D));
installedAddOnsPanel.add(getUninstallButton(), LayoutHelper.getGBC(1, row, 1, 0.0D));
installedAddOnsPanel.add(getUpdateButton(), LayoutHelper.getGBC(2, row, 1, 0.0D));
installedAddOnsPanel.add(getUpdateAllButton(), LayoutHelper.getGBC(3, row, 1, 0.0D));
installedAddOnsPanel.add(getClose1Button(), LayoutHelper.getGBC(4, row, 1, 0.0D));
}
return installedAddOnsPanel;
}
use of javax.swing.JScrollPane in project zaproxy by zaproxy.
the class BreakpointsPanel method getJScrollPane.
private JScrollPane getJScrollPane() {
if (jScrollPane == null) {
jScrollPane = new JScrollPane();
jScrollPane.setViewportView(getBreakpoints());
}
return jScrollPane;
}
Aggregations