use of org.jkiss.dbeaver.ui.controls.TextWithOpenFile in project dbeaver by serge-rider.
the class ConfigImportWizardPageNavicatSettings method createControl.
@Override
public void createControl(Composite parent) {
Composite placeholder = new Composite(parent, SWT.NONE);
placeholder.setLayout(new GridLayout(1, true));
UIUtils.createControlLabel(placeholder, "Navicat Connection Export (NCX) file");
filePathText = new TextWithOpenFile(placeholder, "Navicat Connection Export (NCX) file", new String[] { "*.ncx" });
filePathText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
filePathText.getTextControl().addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
inputFile = new File(filePathText.getText());
if (!inputFile.exists()) {
setErrorMessage("File '" + inputFile.getAbsolutePath() + "' doesn't exist");
} else {
setErrorMessage(null);
}
getWizard().getContainer().updateButtons();
}
});
UIUtils.createControlLabel(placeholder, "File encoding");
encodingCombo = UIUtils.createEncodingCombo(placeholder, GeneralUtils.DEFAULT_ENCODING);
setControl(placeholder);
}
use of org.jkiss.dbeaver.ui.controls.TextWithOpenFile in project dbeaver by serge-rider.
the class PostgreRestoreWizardPageSettings method createControl.
@Override
public void createControl(Composite parent) {
Composite composite = UIUtils.createPlaceholder(parent, 1);
Listener updateListener = event -> updateState();
Group formatGroup = UIUtils.createControlGroup(composite, PostgreMessages.wizard_restore_page_setting_label_setting, 2, GridData.FILL_HORIZONTAL, 0);
formatCombo = UIUtils.createLabelCombo(formatGroup, PostgreMessages.wizard_restore_page_setting_label_format, SWT.DROP_DOWN | SWT.READ_ONLY);
formatCombo.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
for (PostgreDatabaseBackupSettings.ExportFormat format : PostgreDatabaseBackupSettings.ExportFormat.values()) {
formatCombo.add(format.getTitle());
}
formatCombo.select(wizard.getSettings().getFormat().ordinal());
formatCombo.addListener(SWT.Selection, updateListener);
cleanFirstButton = UIUtils.createCheckbox(formatGroup, PostgreMessages.wizard_restore_page_setting_btn_clean_first, null, wizard.getSettings().isCleanFirst(), 2);
cleanFirstButton.addListener(SWT.Selection, updateListener);
noOwnerCheck = UIUtils.createCheckbox(formatGroup, PostgreMessages.wizard_backup_page_setting_checkbox_no_owner, null, wizard.getSettings().isNoOwner(), 2);
noOwnerCheck.addListener(SWT.Selection, updateListener);
Group inputGroup = UIUtils.createControlGroup(composite, PostgreMessages.wizard_restore_page_setting_label_input, 2, GridData.FILL_HORIZONTAL, 0);
UIUtils.createControlLabel(inputGroup, PostgreMessages.wizard_restore_page_setting_label_backup_file);
inputFileText = new TextWithOpenFile(inputGroup, PostgreMessages.wizard_restore_page_setting_label_choose_backup_file, new String[] { "*.backup", "*.sql", "*" });
inputFileText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
inputFileText.getTextControl().addListener(SWT.Modify, updateListener);
inputFileText.setText(wizard.getSettings().getInputFile());
createExtraArgsInput(inputGroup);
Composite extraGroup = UIUtils.createComposite(composite, 2);
createSecurityGroup(extraGroup);
wizard.createTaskSaveGroup(extraGroup);
setControl(composite);
}
use of org.jkiss.dbeaver.ui.controls.TextWithOpenFile in project dbeaver by serge-rider.
the class MySQLSSLConfigurator method createControl.
// private Button debugSSL;
@Override
public void createControl(Composite parent) {
final Composite composite = new Composite(parent, SWT.NONE);
composite.setLayout(new GridLayout(1, false));
GridData gd = new GridData(GridData.FILL_BOTH);
gd.minimumHeight = 200;
composite.setLayoutData(gd);
{
Group certGroup = UIUtils.createControlGroup(composite, "Certificates", 2, GridData.FILL_HORIZONTAL, -1);
UIUtils.createControlLabel(certGroup, "CA certificate");
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.minimumWidth = 130;
clientCAText = new TextWithOpenFile(certGroup, "CA Certificate", new String[] { "*.*", "*.crt", "*.cert", "*.pem", "*" });
clientCAText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
UIUtils.createControlLabel(certGroup, "SSL certificate");
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.minimumWidth = 130;
clientCertText = new TextWithOpenFile(certGroup, "SSL Certificate", new String[] { "*.*", "*.cert", "*.pem", "*" });
clientCertText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
UIUtils.createControlLabel(certGroup, "SSL certificate key");
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.minimumWidth = 130;
clientKeyText = new TextWithOpenFile(certGroup, "SSL Certificate", new String[] { "*.*", "*.cert", "*.pem", "*" });
clientKeyText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
cipherSuitesText = UIUtils.createLabelText(certGroup, "Cipher suites (optional)", "");
cipherSuitesText.setToolTipText("Overrides the cipher suites enabled for use on the underlying SSL sockets.\nThis may be required when using external JSSE providers or to specify cipher suites compatible with both MySQL server and used JVM.");
}
{
Group advGroup = UIUtils.createControlGroup(composite, "Advanced", 2, GridData.FILL_HORIZONTAL, -1);
requireSSQL = UIUtils.createLabelCheckbox(advGroup, "Require SSL", "Require server support of SSL connection.", false);
veryServerCert = UIUtils.createLabelCheckbox(advGroup, "Verify server certificate", "Should the driver verify the server's certificate?\nWhen using this feature, the explicit certificate parameters should be specified, rather than system properties.", true);
allowPublicKeyRetrieval = UIUtils.createLabelCheckbox(advGroup, "Allow public key retrieval", "Allows special handshake roundtrip to get server RSA public key directly from server.", false);
}
// debugSSL = UIUtils.createLabelCheckbox(composite, "Debug SSL", "Prints debug information in standard output.", false);
}
use of org.jkiss.dbeaver.ui.controls.TextWithOpenFile in project dbeaver by dbeaver.
the class PostgreSSLConfigurator method createControl.
@Override
public void createControl(Composite parent) {
final Composite composite = new Composite(parent, SWT.NONE);
composite.setLayout(new GridLayout(1, false));
GridData gd = new GridData(GridData.FILL_BOTH);
gd.minimumHeight = 200;
composite.setLayoutData(gd);
{
Group certGroup = UIUtils.createControlGroup(composite, PostgreMessages.dialog_connection_network_postgres_ssl_certificates, 2, GridData.FILL_HORIZONTAL, -1);
UIUtils.createControlLabel(certGroup, PostgreMessages.dialog_connection_network_postgres_ssl_certificates_root);
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.minimumWidth = 130;
rootCertText = new TextWithOpenFile(certGroup, PostgreMessages.dialog_connection_network_postgres_ssl_certificates_ca, new String[] { "*.*", "*.crt", "*.cert", "*.pem", "*" });
rootCertText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
UIUtils.createControlLabel(certGroup, PostgreMessages.dialog_connection_network_postgres_ssl_certificates_ssl);
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.minimumWidth = 130;
clientCertText = new TextWithOpenFile(certGroup, PostgreMessages.dialog_connection_network_postgres_ssl_certificates_ssl, new String[] { "*.*", "*.cert", "*.pem", "*" });
clientCertText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
UIUtils.createControlLabel(certGroup, PostgreMessages.dialog_connection_network_postgres_ssl_certificates_ssl_key);
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.minimumWidth = 130;
clientKeyText = new TextWithOpenFile(certGroup, PostgreMessages.dialog_connection_network_postgres_ssl_certificates_ssl, new String[] { "*.*", "*.cert", "*.pem", "*" });
clientKeyText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
}
{
Group advGroup = UIUtils.createControlGroup(composite, PostgreMessages.dialog_connection_network_postgres_ssl_advanced, 2, GridData.FILL_HORIZONTAL, -1);
sslModeCombo = UIUtils.createLabelCombo(advGroup, PostgreMessages.dialog_connection_network_postgres_ssl_advanced_ssl_mode, SWT.READ_ONLY | SWT.DROP_DOWN);
sslModeCombo.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
for (String mode : SSL_MODES) {
sslModeCombo.add(mode);
}
sslFactoryCombo = UIUtils.createLabelCombo(advGroup, PostgreMessages.dialog_connection_network_postgres_ssl_advanced_ssl_factory, SWT.DROP_DOWN);
}
}
use of org.jkiss.dbeaver.ui.controls.TextWithOpenFile in project dbeaver by dbeaver.
the class MySQLSSLConfigurator method createControl.
// private Button debugSSL;
@Override
public void createControl(Composite parent) {
final Composite composite = new Composite(parent, SWT.NONE);
composite.setLayout(new GridLayout(1, false));
GridData gd = new GridData(GridData.FILL_BOTH);
gd.minimumHeight = 200;
composite.setLayoutData(gd);
{
Group certGroup = UIUtils.createControlGroup(composite, "Certificates", 2, GridData.FILL_HORIZONTAL, -1);
UIUtils.createControlLabel(certGroup, "CA certificate");
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.minimumWidth = 130;
clientCAText = new TextWithOpenFile(certGroup, "CA Certificate", new String[] { "*.*", "*.crt", "*.cert", "*.pem", "*" });
clientCAText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
UIUtils.createControlLabel(certGroup, "SSL certificate");
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.minimumWidth = 130;
clientCertText = new TextWithOpenFile(certGroup, "SSL Certificate", new String[] { "*.*", "*.cert", "*.pem", "*" });
clientCertText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
UIUtils.createControlLabel(certGroup, "SSL certificate key");
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.minimumWidth = 130;
clientKeyText = new TextWithOpenFile(certGroup, "SSL Certificate", new String[] { "*.*", "*.cert", "*.pem", "*" });
clientKeyText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
cipherSuitesText = UIUtils.createLabelText(certGroup, "Cipher suites (optional)", "");
cipherSuitesText.setToolTipText("Overrides the cipher suites enabled for use on the underlying SSL sockets.\nThis may be required when using external JSSE providers or to specify cipher suites compatible with both MySQL server and used JVM.");
}
{
Group advGroup = UIUtils.createControlGroup(composite, "Advanced", 2, GridData.FILL_HORIZONTAL, -1);
requireSSQL = UIUtils.createLabelCheckbox(advGroup, "Require SSL", "Require server support of SSL connection.", false);
veryServerCert = UIUtils.createLabelCheckbox(advGroup, "Verify server certificate", "Should the driver verify the server's certificate?\nWhen using this feature, the explicit certificate parameters should be specified, rather than system properties.", true);
allowPublicKeyRetrieval = UIUtils.createLabelCheckbox(advGroup, "Allow public key retrieval", "Allows special handshake roundtrip to get server RSA public key directly from server.", false);
}
// debugSSL = UIUtils.createLabelCheckbox(composite, "Debug SSL", "Prints debug information in standard output.", false);
}
Aggregations