下面列出了javax.swing.GroupLayout#setVerticalGroup ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
public DefaultEmptyPayloadGeneratorUIPanel() {
fieldsPanel = new JPanel();
GroupLayout layout = new GroupLayout(fieldsPanel);
fieldsPanel.setLayout(layout);
layout.setAutoCreateGaps(true);
JLabel valueLabel = new JLabel(NUMBER_REPETITIONS_FIELD_LABEL);
valueLabel.setLabelFor(getRepetitionsNumberSpinner());
layout.setHorizontalGroup(
layout.createSequentialGroup()
.addComponent(valueLabel)
.addComponent(getRepetitionsNumberSpinner()));
layout.setVerticalGroup(
layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(valueLabel)
.addComponent(getRepetitionsNumberSpinner()));
}
@Override
protected JPanel getFieldsPanel() {
JPanel fieldsPanel = new JPanel();
GroupLayout layout = new GroupLayout(fieldsPanel);
fieldsPanel.setLayout(layout);
layout.setAutoCreateGaps(true);
layout.setAutoCreateContainerGaps(true);
JLabel processorsLabel =
new JLabel(
Constant.messages.getString(
"fuzz.fuzzer.dialog.payloads.dialog.processors.processors.label"));
layout.setHorizontalGroup(
layout.createParallelGroup()
.addComponent(processorsLabel)
.addComponent(processorsTablePanel));
layout.setVerticalGroup(
layout.createSequentialGroup()
.addComponent(processorsLabel)
.addComponent(processorsTablePanel));
return fieldsPanel;
}
private void updatePanels() {
jFiltersPanel.removeAll();
GroupLayout groupLayout = new GroupLayout(jFiltersPanel);
jFiltersPanel.setLayout(groupLayout);
groupLayout.setAutoCreateGaps(true);
groupLayout.setAutoCreateContainerGaps(false);
ParallelGroup horizontalGroup = groupLayout.createParallelGroup();
SequentialGroup verticalGroup = groupLayout.createSequentialGroup();
for (LocationPanel locationPanel : locationPanels) {
horizontalGroup.addComponent(locationPanel.getPanel());
verticalGroup.addComponent(locationPanel.getPanel());
}
jFiltersPanel.setVisible(!locationPanels.isEmpty());
groupLayout.setHorizontalGroup(horizontalGroup);
groupLayout.setVerticalGroup(verticalGroup);
autoValidate();
this.getDialog().pack();
}
/**
* This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
innerPanel = new JPanel();
innerPanel.setLayout(new BorderLayout());
GroupLayout layout = new GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(innerPanel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(innerPanel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
);
}
private void setMainPanel(PDialog dialog) {
curDialog = dialog;
Component display = curDialog.getWindow();
jPanel2.removeAll();
this.repaint();
// set new screen
GroupLayout layout = new GroupLayout(jPanel2);
jPanel2.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(display, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(display, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
);
}
/**
* This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
titleLabel = new JLabel();
failedFilesScrollPane = new JScrollPane();
failedFilesList = new JList<String>();
Mnemonics.setLocalizedText(titleLabel, "TITLE"); // NOI18N
failedFilesList.setEnabled(false);
failedFilesScrollPane.setViewportView(failedFilesList);
GroupLayout layout = new GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(Alignment.LEADING)
.addComponent(failedFilesScrollPane)
.addGroup(layout.createSequentialGroup()
.addComponent(titleLabel)
.addGap(0, 0, Short.MAX_VALUE)))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(titleLabel)
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(failedFilesScrollPane)
.addContainerGap())
);
}
public PayloadPreviewPanel(ResettableAutoCloseableIterator<Payload> payloads) {
this.payloads = payloads;
JLabel currentPayloadsLabel = new JLabel(CURRENT_PAYLOADS_FIELD_LABEL);
currentPayloadsLabel.setLabelFor(getCurrentPayloadsTextArea());
JLabel processedPayloadsLabel = new JLabel(PROCESSED_PAYLOADS_FIELD_LABEL);
processedPayloadsLabel.setLabelFor(getProcessedPayloadsTextArea());
JScrollPane currentPayloadsScrollPane = new JScrollPane(getCurrentPayloadsTextArea());
JScrollPane processedPayloadsScrollPane = new JScrollPane(getProcessedPayloadsTextArea());
SyncScrollBarsAdjustmentListener syncScrollPanes =
new SyncScrollBarsAdjustmentListener(
currentPayloadsScrollPane, processedPayloadsScrollPane);
JPanel panel =
createSplitPanel(
createLabelledPanel(currentPayloadsLabel, currentPayloadsScrollPane),
createLabelledPanel(processedPayloadsLabel, processedPayloadsScrollPane),
syncScrollPanes);
mainPanel = new JPanel();
GroupLayout layout = new GroupLayout(mainPanel);
mainPanel.setLayout(layout);
layout.setAutoCreateGaps(true);
layout.setHorizontalGroup(
layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addComponent(getPayloadsPreviewGenerateButton())
.addComponent(panel));
layout.setVerticalGroup(
layout.createSequentialGroup()
.addComponent(getPayloadsPreviewGenerateButton())
.addComponent(panel));
updatePayloadsTextArea(
getCurrentPayloadsTextArea(), NullPayloadProcessor.getNullPayloadProcessor());
}
public HttpFuzzerHandlerOptionsPanel() {
optionsPanel = new JPanel();
followRedirectsCheckBox = new JCheckBox();
JLabel followRedirectsLabel =
new JLabel(
Constant.messages.getString(
"fuzz.httpfuzzer.options.label.followredirects"));
followRedirectsLabel.setLabelFor(followRedirectsCheckBox);
showRedirectMessagesCheckBox = new JCheckBox();
JLabel showRedirectMessagesLabel =
new JLabel(
Constant.messages.getString("fuzz.httpfuzzer.options.label.showredirects"));
showRedirectMessagesLabel.setLabelFor(showRedirectMessagesCheckBox);
GroupLayout layout = new GroupLayout(optionsPanel);
optionsPanel.setLayout(layout);
layout.setAutoCreateGaps(true);
layout.setHorizontalGroup(
layout.createSequentialGroup()
.addGroup(
layout.createParallelGroup(GroupLayout.Alignment.TRAILING)
.addComponent(followRedirectsLabel))
.addGroup(
layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addComponent(followRedirectsCheckBox)));
layout.setVerticalGroup(
layout.createSequentialGroup()
.addGroup(
layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(followRedirectsLabel)
.addComponent(followRedirectsCheckBox)));
}
private JPanel createTextPanelPlaceholder() {
JPanel placeholder = new JPanel();
placeholder.setBackground(blueBackground);
GroupLayout layout = new GroupLayout(placeholder);
placeholder.setLayout(layout);
layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, ICON_WIDTH, Short.MAX_VALUE));
layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE));
return placeholder;
}
public MyComboBox() {
jPanel = new JPanel();
GroupLayout layout = new GroupLayout(jPanel);
jPanel.setLayout(layout);
layout.setAutoCreateGaps(false);
layout.setAutoCreateContainerGaps(false);
jDefault = new JNullableLabel();
jDefault.setHorizontalAlignment(JLabel.CENTER);
jDefault.setVerticalAlignment(JLabel.CENTER);
jDefault.setOpaque(true);
jPickerIcon = new JLabel(Images.SETTINGS_COLOR_PICKER.getIcon());
jPickerIcon.setHorizontalTextPosition(JLabel.CENTER);
jPickerIcon.setHorizontalAlignment(JLabel.CENTER);
jPickerIcon.setVerticalAlignment(JLabel.CENTER);
jPickerIcon.setOpaque(true);
layout.setHorizontalGroup(
layout.createSequentialGroup()
.addComponent(jDefault, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, Integer.MAX_VALUE)
.addComponent(jPickerIcon, 16, 16, 16)
);
layout.setVerticalGroup(
layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addComponent(jDefault, 0, 0, Integer.MAX_VALUE)
.addComponent(jPickerIcon, 0, 0, Integer.MAX_VALUE)
);
}
@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);
layout.setHorizontalGroup(
layout.createSequentialGroup()
.addGroup(
layout.createParallelGroup(GroupLayout.Alignment.TRAILING)
.addComponent(nameLabel))
.addGroup(
layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addComponent(getNameTextField())));
layout.setVerticalGroup(
layout.createSequentialGroup()
.addGroup(
layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(nameLabel)
.addComponent(getNameTextField())));
return fieldsPanel;
}
@Override
protected JPanel getFieldsPanel() {
JPanel fieldsPanel = new JPanel();
GroupLayout layout = new GroupLayout(fieldsPanel);
fieldsPanel.setLayout(layout);
layout.setAutoCreateGaps(true);
layout.setHorizontalGroup(layout.createSequentialGroup().addComponent(payloadsPanel));
layout.setVerticalGroup(layout.createSequentialGroup().addComponent(payloadsPanel));
return fieldsPanel;
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
scrollCategories = new JScrollPane();
listCategories = new JList<String>();
panelContent = new JPanel();
listCategories.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
scrollCategories.setViewportView(listCategories);
panelContent.setLayout(new BorderLayout());
GroupLayout layout = new GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(scrollCategories, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(panelContent, GroupLayout.DEFAULT_SIZE, 141, Short.MAX_VALUE)
.addGap(0, 0, 0))
);
layout.setVerticalGroup(
layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(0, 0, 0)
.addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addComponent(scrollCategories, GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
.addComponent(panelContent, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
);
}
private void initComponents() {
JLabel keyLabel = new JLabel();
JLabel valueLabel = new JLabel();
JLabel commentLabel = new JLabel();
keyText = new JTextField(25);
valueText = new JTextField(25);
commentText = new JTextField(25);
keyLabel.setLabelFor(keyText);
valueLabel.setLabelFor(valueText);
commentLabel.setLabelFor(commentText);
Mnemonics.setLocalizedText(keyLabel, NbBundle.getMessage(getClass(), "LBL_KeyLabel")); // NOI18N
Mnemonics.setLocalizedText(valueLabel, NbBundle.getMessage(getClass(), "LBL_ValueLabel")); // NOI18N
Mnemonics.setLocalizedText(commentLabel, NbBundle.getMessage(getClass(), "LBL_CommentLabel")); // NOI18N
GroupLayout layout = new GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(LEADING)
.addComponent(keyLabel)
.addComponent(valueLabel)
.addComponent(commentLabel))
.addPreferredGap(RELATED)
.addGroup(layout.createParallelGroup(LEADING)
.addComponent(keyText, DEFAULT_SIZE, PREFERRED_SIZE, Short.MAX_VALUE)
.addComponent(valueText, DEFAULT_SIZE, PREFERRED_SIZE, Short.MAX_VALUE)
.addComponent(commentText, DEFAULT_SIZE, PREFERRED_SIZE, Short.MAX_VALUE))
.addContainerGap()
);
layout.setVerticalGroup(
layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(BASELINE)
.addComponent(keyLabel)
.addComponent(keyText, PREFERRED_SIZE, PREFERRED_SIZE, PREFERRED_SIZE))
.addPreferredGap(RELATED)
.addGroup(layout.createParallelGroup(BASELINE)
.addComponent(valueText, PREFERRED_SIZE, PREFERRED_SIZE, PREFERRED_SIZE)
.addComponent(valueLabel))
.addPreferredGap(RELATED)
.addGroup(layout.createParallelGroup(BASELINE)
.addComponent(commentText, PREFERRED_SIZE, PREFERRED_SIZE, PREFERRED_SIZE)
.addComponent(commentLabel))
.addContainerGap()
);
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
targetFolderLabel = new JLabel();
targetFolderTextField = new JTextField();
browseTargetFolderButton = new JButton();
targetFolderLabel.setLabelFor(targetFolderTextField);
Mnemonics.setLocalizedText(targetFolderLabel, NbBundle.getMessage(BrowseFolderPanel.class, "BrowseFolderPanel.targetFolderLabel.text")); // NOI18N
Mnemonics.setLocalizedText(browseTargetFolderButton, NbBundle.getMessage(BrowseFolderPanel.class, "BrowseFolderPanel.browseTargetFolderButton.text")); // NOI18N
browseTargetFolderButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
browseTargetFolderButtonActionPerformed(evt);
}
});
GroupLayout layout = new GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(targetFolderLabel)
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(targetFolderTextField, GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE)
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(browseTargetFolderButton)
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(Alignment.BASELINE)
.addComponent(targetFolderLabel)
.addComponent(targetFolderTextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addComponent(browseTargetFolderButton)))
);
}
public ScriptStringPayloadGeneratorAdapterUIPanel(List<ScriptWrapper> scriptWrappers) {
scriptComboBox = new JComboBox<>(new SortedComboBoxModel<ScriptUIEntry>());
for (ScriptWrapper scriptWrapper : scriptWrappers) {
if (scriptWrapper.isEnabled()) {
scriptComboBox.addItem(new PayloadGeneratorScriptUIEntry(scriptWrapper));
}
}
scriptComboBox.addItemListener(
new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) {
updatePreviewFor((PayloadGeneratorScriptUIEntry) e.getItem());
}
}
});
setPreviewAndSaveButtonsEnabled(scriptComboBox.getSelectedIndex() >= 0);
fieldsPanel = new JPanel();
GroupLayout layout = new GroupLayout(fieldsPanel);
fieldsPanel.setLayout(layout);
layout.setAutoCreateGaps(true);
JLabel scriptLabel = new JLabel(SCRIPT_FIELD_LABEL);
scriptLabel.setLabelFor(scriptComboBox);
JLabel payloadsPreviewLabel = new JLabel(PAYLOADS_PREVIEW_FIELD_LABEL);
payloadsPreviewLabel.setLabelFor(getPayloadsPreviewTextArea());
JScrollPane payloadsPreviewScrollPane = new JScrollPane(getPayloadsPreviewTextArea());
layout.setHorizontalGroup(
layout.createSequentialGroup()
.addGroup(
layout.createParallelGroup(GroupLayout.Alignment.TRAILING)
.addComponent(scriptLabel)
.addComponent(payloadsPreviewLabel))
.addGroup(
layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addComponent(scriptComboBox)
.addGroup(
layout.createSequentialGroup()
.addComponent(
getPayloadsPreviewGenerateButton())
.addComponent(getSaveButton()))
.addComponent(payloadsPreviewScrollPane)));
layout.setVerticalGroup(
layout.createSequentialGroup()
.addGroup(
layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(scriptLabel)
.addComponent(scriptComboBox))
.addGroup(
layout.createParallelGroup()
.addComponent(getPayloadsPreviewGenerateButton())
.addComponent(getSaveButton()))
.addGroup(
layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(payloadsPreviewLabel)
.addComponent(payloadsPreviewScrollPane)));
}
private void init() {
setLayout(new BorderLayout());
setBorder(makeBorder());
JPanel northPanel = new JPanel();
northPanel.setLayout(new VerticalLayout(5, VerticalLayout.BOTH));
northPanel.add(makeTitlePanel());
add(northPanel, BorderLayout.NORTH);
JPanel mainPanel = new JPanel();
clientSecretLabel = new javax.swing.JLabel();
appIdLabel = new javax.swing.JLabel();
appIdTextField = new javax.swing.JTextField();
clientSecretTextField = new javax.swing.JPasswordField();
clientSecretLabel.setText(CLIENT_SECRET_LABEL);
appIdLabel.setText(APP_ID_LABEL);
GroupLayout layout = new GroupLayout(mainPanel);
mainPanel.setLayout(layout);
layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(layout.createSequentialGroup().addComponent(appIdLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(appIdTextField))
.addGroup(layout.createSequentialGroup().addComponent(clientSecretLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(clientSecretTextField, javax.swing.GroupLayout.PREFERRED_SIZE,
526, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(0, 107, Short.MAX_VALUE)));
layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout
.createSequentialGroup().addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(appIdLabel).addComponent(appIdTextField, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(clientSecretLabel).addComponent(clientSecretTextField,
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(203, Short.MAX_VALUE)));
add(mainPanel, BorderLayout.CENTER);
}
public TokenOptionsPanel() {
super();
JLabel threadsPerScanLabel = new JLabel(THREADS_PER_SCAN_LABEL);
threadsPerScanNumberSpinner =
new ZapNumberSpinner(1, TokenParam.DEFAULT_THREADS_PER_SCAN, 50);
JLabel requestDelayLabel = new JLabel(REQUEST_DELAY_LABEL);
requestDelayNumberSpinner =
new ZapNumberSpinner(0, TokenParam.DEFAULT_REQUEST_DELAY_IN_MS, Integer.MAX_VALUE);
setName(NAME);
GroupLayout layout = new GroupLayout(this);
setLayout(layout);
layout.setAutoCreateGaps(true);
layout.setAutoCreateContainerGaps(true);
layout.setHorizontalGroup(
layout.createSequentialGroup()
.addGroup(
layout.createParallelGroup(GroupLayout.Alignment.TRAILING)
.addComponent(threadsPerScanLabel)
.addComponent(requestDelayLabel))
.addGroup(
layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addComponent(threadsPerScanNumberSpinner)
.addComponent(requestDelayNumberSpinner)));
layout.setVerticalGroup(
layout.createSequentialGroup()
.addGroup(
layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(threadsPerScanLabel)
.addComponent(threadsPerScanNumberSpinner))
.addGroup(
layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(requestDelayLabel)
.addComponent(requestDelayNumberSpinner)));
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
targetFolderLabel = new JLabel();
targetFolderTextField = new JTextField();
browseTargetFolderButton = new JButton();
targetFolderLabel.setLabelFor(targetFolderTextField);
Mnemonics.setLocalizedText(targetFolderLabel, NbBundle.getMessage(BrowseFolderPanel.class, "BrowseFolderPanel.targetFolderLabel.text"));
Mnemonics.setLocalizedText(browseTargetFolderButton, NbBundle.getMessage(BrowseFolderPanel.class, "BrowseFolderPanel.browseTargetFolderButton.text"));
browseTargetFolderButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
browseTargetFolderButtonActionPerformed(evt);
}
});
GroupLayout layout = new GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(targetFolderLabel)
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(targetFolderTextField, GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE)
.addPreferredGap(ComponentPlacement.RELATED)
.addComponent(browseTargetFolderButton)
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(Alignment.BASELINE)
.addComponent(targetFolderLabel)
.addComponent(targetFolderTextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.addComponent(browseTargetFolderButton)))
);
}
/**
* @return the properties listing panel
*/
JPanel createPropertiesPanel() {
JPanel p = new JPanel();
GroupLayout gl = new GroupLayout(p);
p.setLayout(gl);
gl.setAutoCreateContainerGaps(true);
gl.setAutoCreateGaps(true);
SequentialGroup rows = gl.createSequentialGroup();
ParallelGroup col1 = gl.createParallelGroup();
ParallelGroup col2 = gl.createParallelGroup();
ParallelGroup col3 = gl.createParallelGroup();
for (String a : PARAM_NAMES) {
JLabel indicator = new JLabel();
JLabel caption = new JLabel(get("definition.refprop_" + a));
JTextField textField = new JTextField(10);
textField.setHorizontalAlignment(JTextField.RIGHT);
caption.setToolTipText(get("definition.refprop_" + a + ".tip"));
textField.setToolTipText(get("definition.refprop_" + a + ".tip"));
indicators.put(a, indicator);
fields.put(a, textField);
ParallelGroup pg = gl.createParallelGroup(Alignment.BASELINE);
col1.addComponent(caption);
col2.addComponent(textField, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE);
col3.addComponent(indicator, 20, 20, 20);
pg.addComponent(caption);
pg.addComponent(textField, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE);
pg.addComponent(indicator, 20, 20, 20);
rows.addGroup(pg);
}
gl.setHorizontalGroup(
gl.createSequentialGroup()
.addGroup(col1)
.addGroup(col2)
.addGroup(col3)
);
gl.setVerticalGroup(rows);
return p;
}