Search in sources :

Example 91 with GridBagLayout

use of java.awt.GridBagLayout in project zaproxy by zaproxy.

the class ContextSessionManagementPanel method initialize.

/**
	 * Initialize the panel.
	 */
private void initialize() {
    this.setLayout(new CardLayout());
    this.setName(getContextIndex() + ": " + PANEL_NAME);
    this.setLayout(new GridBagLayout());
    this.setBorder(new EmptyBorder(2, 2, 2, 2));
    this.add(new JLabel(Constant.messages.getString("sessionmanagement.panel.label.description")), LayoutHelper.getGBC(0, 0, 1, 1.0D));
    // Session management combo box
    this.add(new JLabel(Constant.messages.getString("sessionmanagement.panel.label.typeSelect")), LayoutHelper.getGBC(0, 1, 1, 1.0D, new Insets(20, 0, 5, 5)));
    this.add(getSessionManagementMethodsComboBox(), LayoutHelper.getGBC(0, 2, 1, 1.0D));
    // Method config panel container
    this.add(getConfigContainerPanel(), LayoutHelper.getGBC(0, 3, 1, 1.0d, new Insets(10, 0, 10, 0)));
    // Padding
    this.add(new JLabel(), LayoutHelper.getGBC(0, 99, 1, 1.0D, 1.0D));
}
Also used : CardLayout(java.awt.CardLayout) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) JLabel(javax.swing.JLabel) EmptyBorder(javax.swing.border.EmptyBorder)

Example 92 with GridBagLayout

use of java.awt.GridBagLayout in project zaproxy by zaproxy.

the class AbstractContextSelectToolbarStatusPanel method getPanelToolbar.

private JToolBar getPanelToolbar() {
    if (panelToolbar == null) {
        panelToolbar = new javax.swing.JToolBar();
        panelToolbar.setLayout(new GridBagLayout());
        panelToolbar.setEnabled(true);
        panelToolbar.setFloatable(false);
        panelToolbar.setRollover(true);
        panelToolbar.setPreferredSize(new java.awt.Dimension(800, 30));
        panelToolbar.setName(panelPrefix + ".toolbar");
        setupToolbarElements(panelToolbar);
    }
    return panelToolbar;
}
Also used : JToolBar(javax.swing.JToolBar) GridBagLayout(java.awt.GridBagLayout)

Example 93 with GridBagLayout

use of java.awt.GridBagLayout in project zaproxy by zaproxy.

the class NodeSelectDialog method getJPanel.

/**
	 * This method initializes jPanel	
	 * 	
	 * @return javax.swing.JPanel	
	 */
private JPanel getJPanel() {
    if (jPanel == null) {
        GridBagConstraints gridBagConstraints15 = new GridBagConstraints();
        java.awt.GridBagConstraints gridBagConstraints13 = new GridBagConstraints();
        javax.swing.JLabel jLabel2 = new JLabel();
        java.awt.GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
        java.awt.GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
        jPanel = new JPanel();
        jPanel.setLayout(new GridBagLayout());
        jPanel.setPreferredSize(DisplayUtils.getScaledDimension(400, 400));
        jPanel.setMinimumSize(DisplayUtils.getScaledDimension(400, 400));
        gridBagConstraints2.gridx = 1;
        gridBagConstraints2.gridy = 5;
        gridBagConstraints2.insets = new java.awt.Insets(2, 2, 2, 2);
        gridBagConstraints2.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints3.gridx = 2;
        gridBagConstraints3.gridy = 5;
        gridBagConstraints3.insets = new java.awt.Insets(2, 2, 2, 10);
        gridBagConstraints3.anchor = java.awt.GridBagConstraints.EAST;
        gridBagConstraints13.gridx = 0;
        gridBagConstraints13.gridy = 5;
        gridBagConstraints13.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints13.weightx = 1.0D;
        gridBagConstraints13.insets = new java.awt.Insets(2, 10, 2, 5);
        gridBagConstraints15.weightx = 1.0D;
        gridBagConstraints15.weighty = 1.0D;
        gridBagConstraints15.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints15.insets = new java.awt.Insets(2, 2, 2, 2);
        gridBagConstraints15.gridwidth = 3;
        gridBagConstraints15.gridx = 0;
        gridBagConstraints15.gridy = 2;
        gridBagConstraints15.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints15.ipadx = 0;
        gridBagConstraints15.ipady = 10;
        jPanel.add(new ContextsSitesPanel(getTreeContext(), getTreeSite()), gridBagConstraints15);
        jPanel.add(jLabel2, gridBagConstraints13);
        jPanel.add(getCancelButton(), gridBagConstraints2);
        jPanel.add(getSelectButton(), gridBagConstraints3);
    }
    return jPanel;
}
Also used : JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) GridBagLayout(java.awt.GridBagLayout) JLabel(javax.swing.JLabel) JLabel(javax.swing.JLabel) GridBagConstraints(java.awt.GridBagConstraints)

Example 94 with GridBagLayout

use of java.awt.GridBagLayout in project zaproxy by zaproxy.

the class OptionsConnectionPanel method getPanelProxyChain.

/**
	 * This method initializes panelProxyChain	
	 * 	
	 * @return javax.swing.JPanel	
	 */
private JPanel getPanelProxyChain() {
    if (panelProxyChain == null) {
        panelProxyChain = new JPanel();
        java.awt.GridBagConstraints gridBagConstraints92 = new GridBagConstraints();
        javax.swing.JLabel jLabel8 = new JLabel();
        java.awt.GridBagConstraints gridBagConstraints102 = new GridBagConstraints();
        panelProxyChain.setLayout(new GridBagLayout());
        gridBagConstraints92.gridx = 0;
        gridBagConstraints92.gridy = 0;
        gridBagConstraints92.insets = new java.awt.Insets(2, 2, 2, 2);
        gridBagConstraints92.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints92.fill = java.awt.GridBagConstraints.HORIZONTAL;
        panelProxyChain.setName("Proxy Chain");
        jLabel8.setText("");
        gridBagConstraints102.anchor = java.awt.GridBagConstraints.NORTHWEST;
        gridBagConstraints102.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints102.gridx = 0;
        gridBagConstraints102.gridy = 1;
        gridBagConstraints102.weightx = 1.0D;
        gridBagConstraints102.weighty = 1.0D;
        panelProxyChain.add(getPanelProxyAuth(), gridBagConstraints92);
        panelProxyChain.add(jLabel8, gridBagConstraints102);
    }
    return panelProxyChain;
}
Also used : JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) GridBagLayout(java.awt.GridBagLayout) JLabel(javax.swing.JLabel) JLabel(javax.swing.JLabel) GridBagConstraints(java.awt.GridBagConstraints)

Example 95 with GridBagLayout

use of java.awt.GridBagLayout 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();
        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"));
        if (prompting) {
            jLabel11.setText(Constant.messages.getString("conn.options.proxy.auth.passprompt"));
        } else {
            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;
        gridBagConstraints21.gridx = 0;
        gridBagConstraints21.gridy = 1;
        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 = 1;
        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 = 2;
        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 = 2;
        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 = 3;
        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 = 3;
        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 = 4;
        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(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) GridBagLayout(java.awt.GridBagLayout) JLabel(javax.swing.JLabel) JLabel(javax.swing.JLabel) GridBagConstraints(java.awt.GridBagConstraints)

Aggregations

GridBagLayout (java.awt.GridBagLayout)739 GridBagConstraints (java.awt.GridBagConstraints)576 JPanel (javax.swing.JPanel)532 JLabel (javax.swing.JLabel)425 Insets (java.awt.Insets)409 Dimension (java.awt.Dimension)182 JScrollPane (javax.swing.JScrollPane)147 JButton (javax.swing.JButton)143 ActionEvent (java.awt.event.ActionEvent)136 ActionListener (java.awt.event.ActionListener)115 JTextField (javax.swing.JTextField)100 BorderLayout (java.awt.BorderLayout)96 JCheckBox (javax.swing.JCheckBox)79 BoxLayout (javax.swing.BoxLayout)66 ButtonGroup (javax.swing.ButtonGroup)56 TitledBorder (javax.swing.border.TitledBorder)48 JComboBox (javax.swing.JComboBox)46 FlowLayout (java.awt.FlowLayout)42 JRadioButton (javax.swing.JRadioButton)36 Color (java.awt.Color)34