Search in sources :

Example 91 with GroupLayout

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

the class FindDialog method getJPanel.

private JPanel getJPanel() {
    if (jPanel == null) {
        javax.swing.JLabel jLabel = new JLabel(Constant.messages.getString("edit.find.label.what"));
        jPanel = new JPanel();
        GroupLayout layout = new GroupLayout(jPanel);
        jPanel.setLayout(layout);
        layout.setAutoCreateGaps(true);
        layout.setAutoCreateContainerGaps(true);
        layout.setHonorsVisibility(infoLabel, Boolean.FALSE);
        layout.setHorizontalGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(GroupLayout.Alignment.TRAILING).addComponent(jLabel)).addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(getTxtFind()).addComponent(infoLabel).addComponent(getJPanel1())));
        layout.setVerticalGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(jLabel).addComponent(getTxtFind())).addComponent(infoLabel).addComponent(getJPanel1()));
    }
    return jPanel;
}
Also used : JPanel(javax.swing.JPanel) JLabel(javax.swing.JLabel) GroupLayout(javax.swing.GroupLayout) JLabel(javax.swing.JLabel)

Example 92 with GroupLayout

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

the class DialogAddAutoTagScanner method getFieldsPanel.

@Override
protected JPanel getFieldsPanel() {
    JPanel fieldsPanel = new JPanel();
    GroupLayout layout = new GroupLayout(fieldsPanel);
    fieldsPanel.setLayout(layout);
    layout.setAutoCreateGaps(true);
    layout.setAutoCreateContainerGaps(true);
    JLabel nameLabel = new JLabel(NAME_FIELD_LABEL);
    JLabel configurationLabel = new JLabel(CONFIGURATION_FIELD_LABEL);
    JLabel requestUrlRegexLabel = new JLabel(REQUEST_URL_REGEX_FIELD_LABEL);
    JLabel requestHeaderRegexLabel = new JLabel(REQUEST_HEADER_REGEX_FIELD_LABEL);
    JLabel responseHeaderRegexLabel = new JLabel(RESPONSE_HEADER_REGEX_FIELD_LABEL);
    JLabel responseBodyRegexLabel = new JLabel(RESPONSE_BODY_REGEX_FIELD_LABEL);
    JLabel enabledLabel = new JLabel(ENABLED_FIELD_LABEL);
    layout.setHorizontalGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(GroupLayout.Alignment.TRAILING).addComponent(nameLabel).addComponent(configurationLabel).addComponent(requestUrlRegexLabel).addComponent(requestHeaderRegexLabel).addComponent(responseHeaderRegexLabel).addComponent(responseBodyRegexLabel).addComponent(enabledLabel)).addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(getNameTextField()).addComponent(getConfigurationTextField()).addComponent(getRequestUrlRegexTextField()).addComponent(getRequestHeaderRegexTextField()).addComponent(getResponseHeaderRegexTextField()).addComponent(getResponseBodyRegexTextField()).addComponent(getEnabledCheckBox())));
    layout.setVerticalGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(nameLabel).addComponent(getNameTextField())).addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(configurationLabel).addComponent(getConfigurationTextField())).addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(requestUrlRegexLabel).addComponent(getRequestUrlRegexTextField())).addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(requestHeaderRegexLabel).addComponent(getRequestHeaderRegexTextField())).addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(responseHeaderRegexLabel).addComponent(getResponseHeaderRegexTextField())).addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(responseBodyRegexLabel).addComponent(getResponseBodyRegexTextField())).addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(enabledLabel).addComponent(getEnabledCheckBox())));
    return fieldsPanel;
}
Also used : JPanel(javax.swing.JPanel) GroupLayout(javax.swing.GroupLayout) JLabel(javax.swing.JLabel)

Example 93 with GroupLayout

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

the class ExcludedParameterAddDialog method getFieldsPanel.

@Override
protected JPanel getFieldsPanel() {
    JPanel fieldsPanel = new JPanel();
    GroupLayout layout = new GroupLayout(fieldsPanel);
    fieldsPanel.setLayout(layout);
    layout.setAutoCreateGaps(true);
    layout.setAutoCreateContainerGaps(true);
    JLabel nameLabel = new JLabel(NAME_FIELD_LABEL);
    JLabel whereLabel = new JLabel(TYPE_FIELD_LABEL);
    JLabel urlLabel = new JLabel(URL_FIELD_LABEL);
    layout.setHorizontalGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(GroupLayout.Alignment.TRAILING).addComponent(nameLabel).addComponent(whereLabel).addComponent(urlLabel)).addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(getNameTextField()).addComponent(getWhereComboField()).addComponent(getUrlTextField())));
    layout.setVerticalGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(nameLabel).addComponent(getNameTextField())).addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(whereLabel).addComponent(getWhereComboField())).addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE).addComponent(urlLabel).addComponent(getUrlTextField())));
    return fieldsPanel;
}
Also used : JPanel(javax.swing.JPanel) GroupLayout(javax.swing.GroupLayout) JLabel(javax.swing.JLabel)

Example 94 with GroupLayout

use of javax.swing.GroupLayout 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)));
        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 95 with GroupLayout

use of javax.swing.GroupLayout in project cytoscape-api by cytoscape.

the class JStatusBar method initComponents.

private void initComponents() {
    leftPanel = new JPanel();
    leftLabel = new JLabel();
    centerPanel = new JPanel();
    centerLabel = new JLabel();
    rightPanel = new JPanel();
    rightLabel = new JLabel();
    leftPanel.setBorder(LookAndFeelUtil.createPanelBorder());
    leftLabel.setFont(leftLabel.getFont().deriveFont(FONT_SIZE));
    centerPanel.setBorder(LookAndFeelUtil.createPanelBorder());
    centerLabel.setFont(centerLabel.getFont().deriveFont(FONT_SIZE));
    rightPanel.setBorder(LookAndFeelUtil.createPanelBorder());
    rightLabel.setFont(rightLabel.getFont().deriveFont(FONT_SIZE));
    final GroupLayout layout1 = new GroupLayout(leftPanel);
    leftPanel.setLayout(layout1);
    layout1.setHorizontalGroup(layout1.createSequentialGroup().addComponent(leftLabel, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE));
    layout1.setVerticalGroup(layout1.createSequentialGroup().addComponent(leftLabel));
    final GroupLayout layout2 = new GroupLayout(centerPanel);
    centerPanel.setLayout(layout2);
    layout2.setHorizontalGroup(layout2.createSequentialGroup().addComponent(centerLabel, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE));
    layout2.setVerticalGroup(layout2.createSequentialGroup().addComponent(centerLabel));
    final GroupLayout layout3 = new GroupLayout(rightPanel);
    rightPanel.setLayout(layout3);
    layout3.setHorizontalGroup(layout3.createSequentialGroup().addComponent(rightLabel, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE));
    layout3.setVerticalGroup(layout3.createSequentialGroup().addComponent(rightLabel));
    final GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createSequentialGroup().addComponent(leftPanel, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE).addComponent(centerPanel, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE).addComponent(rightPanel, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE));
    layout.setVerticalGroup(layout.createParallelGroup(LEADING).addComponent(leftPanel, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE).addComponent(centerPanel, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE).addComponent(rightPanel, DEFAULT_SIZE, DEFAULT_SIZE, Short.MAX_VALUE));
}
Also used : JPanel(javax.swing.JPanel) GroupLayout(javax.swing.GroupLayout) JLabel(javax.swing.JLabel)

Aggregations

GroupLayout (javax.swing.GroupLayout)194 JPanel (javax.swing.JPanel)132 JLabel (javax.swing.JLabel)79 JButton (javax.swing.JButton)53 ActionEvent (java.awt.event.ActionEvent)42 JScrollPane (javax.swing.JScrollPane)39 ActionListener (java.awt.event.ActionListener)23 JTextField (javax.swing.JTextField)22 Dimension (java.awt.Dimension)21 AbstractAction (javax.swing.AbstractAction)20 JSeparator (javax.swing.JSeparator)15 JCheckBox (javax.swing.JCheckBox)14 ParallelGroup (javax.swing.GroupLayout.ParallelGroup)11 SequentialGroup (javax.swing.GroupLayout.SequentialGroup)11 JComboBox (javax.swing.JComboBox)10 JTable (javax.swing.JTable)10 Color (java.awt.Color)9 Font (java.awt.Font)9 PropertyChangeListener (java.beans.PropertyChangeListener)8 AfterInjection (org.baderlab.csplugins.enrichmentmap.AfterInjection)8