use of org.eclipse.swt.widgets.TabFolder in project GT by Tencent.
the class SettingView method createTabs.
private void createTabs(Composite parent) {
TabFolder tabFolder = new TabFolder(parent, SWT.None);
createSettingTabItem(tabFolder);
createCPUTabItem(tabFolder);
createMemTabItem(tabFolder);
}
use of org.eclipse.swt.widgets.TabFolder in project translationstudio8 by heartsome.
the class SpellPage method createContents.
@Override
protected Control createContents(Composite parent) {
isInit = true;
Composite tParent = new Composite(parent, SWT.BORDER);
tParent.setLayoutData(new GridData(GridData.FILL_BOTH));
tParent.setLayout(new GridLayout());
addSpellInstalGroup(tParent);
tabFolder = new TabFolder(tParent, SWT.NONE);
tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
hunspellTabItem = new TabItem(tabFolder, SWT.NONE);
hunspellTabItem.setText(Messages.getString("qa.preference.SpellPage.hunspellTab"));
aspellTabItem = new TabItem(tabFolder, SWT.NONE);
aspellTabItem.setText(Messages.getString("qa.preference.SpellPage.aspellTab"));
createHunspellCmp();
createAspellCmp();
initData();
return parent;
}
use of org.eclipse.swt.widgets.TabFolder in project azure-tools-for-java by Microsoft.
the class AppServiceCreateDialog method createDialogArea.
@Override
protected Control createDialogArea(Composite parent) {
setMessage("Create Azure App Service");
setTitle("Create App Service");
Composite area = (Composite) super.createDialogArea(parent);
Composite composite = new Composite(area, SWT.NONE);
composite.setLayout(new GridLayout(1, false));
composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));
Group grpAppService = new Group(composite, SWT.NONE);
grpAppService.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));
grpAppService.setLayout(new GridLayout(3, false));
Label lblAppName = new Label(grpAppService, SWT.NONE);
lblAppName.setText("Enter name");
textAppName = new Text(grpAppService, SWT.BORDER);
textAppName.addFocusListener(new FocusAdapter() {
@Override
public void focusGained(FocusEvent e) {
cleanError();
}
});
textAppName.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
textAppName.setMessage("<enter name>");
dec_textAppName = decorateContorolAndRegister(textAppName);
Label lblazurewebsitescom = new Label(grpAppService, SWT.NONE);
lblazurewebsitescom.setText(".azurewebsites.net");
Label lblWebContainer = new Label(grpAppService, SWT.NONE);
lblWebContainer.setText("Web container");
comboWebContainer = new Combo(grpAppService, SWT.READ_ONLY);
comboWebContainer.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
dec_comboWebContainer = decorateContorolAndRegister(comboWebContainer);
Label lblSubscription = new Label(grpAppService, SWT.NONE);
lblSubscription.setText("Subscription");
comboSubscription = new Combo(grpAppService, SWT.READ_ONLY);
comboSubscription.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
fillResourceGroups();
fillAppServicePlans();
fillAppServicePlansDetails();
fillAppServicePlanLocations();
}
});
dec_comboSubscription = decorateContorolAndRegister(comboSubscription);
comboSubscription.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
// ====
tabFolder = new TabFolder(composite, SWT.NONE);
tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
tabItemAppServicePlan = new TabItem(tabFolder, SWT.NONE);
tabItemAppServicePlan.setText("App service plan");
compositeAppServicePlan = new Composite(tabFolder, SWT.NONE);
tabItemAppServicePlan.setControl(compositeAppServicePlan);
compositeAppServicePlan.setLayout(new GridLayout(2, false));
btnAppServiceCreateNew = new Button(compositeAppServicePlan, SWT.RADIO);
btnAppServiceCreateNew.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
radioAppServicePlanLogic();
}
});
btnAppServiceCreateNew.setSelection(true);
btnAppServiceCreateNew.setBounds(0, 0, 90, 16);
btnAppServiceCreateNew.setText("Create new");
textAppSevicePlanName = new Text(compositeAppServicePlan, SWT.BORDER);
textAppSevicePlanName.addFocusListener(new FocusAdapter() {
@Override
public void focusGained(FocusEvent e) {
cleanError();
}
});
textAppSevicePlanName.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
textAppSevicePlanName.setMessage("<enter name>");
dec_textAppSevicePlanName = decorateContorolAndRegister(textAppSevicePlanName);
lblAppServiceCreateNewLocation = new Label(compositeAppServicePlan, SWT.NONE);
GridData gd_lblAppServiceCreateNewLocation = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_lblAppServiceCreateNewLocation.horizontalIndent = 15;
lblAppServiceCreateNewLocation.setLayoutData(gd_lblAppServiceCreateNewLocation);
lblAppServiceCreateNewLocation.setText("Location");
comboAppServicePlanLocation = new Combo(compositeAppServicePlan, SWT.READ_ONLY);
comboAppServicePlanLocation.addFocusListener(new FocusAdapter() {
@Override
public void focusGained(FocusEvent e) {
cleanError();
}
});
comboAppServicePlanLocation.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
dec_comboAppServicePlanLocation = decorateContorolAndRegister(comboAppServicePlanLocation);
lblAppServiceCreateNewPricingTier = new Label(compositeAppServicePlan, SWT.NONE);
GridData gd_lblAppServiceCreateNewPricingTier = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_lblAppServiceCreateNewPricingTier.horizontalIndent = 15;
lblAppServiceCreateNewPricingTier.setLayoutData(gd_lblAppServiceCreateNewPricingTier);
lblAppServiceCreateNewPricingTier.setText("Pricing tier");
comboAppServicePlanPricingTier = new Combo(compositeAppServicePlan, SWT.READ_ONLY);
comboAppServicePlanPricingTier.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
btnAppServiceUseExisting = new Button(compositeAppServicePlan, SWT.RADIO);
btnAppServiceUseExisting.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
radioAppServicePlanLogic();
}
});
btnAppServiceUseExisting.setText("Use existing");
comboAppServicePlan = new Combo(compositeAppServicePlan, SWT.READ_ONLY);
comboAppServicePlan.setEnabled(false);
comboAppServicePlan.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
comboAppServicePlan.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
fillAppServicePlansDetails();
}
});
comboAppServicePlan.setBounds(0, 0, 26, 22);
dec_comboAppServicePlan = decorateContorolAndRegister(comboAppServicePlan);
lblAppServiceUseExictingLocation = new Label(compositeAppServicePlan, SWT.NONE);
lblAppServiceUseExictingLocation.setEnabled(false);
GridData gd_lblAppServiceUseExictingLocation = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_lblAppServiceUseExictingLocation.horizontalIndent = 15;
lblAppServiceUseExictingLocation.setLayoutData(gd_lblAppServiceUseExictingLocation);
lblAppServiceUseExictingLocation.setText("Location");
lblAppSevicePlanLocation = new Label(compositeAppServicePlan, SWT.NONE);
lblAppSevicePlanLocation.setEnabled(false);
lblAppSevicePlanLocation.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
lblAppSevicePlanLocation.setText("N/A");
lblAppServiceUseExistiogPrisingTier = new Label(compositeAppServicePlan, SWT.NONE);
lblAppServiceUseExistiogPrisingTier.setEnabled(false);
GridData gd_lblAppServiceUseExistiogPrisingTier = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_lblAppServiceUseExistiogPrisingTier.horizontalIndent = 15;
lblAppServiceUseExistiogPrisingTier.setLayoutData(gd_lblAppServiceUseExistiogPrisingTier);
lblAppServiceUseExistiogPrisingTier.setText("Pricing tier");
lblAppServicePlanPricingTier = new Label(compositeAppServicePlan, SWT.NONE);
lblAppServicePlanPricingTier.setEnabled(false);
lblAppServicePlanPricingTier.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
lblAppServicePlanPricingTier.setText("N/A");
new Label(compositeAppServicePlan, SWT.NONE);
//dec_comboAppServicePlanPricingTier = decorateContorolAndRegister(comboAppServicePlanPricingTier);
linkAppServicePricing = new Link(compositeAppServicePlan, SWT.NONE);
linkAppServicePricing.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
linkAppServicePricing.setText("<a>App service pricing details</a>");
linkAppServicePricing.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
try {
PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser().openURL(new URL("https://azure.microsoft.com/en-us/pricing/details/app-service/"));
} catch (PartInitException | MalformedURLException ex) {
LOG.log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "widgetSelected@SelectionAdapter@linkAppServicePricing@AppServiceCreateDialog", ex));
}
}
});
tabItemResourceGroup = new TabItem(tabFolder, SWT.NONE);
tabItemResourceGroup.setText("Resource group");
compositeResourceGroup = new Composite(tabFolder, SWT.NONE);
tabItemResourceGroup.setControl(compositeResourceGroup);
compositeResourceGroup.setLayout(new GridLayout(2, false));
btnResourceGroupCreateNew = new Button(compositeResourceGroup, SWT.RADIO);
btnResourceGroupCreateNew.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
radioResourceGroupLogic();
}
});
btnResourceGroupCreateNew.setSelection(true);
btnResourceGroupCreateNew.setText("Create new");
textResourceGroupName = new Text(compositeResourceGroup, SWT.BORDER);
textResourceGroupName.addFocusListener(new FocusAdapter() {
@Override
public void focusGained(FocusEvent e) {
cleanError();
}
});
textResourceGroupName.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
textResourceGroupName.setBounds(0, 0, 64, 19);
textResourceGroupName.setMessage("<enter name>");
dec_textNewResGrName = decorateContorolAndRegister(textResourceGroupName);
btnResourceGroupUseExisting = new Button(compositeResourceGroup, SWT.RADIO);
btnResourceGroupUseExisting.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
radioResourceGroupLogic();
}
});
btnResourceGroupUseExisting.setText("Use existing");
comboResourceGroup = new Combo(compositeResourceGroup, SWT.READ_ONLY);
comboResourceGroup.setEnabled(false);
comboResourceGroup.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
comboResourceGroup.setBounds(0, 0, 26, 22);
dec_comboSelectResGr = decorateContorolAndRegister(comboResourceGroup);
tabItemJDK = new TabItem(tabFolder, SWT.NONE);
tabItemJDK.setText("JDK");
compositeJDK = new Composite(tabFolder, SWT.NONE);
tabItemJDK.setControl(compositeJDK);
compositeJDK.setLayout(new GridLayout(3, false));
btnJdkDefault = new Button(compositeJDK, SWT.RADIO);
btnJdkDefault.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
radioJdkLogic();
}
});
btnJdkDefault.setSelection(true);
btnJdkDefault.setText("Default");
lblJdkDefaultComment = new Label(compositeJDK, SWT.NONE);
lblJdkDefaultComment.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
lblJdkDefaultComment.setText("Deploy the default JDK (JDK 8)");
new Label(compositeJDK, SWT.NONE);
btnJdk3rdParty = new Button(compositeJDK, SWT.RADIO);
btnJdk3rdParty.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
radioJdkLogic();
}
});
btnJdk3rdParty.setText("3rd party");
comboJdk3Party = new Combo(compositeJDK, SWT.READ_ONLY);
comboJdk3Party.setEnabled(false);
comboJdk3Party.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
dec_comboJdk3Party = decorateContorolAndRegister(comboJdk3Party);
linkJdkLicense = new Link(compositeJDK, SWT.NONE);
linkJdkLicense.setEnabled(false);
linkJdkLicense.setText("<a>License</a>");
linkJdkLicense.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
try {
PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser().openURL(new URL(AzulZuluModel.getLicenseUrl()));
} catch (Exception ex) {
LOG.log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "widgetSelected@SelectionAdapter@AppServiceCreateDialo", ex));
}
}
});
btnJdkOwnDownloadUrl = new Button(compositeJDK, SWT.RADIO);
btnJdkOwnDownloadUrl.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
radioJdkLogic();
}
});
btnJdkOwnDownloadUrl.setText("Download URL");
textJdkOwnUrl = new Text(compositeJDK, SWT.BORDER);
textJdkOwnUrl.addFocusListener(new FocusAdapter() {
@Override
public void focusGained(FocusEvent e) {
cleanError();
}
});
textJdkOwnUrl.setEnabled(false);
textJdkOwnUrl.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
textJdkOwnUrl.setMessage("<enter url>");
dec_textJdkOwnUrl = decorateContorolAndRegister(textJdkOwnUrl);
new Label(compositeJDK, SWT.NONE);
lblJdkOwnSrorageAccountKey = new Label(compositeJDK, SWT.NONE);
GridData gd_lblJdkOwnSrorageAccountKey = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_lblJdkOwnSrorageAccountKey.horizontalIndent = 15;
lblJdkOwnSrorageAccountKey.setLayoutData(gd_lblJdkOwnSrorageAccountKey);
lblJdkOwnSrorageAccountKey.setText("Storage account key");
textJdkOwnStorageAccountKey = new Text(compositeJDK, SWT.BORDER);
textJdkOwnStorageAccountKey.setEnabled(false);
textJdkOwnStorageAccountKey.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
textJdkOwnStorageAccountKey.setMessage("<enter storage account key>");
decorateContorolAndRegister(textJdkOwnStorageAccountKey);
new Label(compositeJDK, SWT.NONE);
new Label(compositeJDK, SWT.NONE);
lblJdkOwnComment = new Label(compositeJDK, SWT.NONE);
lblJdkOwnComment.setEnabled(false);
lblJdkOwnComment.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
lblJdkOwnComment.setText("(If the URL above is a private blob)");
new Label(compositeJDK, SWT.NONE);
DateFormat df = new SimpleDateFormat("yyMMddHHmmss");
String date = df.format(new Date());
textAppName.setText("webapp-" + date);
textAppSevicePlanName.setText("asp-" + date);
textResourceGroupName.setText("rg-webapp-" + date);
fillWebContainers();
fillSubscriptions();
fillResourceGroups();
fillAppServicePlans();
fillAppServicePlansDetails();
fillAppServicePlanLocations();
fillAppServicePlanPricingTiers();
fill3PartyJdk();
return area;
}
use of org.eclipse.swt.widgets.TabFolder in project azure-tools-for-java by Microsoft.
the class AzureNewDockerLoginPage method createControl.
/**
* Create contents of the wizard.
* @param parent
*/
public void createControl(Composite parent) {
Composite mainContainer = new Composite(parent, SWT.NONE);
setControl(mainContainer);
mainContainer.setLayout(new GridLayout(2, false));
dockerHostImportKeyvaultCredsRadioButton = new Button(mainContainer, SWT.RADIO);
GridData gd_dockerHostImportKeyvaultCredsRadioButton = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_dockerHostImportKeyvaultCredsRadioButton.horizontalIndent = 5;
dockerHostImportKeyvaultCredsRadioButton.setLayoutData(gd_dockerHostImportKeyvaultCredsRadioButton);
dockerHostImportKeyvaultCredsRadioButton.setText("Import credentials from Azure Key Vault:");
dockerHostImportKeyvaultComboBox = new Combo(mainContainer, SWT.READ_ONLY);
GridData gd_dockerHostImportKeyvaultComboBox = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_dockerHostImportKeyvaultComboBox.widthHint = 230;
dockerHostImportKeyvaultComboBox.setLayoutData(gd_dockerHostImportKeyvaultComboBox);
dockerHostNewCredsRadioButton = new Button(mainContainer, SWT.RADIO);
GridData gd_dockerHostNewCredsRadioButton = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_dockerHostNewCredsRadioButton.horizontalIndent = 5;
dockerHostNewCredsRadioButton.setLayoutData(gd_dockerHostNewCredsRadioButton);
dockerHostNewCredsRadioButton.setText("New log in credentials:");
new Label(mainContainer, SWT.NONE);
credsTabfolder = new TabFolder(mainContainer, SWT.NONE);
GridData gd_credsTabfolder = new GridData(SWT.FILL, SWT.FILL, true, false, 2, 2);
gd_credsTabfolder.heightHint = 235;
credsTabfolder.setLayoutData(gd_credsTabfolder);
vmCredsTableItem = new TabItem(credsTabfolder, SWT.NONE);
vmCredsTableItem.setText("VM Credentials");
Composite vmCredsComposite = new Composite(credsTabfolder, SWT.NONE);
vmCredsTableItem.setControl(vmCredsComposite);
vmCredsComposite.setLayout(new GridLayout(6, false));
Label lblUsername = new Label(vmCredsComposite, SWT.NONE);
GridData gd_lblUsername = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);
gd_lblUsername.horizontalIndent = 5;
lblUsername.setLayoutData(gd_lblUsername);
lblUsername.setText("Username:");
dockerHostUsernameTextField = new Text(vmCredsComposite, SWT.BORDER);
GridData gd_dockerHostUsernameTextField = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_dockerHostUsernameTextField.widthHint = 150;
dockerHostUsernameTextField.setLayoutData(gd_dockerHostUsernameTextField);
new Label(vmCredsComposite, SWT.NONE);
new Label(vmCredsComposite, SWT.NONE);
new Label(vmCredsComposite, SWT.NONE);
Label lblPassword = new Label(vmCredsComposite, SWT.NONE);
GridData gd_lblPassword = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);
gd_lblPassword.horizontalIndent = 5;
lblPassword.setLayoutData(gd_lblPassword);
lblPassword.setText("Password:");
dockerHostFirstPwdField = new Text(vmCredsComposite, SWT.BORDER | SWT.PASSWORD);
GridData gd_dockerHostFirstPwdField = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_dockerHostFirstPwdField.widthHint = 150;
dockerHostFirstPwdField.setLayoutData(gd_dockerHostFirstPwdField);
dockerHostPwdLabel = new Label(vmCredsComposite, SWT.NONE);
dockerHostPwdLabel.setText("(Optional)");
new Label(vmCredsComposite, SWT.NONE);
new Label(vmCredsComposite, SWT.NONE);
Label lblConfirm = new Label(vmCredsComposite, SWT.NONE);
GridData gd_lblConfirm = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);
gd_lblConfirm.horizontalIndent = 5;
lblConfirm.setLayoutData(gd_lblConfirm);
lblConfirm.setText("Confirm:");
dockerHostSecondPwdField = new Text(vmCredsComposite, SWT.BORDER | SWT.PASSWORD);
GridData gd_dockerHostSecondPwdField = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_dockerHostSecondPwdField.widthHint = 150;
dockerHostSecondPwdField.setLayoutData(gd_dockerHostSecondPwdField);
new Label(vmCredsComposite, SWT.NONE);
new Label(vmCredsComposite, SWT.NONE);
new Label(vmCredsComposite, SWT.NONE);
new Label(vmCredsComposite, SWT.NONE);
new Label(vmCredsComposite, SWT.NONE);
new Label(vmCredsComposite, SWT.NONE);
new Label(vmCredsComposite, SWT.NONE);
new Label(vmCredsComposite, SWT.NONE);
new Label(vmCredsComposite, SWT.NONE);
Label lblSsh = new Label(vmCredsComposite, SWT.NONE);
GridData gd_lblSsh = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_lblSsh.horizontalIndent = 5;
lblSsh.setLayoutData(gd_lblSsh);
lblSsh.setText("SSH");
Label label = new Label(vmCredsComposite, SWT.SEPARATOR | SWT.HORIZONTAL);
label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 5, 1));
dockerHostNoSshRadioButton = new Button(vmCredsComposite, SWT.RADIO);
GridData gd_dockerHostNoSshRadioButton = new GridData(SWT.LEFT, SWT.CENTER, false, false, 4, 1);
gd_dockerHostNoSshRadioButton.horizontalIndent = 5;
dockerHostNoSshRadioButton.setLayoutData(gd_dockerHostNoSshRadioButton);
dockerHostNoSshRadioButton.setText("None");
new Label(vmCredsComposite, SWT.NONE);
new Label(vmCredsComposite, SWT.NONE);
dockerHostAutoSshRadioButton = new Button(vmCredsComposite, SWT.RADIO);
GridData gd_dockerHostAutoSshRadioButton = new GridData(SWT.LEFT, SWT.CENTER, false, false, 4, 1);
gd_dockerHostAutoSshRadioButton.horizontalIndent = 5;
dockerHostAutoSshRadioButton.setLayoutData(gd_dockerHostAutoSshRadioButton);
dockerHostAutoSshRadioButton.setText("Auto-generate");
new Label(vmCredsComposite, SWT.NONE);
new Label(vmCredsComposite, SWT.NONE);
dockerHostImportSshRadioButton = new Button(vmCredsComposite, SWT.RADIO);
GridData gd_dockerHostImportSshRadioButton = new GridData(SWT.LEFT, SWT.CENTER, false, false, 4, 1);
gd_dockerHostImportSshRadioButton.horizontalIndent = 5;
dockerHostImportSshRadioButton.setLayoutData(gd_dockerHostImportSshRadioButton);
dockerHostImportSshRadioButton.setText("Import from directory:");
new Label(vmCredsComposite, SWT.NONE);
new Label(vmCredsComposite, SWT.NONE);
dockerHostImportSSHTextField = new Text(vmCredsComposite, SWT.BORDER);
GridData gd_dockerHostImportSSHTextField = new GridData(SWT.FILL, SWT.CENTER, true, false, 5, 1);
gd_dockerHostImportSSHTextField.horizontalIndent = 24;
dockerHostImportSSHTextField.setLayoutData(gd_dockerHostImportSSHTextField);
dockerHostImportSSHBrowseButton = new Button(vmCredsComposite, SWT.NONE);
dockerHostImportSSHBrowseButton.setText("Browse...");
daemonCredsTableItem = new TabItem(credsTabfolder, SWT.NONE);
daemonCredsTableItem.setText("Docker Daemon Credentials");
Composite daemonCredsComposite = new Composite(credsTabfolder, SWT.NONE);
daemonCredsTableItem.setControl(daemonCredsComposite);
daemonCredsComposite.setLayout(new GridLayout(4, false));
Label lblDockerDaemonPort = new Label(daemonCredsComposite, SWT.NONE);
GridData gd_lblDockerDaemonPort = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);
gd_lblDockerDaemonPort.horizontalIndent = 5;
lblDockerDaemonPort.setLayoutData(gd_lblDockerDaemonPort);
lblDockerDaemonPort.setText("Docker daemon port:");
dockerDaemonPortTextField = new Text(daemonCredsComposite, SWT.BORDER);
GridData gd_dockerDaemonPortTextField = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_dockerDaemonPortTextField.widthHint = 50;
dockerDaemonPortTextField.setLayoutData(gd_dockerDaemonPortTextField);
new Label(daemonCredsComposite, SWT.NONE);
Label lblTlsSecurity = new Label(daemonCredsComposite, SWT.NONE);
GridData gd_lblTlsSecurity = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_lblTlsSecurity.horizontalIndent = 5;
lblTlsSecurity.setLayoutData(gd_lblTlsSecurity);
lblTlsSecurity.setText("TLS security");
Label label_1 = new Label(daemonCredsComposite, SWT.SEPARATOR | SWT.HORIZONTAL);
label_1.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));
dockerHostNoTlsRadioButton = new Button(daemonCredsComposite, SWT.RADIO);
GridData gd_dockerHostNoTlsRadioButton = new GridData(SWT.LEFT, SWT.CENTER, false, false, 3, 1);
gd_dockerHostNoTlsRadioButton.horizontalIndent = 5;
dockerHostNoTlsRadioButton.setLayoutData(gd_dockerHostNoTlsRadioButton);
dockerHostNoTlsRadioButton.setText("None");
new Label(daemonCredsComposite, SWT.NONE);
dockerHostAutoTlsRadioButton = new Button(daemonCredsComposite, SWT.RADIO);
GridData gd_dockerHostAutoTlsRadioButton = new GridData(SWT.LEFT, SWT.CENTER, false, false, 3, 1);
gd_dockerHostAutoTlsRadioButton.horizontalIndent = 5;
dockerHostAutoTlsRadioButton.setLayoutData(gd_dockerHostAutoTlsRadioButton);
dockerHostAutoTlsRadioButton.setText("Auto-generate");
new Label(daemonCredsComposite, SWT.NONE);
dockerHostImportTlsRadioButton = new Button(daemonCredsComposite, SWT.RADIO);
GridData gd_dockerHostImportTlsRadioButton = new GridData(SWT.LEFT, SWT.CENTER, false, false, 3, 1);
gd_dockerHostImportTlsRadioButton.horizontalIndent = 5;
dockerHostImportTlsRadioButton.setLayoutData(gd_dockerHostImportTlsRadioButton);
dockerHostImportTlsRadioButton.setText("Import from directory:");
new Label(daemonCredsComposite, SWT.NONE);
dockerHostImportTLSTextField = new Text(daemonCredsComposite, SWT.BORDER);
GridData gd_dockerHostImportTLSTextField = new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1);
gd_dockerHostImportTLSTextField.horizontalIndent = 24;
dockerHostImportTLSTextField.setLayoutData(gd_dockerHostImportTLSTextField);
dockerHostImportTLSBrowseButton = new Button(daemonCredsComposite, SWT.NONE);
dockerHostImportTLSBrowseButton.setText("Browse...");
dockerHostSaveCredsCheckBox = new Button(mainContainer, SWT.CHECK);
GridData gd_dockerHostSaveCredsCheckBox = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_dockerHostSaveCredsCheckBox.horizontalIndent = 5;
dockerHostSaveCredsCheckBox.setLayoutData(gd_dockerHostSaveCredsCheckBox);
dockerHostSaveCredsCheckBox.setText("Save credentials into a new Azure Key Vault:");
dockerHostNewKeyvaultTextField = new Text(mainContainer, SWT.BORDER);
GridData gd_dockerHostNewKeyvaultTextField = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_dockerHostNewKeyvaultTextField.widthHint = 210;
dockerHostNewKeyvaultTextField.setLayoutData(gd_dockerHostNewKeyvaultTextField);
FormToolkit toolkit = new FormToolkit(mainContainer.getDisplay());
toolkit.getHyperlinkGroup().setHyperlinkUnderlineMode(HyperlinkSettings.UNDERLINE_HOVER);
managedForm = new ManagedForm(mainContainer);
errMsgForm = managedForm.getForm();
errMsgForm.setVisible(false);
// errMsgForm.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1));
// errMsgForm.setBackground(mainContainer.getBackground());
errDispatcher = managedForm.getMessageManager();
// errDispatcher.addMessage("dockerHostNameTextField", "Test error", null, IMessageProvider.ERROR, dockerHostNameTextField);
// errMsgForm.setMessage("This is an error message", IMessageProvider.ERROR);
initUIMainContainer(mainContainer);
mainContainer.setTabList(new Control[] { dockerHostImportKeyvaultCredsRadioButton, dockerHostImportKeyvaultComboBox, dockerHostNewCredsRadioButton, credsTabfolder, dockerHostSaveCredsCheckBox, dockerHostNewKeyvaultTextField });
}
use of org.eclipse.swt.widgets.TabFolder in project cubrid-manager by CUBRID.
the class EditFunctionDialog method createDialogArea.
protected Control createDialogArea(Composite parent) {
isCommentSupport = CompatibleUtil.isCommentSupports(database.getDatabaseInfo());
Composite parentComp = (Composite) super.createDialogArea(parent);
Composite composite = new Composite(parentComp, SWT.NONE);
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
GridLayout layout = new GridLayout();
layout.numColumns = 2;
layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
composite.setLayout(layout);
tabFolder = new TabFolder(composite, SWT.NONE);
tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
layout = new GridLayout();
tabFolder.setLayout(layout);
TabItem item = new TabItem(tabFolder, SWT.NONE);
item.setText(Messages.tabItemFuncSetting);
Composite functionComposite = createFunctionSettingComposite();
item.setControl(functionComposite);
item = new TabItem(tabFolder, SWT.NONE);
item.setText(Messages.tabItemSQLScript);
Composite sqlComp = createSqlScriptComposite();
item.setControl(sqlComp);
tabFolder.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
if (tabFolder.getSelectionIndex() == 0) {
funcNameText.setFocus();
} else if (tabFolder.getSelectionIndex() == tabFolder.getItemCount() - 1) {
sqlScriptText.setText(getSQLScript());
}
}
});
initialize();
if (isNewFlag()) {
setTitle(Messages.titleAddFunctionDialog);
setMessage(Messages.msgAddFunctionDialog);
funcNameText.setFocus();
} else {
setTitle(Messages.titleEditFunctionDialog);
setMessage(Messages.msgEditFunctionDialog);
}
return parentComp;
}
Aggregations