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), 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;
}
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 typeLabel = new JLabel(TYPE_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(typeLabel).addComponent(configurationLabel).addComponent(requestUrlRegexLabel).addComponent(requestHeaderRegexLabel).addComponent(responseHeaderRegexLabel).addComponent(responseBodyRegexLabel).addComponent(enabledLabel)).addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(getNameTextField()).addComponent(getTypeTextField()).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(typeLabel).addComponent(getTypeTextField())).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;
}
use of javax.swing.GroupLayout in project EnrichmentMapApp by BaderLab.
the class MasterDetailDialogPage method createTitlePanel.
private JPanel createTitlePanel() {
JLabel label = new JLabel("Data Sets:");
SwingUtil.makeSmall(label);
JButton addButton = SwingUtil.createIconButton(iconManager, IconManager.ICON_PLUS, "Add Data Set");
scanButton = SwingUtil.createIconButton(iconManager, IconManager.ICON_FOLDER_O, "Scan Folder for Data Sets");
deleteButton = SwingUtil.createIconButton(iconManager, IconManager.ICON_TRASH_O, "Delete Data Set");
addButton.addActionListener(e -> addNewDataSetToList());
deleteButton.addActionListener(e -> deleteSelectedItems());
scanButton.addActionListener(e -> scan());
JPanel panel = new JPanel();
GroupLayout layout = new GroupLayout(panel);
panel.setLayout(layout);
layout.setAutoCreateGaps(true);
layout.setAutoCreateContainerGaps(false);
layout.setHorizontalGroup(layout.createSequentialGroup().addComponent(label).addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(scanButton).addComponent(addButton).addComponent(deleteButton));
layout.setVerticalGroup(layout.createParallelGroup(Alignment.BASELINE).addComponent(label).addComponent(scanButton).addComponent(addButton).addComponent(deleteButton));
return panel;
}
use of javax.swing.GroupLayout in project EnrichmentMapApp by BaderLab.
the class HeatMapMainPanel method createToolbarPanel.
private JPanel createToolbarPanel() {
gradientLegendPanel = new GradientLegendPanel(table);
showValuesCheck = new JCheckBox("Show Values");
JLabel operatorLabel = new JLabel("Genes:");
operatorCombo = new JComboBox<>();
JLabel normLabel = new JLabel("Expressions:");
normCombo = new JComboBox<>();
SwingUtil.makeSmall(operatorLabel, operatorCombo, normLabel, normCombo, showValuesCheck);
operatorCombo.addItem(new ComboItem<>(Operator.UNION, "Union"));
operatorCombo.addItem(new ComboItem<>(Operator.INTERSECTION, "Intersection"));
operatorCombo.setSelectedItem(ComboItem.of(Operator.UNION));
normCombo.addItem(new ComboItem<>(Transform.AS_IS, "Expression Values"));
normCombo.addItem(new ComboItem<>(Transform.ROW_NORMALIZE, "Row Normalize"));
normCombo.addItem(new ComboItem<>(Transform.LOG_TRANSFORM, "Log Transform"));
normCombo.addItem(new ComboItem<>(Transform.COMPRESS_MEDIAN, "Compress (Median)"));
normCombo.addItem(new ComboItem<>(Transform.COMPRESS_MIN, "Compress (Min)"));
normCombo.addItem(new ComboItem<>(Transform.COMPRESS_MAX, "Compress (Max)"));
normCombo.setSelectedItem(ComboItem.of(Transform.COMPRESS_MEDIAN));
operatorCombo.addActionListener(operatorActionListener = e -> updateSetting_Operator(getOperator()));
normCombo.addActionListener(normActionListener = e -> updateSetting_Transform(getTransform()));
showValuesCheck.addActionListener(showValueActionListener = e -> updateSetting_ShowValues(isShowValues()));
JButton plusButton = SwingUtil.createIconButton(iconManager, IconManager.ICON_PLUS, "Add Rankings...");
JButton gearButton = SwingUtil.createIconButton(iconManager, IconManager.ICON_GEAR, "Settings");
JButton menuButton = SwingUtil.createIconButton(iconManager, IconManager.ICON_EXTERNAL_LINK, "Export");
LookAndFeelUtil.equalizeSize(gearButton, menuButton);
plusButton.addActionListener(e -> addRankings());
gearButton.addActionListener(e -> settingsPanel.popup(gearButton));
menuButton.addActionListener(this::showExportMenu);
JPanel panel = new JPanel();
GroupLayout layout = new GroupLayout(panel);
panel.setLayout(layout);
layout.setAutoCreateContainerGaps(false);
layout.setAutoCreateGaps(!LookAndFeelUtil.isAquaLAF());
layout.setHorizontalGroup(layout.createSequentialGroup().addComponent(gradientLegendPanel, 180, 180, 180).addGap(0, 0, Short.MAX_VALUE).addComponent(operatorLabel).addComponent(operatorCombo, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addGap(5).addComponent(normLabel).addComponent(normCombo, PREFERRED_SIZE, DEFAULT_SIZE, PREFERRED_SIZE).addGap(5).addComponent(showValuesCheck).addGap(5).addComponent(plusButton).addComponent(gearButton).addComponent(menuButton));
layout.setVerticalGroup(layout.createParallelGroup(Alignment.BASELINE).addComponent(gradientLegendPanel).addComponent(operatorLabel).addComponent(operatorCombo).addComponent(normLabel).addComponent(normCombo).addComponent(showValuesCheck).addComponent(plusButton).addComponent(gearButton).addComponent(menuButton));
panel.setOpaque(false);
return panel;
}
use of javax.swing.GroupLayout in project EnrichmentMapApp by BaderLab.
the class AddRanksDialog method createContents.
private void createContents() {
JPanel textFieldPanel = createTextFieldPanel();
JPanel buttonPanel = createButtonPanel();
Container contentPane = this.getContentPane();
GroupLayout layout = new GroupLayout(contentPane);
contentPane.setLayout(layout);
layout.setHorizontalGroup(layout.createParallelGroup().addComponent(textFieldPanel).addComponent(buttonPanel));
layout.setVerticalGroup(layout.createSequentialGroup().addComponent(textFieldPanel).addGap(0, 0, Short.MAX_VALUE).addComponent(buttonPanel));
}
Aggregations