gbc.fill = GridBagConstraints.HORIZONTAL;
add(file, gbc);
bBrowse = Utilities.createButton(
INFO_CTRL_PANEL_BROWSE_BUTTON_LABEL.get());
bBrowse.addActionListener(
new BrowseActionListener(file,
BrowseActionListener.BrowseType.OPEN_LDIF_FILE, this));
gbc.gridx = 2;
gbc.gridwidth = 1;
gbc.weightx = 0.0;
bBrowse.setOpaque(false);
add(bBrowse, gbc);
lRemoteFileHelp = Utilities.createInlineHelpLabel(
INFO_CTRL_PANEL_REMOTE_SERVER_PATH.get());
gbc.gridx = 1;
gbc.gridwidth = 2;
gbc.insets.top = 3;
gbc.insets.left = 10;
gbc.gridy ++;
add(lRemoteFileHelp, gbc);
lRemoteFileHelp.setLabelFor(file);
gbc.gridx = 1;
gbc.gridy ++;
gbc.insets.left = 30;
gbc.insets.top = 5;
gbc.gridwidth = 2;
dataCompressed = Utilities.createCheckBox(
INFO_CTRL_PANEL_DATA_IN_FILE_COMPRESSED.get());
dataCompressed.setOpaque(false);
add(dataCompressed, gbc);
gbc.gridx = 0;
gbc.gridy ++;
gbc.insets.left = 0;
gbc.insets.top = 10;
gbc.gridwidth = 1;
lImportType = Utilities.createPrimaryLabel(
INFO_CTRL_PANEL_IMPORT_TYPE_LABEL.get());
add(lImportType, gbc);
overwrite = Utilities.createRadioButton(
INFO_CTRL_PANEL_IMPORT_OVERWRITE_LABEL.get());
overwrite.setSelected(true);
lImportType.setLabelFor(overwrite);
append =
Utilities.createRadioButton(INFO_CTRL_PANEL_IMPORT_APPEND_LABEL.get());
ButtonGroup group = new ButtonGroup();
group.add(overwrite);
group.add(append);
gbc.insets.left = 10;
gbc.gridx = 1;
gbc.gridwidth = 2;
add(overwrite, gbc);
gbc.gridy ++;
gbc.insets.top = 5;
add(append, gbc);
append.addChangeListener(new ChangeListener()
{
/**
* {@inheritDoc}
*/
public void stateChanged(ChangeEvent ev)
{
replaceEntries.setEnabled(append.isSelected());
}
});
replaceEntries =
Utilities.createCheckBox(INFO_CTRL_PANEL_IMPORT_REPLACE_ENTRIES.get());
replaceEntries.setOpaque(false);
replaceEntries.setEnabled(false);
gbc.insets.left = 30;
gbc.gridy ++;
add(replaceEntries, gbc);
gbc.gridx = 0;
gbc.gridy ++;
gbc.insets.left = 0;
gbc.insets.top = 10;
gbc.gridwidth = 1;
lSchemaValidation = Utilities.createPrimaryLabel(
INFO_CTRL_PANEL_SCHEMA_VALIDATION_LABEL.get());
add(lSchemaValidation, gbc);
gbc.gridx = 1;
rejectNotSchemaCompliant = Utilities.createCheckBox(
INFO_CTRL_PANEL_REJECT_NOT_SCHEMA_COMPLIANT_LABEL.get());
rejectNotSchemaCompliant.setSelected(true);
gbc.insets.left = 10;
add(rejectNotSchemaCompliant, gbc);
lSchemaValidation.setLabelFor(rejectNotSchemaCompliant);
gbc.gridx = 0;
gbc.gridy ++;
gbc.insets.left = 0;
lDNValidation = Utilities.createPrimaryLabel(
INFO_CTRL_PANEL_DN_VALIDATION_LABEL.get());
add(lDNValidation, gbc);
gbc.gridx = 1;
doDNValidationAfter = Utilities.createCheckBox(
INFO_CTRL_PANEL_DO_DN_VALIDATION_LATER_LABEL.get());
doDNValidationAfter.setSelected(false);
gbc.insets.left = 10;
add(doDNValidationAfter, gbc);
lDNValidation.setLabelFor(doDNValidationAfter);
gbc.gridx = 0;
gbc.gridy ++;
gbc.insets.left = 0;
lThreads = Utilities.createPrimaryLabel(
INFO_CTRL_PANEL_IMPORT_THREADS_LABEL.get());
add(lThreads, gbc);
gbc.gridx = 1;
threads = Utilities.createShortTextField();
gbc.gridwidth = 2;
gbc.fill = GridBagConstraints.NONE;
threads.setToolTipText(
INFO_CTRL_PANEL_IMPORT_THREADS_TOOLTIP.get().toString());
gbc.insets.left = 10;
add(threads, gbc);
lThreads.setLabelFor(threads);
gbc.insets.top = 3;
gbc.gridy ++;
add(Utilities.createInlineHelpLabel(
INFO_CTRL_PANEL_IMPORT_THREADS_HELP.get()), gbc);
gbc.gridx = 0;
gbc.gridy ++;
gbc.insets.left = 0;
gbc.insets.top = 10;
gbc.gridwidth = 1;
lRejectsFile = Utilities.createPrimaryLabel(
INFO_CTRL_PANEL_REJECTS_FILE_LABEL.get());
add(lRejectsFile, gbc);
gbc.gridx = 1;
writeRejects = Utilities.createCheckBox(
INFO_CTRL_PANEL_WRITE_REJECTS_FILE_LABEL.get());
writeRejects.setSelected(false);
gbc.insets.left = 10;
add(writeRejects, gbc);
lRejectsFile.setLabelFor(writeRejects);
gbc.gridx = 1;
gbc.gridy++;
gbc.insets.left = 30;
gbc.insets.top = 5;
rejectsFile = Utilities.createTextField();
gbc.weightx = 1.0;
gbc.fill = GridBagConstraints.HORIZONTAL;
add(rejectsFile, gbc);
rejectsBrowse =
Utilities.createButton(INFO_CTRL_PANEL_BROWSE_BUTTON_LABEL.get());
rejectsBrowse.addActionListener(
new BrowseActionListener(rejectsFile,
BrowseActionListener.BrowseType.CREATE_GENERIC_FILE, this));
gbc.gridx = 2;
gbc.gridwidth = 1;
gbc.weightx = 0.0;
gbc.insets.left = 10;
rejectsBrowse.setOpaque(false);
add(rejectsBrowse, gbc);
lRemoteRejectsHelp = Utilities.createInlineHelpLabel(
INFO_CTRL_PANEL_REMOTE_SERVER_PATH.get());
gbc.gridx = 1;
gbc.gridwidth = 2;
gbc.insets.top = 3;
gbc.insets.left = 10;
gbc.gridy ++;
add(lRemoteRejectsHelp, gbc);
gbc.gridx = 1;
gbc.gridy ++;
gbc.insets.left = 30;
gbc.gridwidth = 2;
overwriteRejectsFile = Utilities.createCheckBox(
INFO_CTRL_PANEL_OVERWRITE_REJECTS_FILE_LABEL.get());
overwriteRejectsFile.setOpaque(false);
add(overwriteRejectsFile, gbc);
lRemoteRejectsHelp.setLabelFor(overwriteRejectsFile);
ChangeListener changeListener = new ChangeListener()
{
/**
* {@inheritDoc}
*/
public void stateChanged(ChangeEvent ev)
{
rejectsFile.setEnabled(writeRejects.isSelected());
rejectsBrowse.setEnabled(writeRejects.isSelected());
overwriteRejectsFile.setEnabled(writeRejects.isSelected());
}
};
writeRejects.addChangeListener(changeListener);
writeRejects.setSelected(false);
changeListener.stateChanged(null);
gbc.gridx = 0;
gbc.gridy ++;
gbc.insets.left = 0;
gbc.insets.top = 10;
gbc.gridwidth = 1;
lSkipsFile = Utilities.createPrimaryLabel(
INFO_CTRL_PANEL_SKIPS_FILE_LABEL.get());
add(lSkipsFile, gbc);
gbc.gridx = 1;
writeSkips =
Utilities.createCheckBox(INFO_CTRL_PANEL_WRITE_SKIPS_FILE_LABEL.get());
writeSkips.setSelected(false);
gbc.insets.left = 10;
add(writeSkips, gbc);
lSkipsFile.setLabelFor(writeSkips);
gbc.gridx = 1;
gbc.gridy++;
gbc.insets.left = 30;
gbc.insets.top = 5;
skipsFile = Utilities.createTextField();
gbc.weightx = 1.0;
gbc.fill = GridBagConstraints.HORIZONTAL;
add(skipsFile, gbc);
skipsBrowse =
Utilities.createButton(INFO_CTRL_PANEL_BROWSE_BUTTON_LABEL.get());
skipsBrowse.addActionListener(
new BrowseActionListener(skipsFile,
BrowseActionListener.BrowseType.CREATE_GENERIC_FILE, this));
gbc.gridx = 2;
gbc.gridwidth = 1;
gbc.weightx = 0.0;
gbc.insets.left = 10;