use of org.talend.commons.ui.swt.formtools.LabelledCombo in project tbd-studio-se by Talend.
the class Neo4jConnForm method addConnectionGroup.
private void addConnectionGroup(Composite composite) {
// $NON-NLS-1$
connectionGroup = Form.createGroup(composite, 4, "Connection");
connectionGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
GridLayout gpLayout = new GridLayout(2, true);
gpLayout.marginWidth = 5;
gpLayout.marginHeight = 5;
connectionGroup.setLayout(gpLayout);
Composite versionComposite = new Composite(connectionGroup, SWT.NONE);
versionComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 4, 1));
GridLayout versionCompLayout = new GridLayout(4, false);
versionCompLayout.marginWidth = 0;
versionCompLayout.marginHeight = 0;
versionComposite.setLayout(versionCompLayout);
// create DB_Version Combo
NoSQLRepositoryFactory repFactory = NoSQLRepositoryFactory.getInstance();
List<String> dbVersions = repFactory.getDBVersions(getConnection().getDbType());
List<String> dbVersionLabels = repositoryTranslator.getLabels(dbVersions);
dbVersionCombo = new LabelledCombo(versionComposite, Messages.getString("MongoDBConnForm.dbVersion"), Messages.getString("MongoDBConnForm.dbVersionTip"), dbVersionLabels.toArray(new String[0]), 3, // $NON-NLS-1$ //$NON-NLS-2$
true);
getConnection().getAttributes().put(INeo4jAttributes.REMOTE_SERVER, String.valueOf(true));
authArea = new Composite(connectionGroup, SWT.NONE);
GridData authParentGd = new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1);
authArea.setLayoutData(authParentGd);
GridLayout authLayout = new GridLayout(4, false);
authLayout.marginWidth = 0;
authLayout.marginHeight = 0;
authArea.setLayout(authLayout);
setUsernameBtn = new Button(authArea, SWT.CHECK);
// $NON-NLS-1$
setUsernameBtn.setText(Messages.getString("Neo4jConnForm.setUsername.label"));
GridData setUsernameBtnGD = new GridData();
setUsernameBtnGD.horizontalSpan = 4;
setUsernameBtn.setLayoutData(setUsernameBtnGD);
// $NON-NLS-1$
userText = new LabelledText(authArea, Messages.getString("CassandraConnForm.username"), 1);
pwdText = new LabelledText(authArea, Messages.getString("CassandraConnForm.password"), 1, // $NON-NLS-1$
SWT.PASSWORD | SWT.BORDER | SWT.SINGLE);
pwdText.getTextControl().setEchoChar('*');
dbComposite = new Composite(connectionGroup, SWT.NONE);
GridData dbCompGD = new GridData(GridData.FILL_BOTH);
dbCompGD.horizontalSpan = 2;
dbComposite.setLayoutData(dbCompGD);
dbLayout = new StackLayout();
dbComposite.setLayout(dbLayout);
localDBComposite = new Composite(dbComposite, SWT.NONE);
localDBComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
GridLayout localDBCompLayout = new GridLayout(4, false);
localDBCompLayout.marginWidth = 0;
localDBCompLayout.marginHeight = 0;
localDBComposite.setLayout(localDBCompLayout);
// $NON-NLS-1$
dbPathTxt = new LabelledText(localDBComposite, Messages.getString("Neo4jConnForm.dbPath.label"), 2);
dbPathTxt.getTextControl().setEditable(false);
browseDbPathBtn = new Button(localDBComposite, SWT.NONE);
// $NON-NLS-1$
browseDbPathBtn.setText("...");
// $NON-NLS-1$
absPathTxt = new LabelledText(localDBComposite, Messages.getString("Neo4jConnForm.absPath.label"), 2);
absPathTxt.getTextControl().setEditable(false);
absPathTxt.setHideWidgets(true);
remoteDBComposite = new Composite(dbComposite, SWT.NONE);
remoteDBComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
GridLayout remoteDBCompLayout = new GridLayout(4, false);
remoteDBCompLayout.marginWidth = 0;
remoteDBCompLayout.marginHeight = 0;
remoteDBComposite.setLayout(remoteDBCompLayout);
// $NON-NLS-1$
serverURLTxt = new LabelledText(remoteDBComposite, Messages.getString("Neo4jConnForm.serverURL.label"));
}
use of org.talend.commons.ui.swt.formtools.LabelledCombo in project tbd-studio-se by Talend.
the class StandardHCInfoForm method addCustomFields.
private void addCustomFields() {
// $NON-NLS-1$
customGroup = Form.createGroup(this, 4, Messages.getString("HadoopClusterForm.customSettings"));
customGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
authenticationCombo = new LabelledCombo(customGroup, // $NON-NLS-1$
Messages.getString("HadoopClusterForm.authentication"), Messages.getString("HadoopClusterForm.authentication.tooltip"), // $NON-NLS-1$
EAuthenticationMode.getAllAuthenticationDisplayNames().toArray(new String[0]), 1, false);
}
use of org.talend.commons.ui.swt.formtools.LabelledCombo in project tbd-studio-se by Talend.
the class HadoopClusterForm method addVersionFields.
private void addVersionFields() {
// $NON-NLS-1$
Group distributionGroup = Form.createGroup(this, 4, Messages.getString("HadoopClusterForm.versionSettings"));
distributionGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
distributionCombo = new LabelledCombo(distributionGroup, // $NON-NLS-1$
Messages.getString("HadoopClusterForm.distribution"), // $NON-NLS-1$
Messages.getString("HadoopClusterForm.distribution.tooltip"), // $NON-NLS-1$
HadoopDistributionsHelper.HADOOP.getDistributionsDisplay(true), 1, true);
distributionCombo.setVisibleItemCount(VISIBLE_DISTRIBUTION_COUNT);
versionCombo = new // $NON-NLS-1$
LabelledCombo(// $NON-NLS-1$
distributionGroup, // $NON-NLS-1$
Messages.getString("HadoopClusterForm.version"), Messages.getString("HadoopClusterForm.version.tooltip"), new String[0], 1, // $NON-NLS-1$
true);
versionCombo.setVisibleItemCount(VISIBLE_VERSION_COUNT);
customButton = new Button(distributionGroup, SWT.NULL);
customButton.setImage(ImageProvider.getImage(EImage.THREE_DOTS_ICON));
customButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, true, false, 2, 1));
useYarnButton = new Button(distributionGroup, SWT.CHECK);
// $NON-NLS-1$
useYarnButton.setText(Messages.getString("HadoopClusterForm.useYarn"));
useYarnButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, true, false, 2, 1));
useKnoxButton = new Button(distributionGroup, SWT.CHECK);
// $NON-NLS-1$
useKnoxButton.setText(Messages.getString("HadoopClusterForm.useKnox"));
useKnoxButton.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, true, false, 2, 1));
}
Aggregations