in PluginsAndFeatures/azure-toolkit-for-eclipse/com.microsoft.azuretools.appservice/src/com/microsoft/azuretools/appservice/ui/AppServiceCreateDialog.java [369:500]
private void createASPGroup(Composite composite) {
Group group = new Group(composite, SWT.NONE);
FontDescriptor boldDescriptor = FontDescriptor.createFrom(group.getFont()).setStyle(SWT.BOLD);
Font boldFont = boldDescriptor.createFont(group.getDisplay());
group.setFont(boldFont);
group.setText(GROUP_APP_SERVICE_PLAN);
group.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
group.setLayout(new FillLayout());
compositeAppServicePlan = new Composite(group, SWT.NONE);
compositeAppServicePlan.setLayout(new GridLayout(2, false));
btnAppServiceUseExisting = new Button(compositeAppServicePlan, SWT.RADIO);
btnAppServiceUseExisting.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
radioAppServicePlanLogic();
}
});
btnAppServiceUseExisting.setText(BTN_USE_EXISTING);
btnAppServiceUseExisting.setSelection(true);
comboAppServicePlan = new Combo(compositeAppServicePlan, SWT.READ_ONLY);
comboAppServicePlan.setEnabled(true);
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);
AccessibilityUtils.addAccessibilityNameForUIComponent(comboAppServicePlan, "Existing app service plan");
lblAppServiceUseExictingLocation = new Label(compositeAppServicePlan, SWT.NONE);
lblAppServiceUseExictingLocation.setEnabled(true);
GridData gdLblAppServiceUseExictingLocation = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gdLblAppServiceUseExictingLocation.horizontalIndent = 20;
lblAppServiceUseExictingLocation.setLayoutData(gdLblAppServiceUseExictingLocation);
lblAppServiceUseExictingLocation.setText(LBL_LOCATION);
lblAppSevicePlanLocation = new Label(compositeAppServicePlan, SWT.NONE);
lblAppSevicePlanLocation.setEnabled(true);
lblAppSevicePlanLocation.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
lblAppSevicePlanLocation.setText(NOT_AVAILABLE);
lblAppServiceUseExistiogPrisingTier = new Label(compositeAppServicePlan, SWT.NONE);
lblAppServiceUseExistiogPrisingTier.setEnabled(true);
GridData gdLblAppServiceUseExistiogPrisingTier = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gdLblAppServiceUseExistiogPrisingTier.horizontalIndent = 20;
lblAppServiceUseExistiogPrisingTier.setLayoutData(gdLblAppServiceUseExistiogPrisingTier);
lblAppServiceUseExistiogPrisingTier.setText(LBL_PRICING_TIER);
lblAppServicePlanPricingTier = new Label(compositeAppServicePlan, SWT.NONE);
lblAppServicePlanPricingTier.setEnabled(true);
lblAppServicePlanPricingTier.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
lblAppServicePlanPricingTier.setText(NOT_AVAILABLE);
btnAppServiceCreateNew = new Button(compositeAppServicePlan, SWT.RADIO);
btnAppServiceCreateNew.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
radioAppServicePlanLogic();
}
});
btnAppServiceCreateNew.setBounds(0, 0, 90, 16);
btnAppServiceCreateNew.setText(BTN_CREATE_NEW);
btnAppServiceCreateNew.setEnabled(true);
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(TXT_APP_NAME_MSG);
dec_textAppSevicePlanName = decorateContorolAndRegister(textAppSevicePlanName);
textAppSevicePlanName.setText(APP_SERVICE_PLAN_PREFIX + date);
textAppSevicePlanName.setEnabled(false);
AccessibilityUtils.addAccessibilityNameForUIComponent(textAppSevicePlanName, "New app service plan");
lblAppServiceCreateNewLocation = new Label(compositeAppServicePlan, SWT.NONE);
GridData gdLblAppServiceCreateNewLocation = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gdLblAppServiceCreateNewLocation.horizontalIndent = 20;
lblAppServiceCreateNewLocation.setLayoutData(gdLblAppServiceCreateNewLocation);
lblAppServiceCreateNewLocation.setText(LBL_LOCATION);
lblAppServiceCreateNewLocation.setEnabled(false);
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));
comboAppServicePlanLocation.setEnabled(false);
dec_comboAppServicePlanLocation = decorateContorolAndRegister(comboAppServicePlanLocation);
AccessibilityUtils.addAccessibilityNameForUIComponent(comboAppServicePlanLocation, "App service plan location");
lblAppServiceCreateNewPricingTier = new Label(compositeAppServicePlan, SWT.NONE);
GridData gdLblAppServiceCreateNewPricingTier = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gdLblAppServiceCreateNewPricingTier.horizontalIndent = 20;
lblAppServiceCreateNewPricingTier.setLayoutData(gdLblAppServiceCreateNewPricingTier);
lblAppServiceCreateNewPricingTier.setText(LBL_PRICING_TIER);
lblAppServiceCreateNewPricingTier.setEnabled(false);
comboAppServicePlanPricingTier = new Combo(compositeAppServicePlan, SWT.READ_ONLY);
comboAppServicePlanPricingTier.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
comboAppServicePlanPricingTier.setEnabled(false);
AccessibilityUtils.addAccessibilityNameForUIComponent(comboAppServicePlanPricingTier,
"App service plan pricing tier");
new Label(compositeAppServicePlan, SWT.NONE);
linkAppServicePricing = new Link(compositeAppServicePlan, SWT.NONE);
linkAppServicePricing.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
linkAppServicePricing.setText(LNK_PRICING);
linkAppServicePricing.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
try {
PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser().openURL(new URL(PRICING_URL));
} catch (PartInitException | MalformedURLException ex) {
LOG.log(new Status(IStatus.ERROR, Activator.PLUGIN_ID,
"widgetSelected@SelectionAdapter@linkAppServicePricing@AppServiceCreateDialog", ex));
}
}
});
}