Search in sources :

Example 96 with JLabel

use of javax.swing.JLabel in project zaproxy by zaproxy.

the class ActiveScanPanel method addToolBarElements.

@Override
protected int addToolBarElements(JToolBar panelToolbar, Location loc, int x) {
    // Override to add elements into the toolbar
    if (Location.start.equals(loc)) {
        panelToolbar.add(getPolicyManagerButton(), getGBC(x++, 0));
    }
    if (Location.beforeProgressBar.equals(loc)) {
        panelToolbar.add(getProgressButton(), getGBC(x++, 0));
    }
    if (Location.afterProgressBar.equals(loc)) {
        panelToolbar.add(new JToolBar.Separator(), getGBC(x++, 0));
        panelToolbar.add(new JLabel(Constant.messages.getString("ascan.toolbar.requests.label")), getGBC(x++, 0));
        panelToolbar.add(getNumRequests(), getGBC(x++, 0));
    }
    return x;
}
Also used : JLabel(javax.swing.JLabel) JToolBar(javax.swing.JToolBar)

Example 97 with JLabel

use of javax.swing.JLabel in project zaproxy by zaproxy.

the class OptionsConnectionPanel method getPanelProxyAuth.

/**
	 * This method initializes panelProxyAuth	
	 * 	
	 * @return javax.swing.JPanel	
	 */
private JPanel getPanelProxyAuth() {
    if (panelProxyAuth == null) {
        java.awt.GridBagConstraints gridBagConstraints82 = new GridBagConstraints();
        java.awt.GridBagConstraints gridBagConstraints72 = new GridBagConstraints();
        java.awt.GridBagConstraints gridBagConstraints62 = new GridBagConstraints();
        java.awt.GridBagConstraints gridBagConstraints52 = new GridBagConstraints();
        java.awt.GridBagConstraints gridBagConstraints42 = new GridBagConstraints();
        java.awt.GridBagConstraints gridBagConstraints31 = new GridBagConstraints();
        java.awt.GridBagConstraints gridBagConstraints21 = new GridBagConstraints();
        java.awt.GridBagConstraints gridBagConstraints16 = new GridBagConstraints();
        java.awt.GridBagConstraints gridBagConstraints17 = new GridBagConstraints();
        javax.swing.JLabel jLabel11 = new JLabel();
        javax.swing.JLabel jLabel10 = new JLabel();
        javax.swing.JLabel jLabel9 = new JLabel();
        panelProxyAuth = new JPanel();
        panelProxyAuth.setLayout(new GridBagLayout());
        jLabel9.setText(Constant.messages.getString("conn.options.proxy.auth.realm"));
        jLabel10.setText(Constant.messages.getString("conn.options.proxy.auth.username"));
        jLabel11.setText(Constant.messages.getString("conn.options.proxy.auth.password"));
        panelProxyAuth.setBorder(javax.swing.BorderFactory.createTitledBorder(null, Constant.messages.getString("conn.options.proxy.auth.auth"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, FontUtils.getFont(FontUtils.Size.standard), java.awt.Color.black));
        gridBagConstraints16.gridx = 0;
        gridBagConstraints16.gridy = 0;
        gridBagConstraints16.insets = new java.awt.Insets(2, 2, 2, 2);
        gridBagConstraints16.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints16.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints16.gridwidth = 2;
        gridBagConstraints16.weightx = 1.0D;
        gridBagConstraints17.gridx = 0;
        gridBagConstraints17.gridy = 1;
        gridBagConstraints17.insets = new java.awt.Insets(2, 2, 2, 2);
        gridBagConstraints17.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints17.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints17.gridwidth = 2;
        gridBagConstraints17.weightx = 1.0D;
        gridBagConstraints21.gridx = 0;
        gridBagConstraints21.gridy = 2;
        gridBagConstraints21.insets = new java.awt.Insets(2, 2, 2, 2);
        gridBagConstraints21.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints21.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints21.weightx = 0.5D;
        gridBagConstraints31.gridx = 1;
        gridBagConstraints31.gridy = 2;
        gridBagConstraints31.weightx = 0.5D;
        gridBagConstraints31.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints31.insets = new java.awt.Insets(2, 2, 2, 2);
        gridBagConstraints31.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints31.ipadx = 50;
        gridBagConstraints42.gridx = 0;
        gridBagConstraints42.gridy = 3;
        gridBagConstraints42.insets = new java.awt.Insets(2, 2, 2, 2);
        gridBagConstraints42.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints42.weightx = 0.5D;
        gridBagConstraints42.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints52.gridx = 1;
        gridBagConstraints52.gridy = 3;
        gridBagConstraints52.weightx = 0.5D;
        gridBagConstraints52.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints52.insets = new java.awt.Insets(2, 2, 2, 2);
        gridBagConstraints52.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints52.ipadx = 50;
        gridBagConstraints62.gridx = 0;
        gridBagConstraints62.gridy = 4;
        gridBagConstraints62.insets = new java.awt.Insets(2, 2, 2, 2);
        gridBagConstraints62.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints62.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints62.weightx = 0.5D;
        gridBagConstraints72.gridx = 1;
        gridBagConstraints72.gridy = 4;
        gridBagConstraints72.weightx = 0.5D;
        gridBagConstraints72.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints72.insets = new java.awt.Insets(2, 2, 2, 2);
        gridBagConstraints72.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints72.ipadx = 50;
        gridBagConstraints82.gridx = 1;
        gridBagConstraints82.gridy = 5;
        gridBagConstraints82.weightx = 0.5D;
        gridBagConstraints82.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints82.insets = new java.awt.Insets(2, 2, 2, 2);
        gridBagConstraints82.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints82.ipadx = 50;
        panelProxyAuth.add(getChkProxyChainAuth(), gridBagConstraints16);
        panelProxyAuth.add(getChkProxyChainPrompt(), gridBagConstraints17);
        panelProxyAuth.add(jLabel9, gridBagConstraints21);
        panelProxyAuth.add(getTxtProxyChainRealm(), gridBagConstraints31);
        panelProxyAuth.add(jLabel10, gridBagConstraints42);
        panelProxyAuth.add(getTxtProxyChainUserName(), gridBagConstraints52);
        panelProxyAuth.add(jLabel11, gridBagConstraints62);
        panelProxyAuth.add(getTxtProxyChainPassword(), gridBagConstraints72);
        panelProxyAuth.add(getChkShowPassword(), gridBagConstraints82);
    }
    return panelProxyAuth;
}
Also used : JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) JLabel(javax.swing.JLabel) JLabel(javax.swing.JLabel) GridBagConstraints(java.awt.GridBagConstraints)

Example 98 with JLabel

use of javax.swing.JLabel in project zaproxy by zaproxy.

the class OptionsConnectionPanel method getPanelGeneral.

private JPanel getPanelGeneral() {
    if (panelGeneral == null) {
        java.awt.GridBagConstraints gridBagConstraints01 = new GridBagConstraints();
        java.awt.GridBagConstraints gridBagConstraints00 = new GridBagConstraints();
        javax.swing.JLabel jLabel = new JLabel();
        panelGeneral = new JPanel();
        panelGeneral.setLayout(new GridBagLayout());
        jLabel.setText(Constant.messages.getString("conn.options.timeout"));
        jLabel.setLabelFor(getTxtTimeoutInSecs());
        panelGeneral.setBorder(javax.swing.BorderFactory.createTitledBorder(null, Constant.messages.getString("conn.options.general"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, FontUtils.getFont(FontUtils.Size.standard), java.awt.Color.black));
        gridBagConstraints00.gridx = 0;
        gridBagConstraints00.gridy = 0;
        gridBagConstraints00.insets = new java.awt.Insets(2, 2, 2, 2);
        gridBagConstraints00.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints00.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints00.weightx = 0.5D;
        gridBagConstraints01.gridx = 1;
        gridBagConstraints01.gridy = 0;
        gridBagConstraints01.weightx = 0.5D;
        gridBagConstraints01.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints01.insets = new java.awt.Insets(2, 2, 2, 2);
        gridBagConstraints01.anchor = java.awt.GridBagConstraints.WEST;
        gridBagConstraints01.ipadx = 50;
        panelGeneral.add(jLabel, gridBagConstraints00);
        panelGeneral.add(getTxtTimeoutInSecs(), gridBagConstraints01);
        java.awt.GridBagConstraints gbc = new java.awt.GridBagConstraints();
        gbc.gridy = 3;
        gbc.gridwidth = 2;
        gbc.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gbc.insets = new java.awt.Insets(2, 2, 2, 2);
        gbc.anchor = java.awt.GridBagConstraints.WEST;
        JLabel uaLabel = new JLabel(Constant.messages.getString("conn.options.defaultUserAgent"));
        uaLabel.setLabelFor(this.getDefaultUserAgent());
        panelGeneral.add(uaLabel, LayoutHelper.getGBC(0, 1, 1, 0.5D));
        panelGeneral.add(this.getCommonUserAgents(), LayoutHelper.getGBC(1, 1, 1, 0.5D, new Insets(2, 2, 2, 2)));
        panelGeneral.add(this.getDefaultUserAgent(), LayoutHelper.getGBC(0, 2, 2, 1.0D, new Insets(2, 2, 2, 2)));
        panelGeneral.add(getCheckBoxSingleCookeRequestHeader(), gbc);
    }
    return panelGeneral;
}
Also used : JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) JLabel(javax.swing.JLabel) JLabel(javax.swing.JLabel) GridBagConstraints(java.awt.GridBagConstraints)

Example 99 with JLabel

use of javax.swing.JLabel in project zaproxy by zaproxy.

the class OptionsConnectionPanel method getDnsPanel.

private JPanel getDnsPanel() {
    if (dnsPanel == null) {
        dnsPanel = new JPanel();
        dnsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, Constant.messages.getString("conn.options.dns.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, FontUtils.getFont(FontUtils.Size.standard), Color.black));
        GroupLayout layout = new GroupLayout(dnsPanel);
        dnsPanel.setLayout(layout);
        layout.setAutoCreateGaps(true);
        JLabel valueLabel = new JLabel(Constant.messages.getString("conn.options.dns.ttlSuccessfulQueries.label"));
        valueLabel.setToolTipText(Constant.messages.getString("conn.options.dns.ttlSuccessfulQueries.toolTip"));
        valueLabel.setLabelFor(getDnsTtlSuccessfulQueriesNumberSpinner());
        layout.setHorizontalGroup(layout.createSequentialGroup().addComponent(valueLabel).addComponent(getDnsTtlSuccessfulQueriesNumberSpinner()));
        layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(valueLabel).addComponent(getDnsTtlSuccessfulQueriesNumberSpinner()));
    }
    return dnsPanel;
}
Also used : JPanel(javax.swing.JPanel) GroupLayout(javax.swing.GroupLayout) JLabel(javax.swing.JLabel)

Example 100 with JLabel

use of javax.swing.JLabel in project zaproxy by zaproxy.

the class OptionsViewPanel method getFontExampleLabel.

private JLabel getFontExampleLabel() {
    if (fontExampleLabel == null) {
        fontExampleLabel = new JLabel(Constant.messages.getString("view.options.label.exampleText"));
        fontExampleLabel.setBorder(BorderFactory.createLineBorder(Color.BLACK));
    }
    return fontExampleLabel;
}
Also used : JLabel(javax.swing.JLabel)

Aggregations

JLabel (javax.swing.JLabel)1208 JPanel (javax.swing.JPanel)737 JButton (javax.swing.JButton)280 BoxLayout (javax.swing.BoxLayout)251 GridBagLayout (java.awt.GridBagLayout)243 BorderLayout (java.awt.BorderLayout)239 Dimension (java.awt.Dimension)221 JScrollPane (javax.swing.JScrollPane)210 GridBagConstraints (java.awt.GridBagConstraints)205 ActionEvent (java.awt.event.ActionEvent)203 JTextField (javax.swing.JTextField)193 ActionListener (java.awt.event.ActionListener)183 Insets (java.awt.Insets)166 FlowLayout (java.awt.FlowLayout)156 JCheckBox (javax.swing.JCheckBox)125 JComboBox (javax.swing.JComboBox)77 JTable (javax.swing.JTable)69 ImageIcon (javax.swing.ImageIcon)63 Container (java.awt.Container)61 Font (java.awt.Font)60