private void createSlotGroup()

in PluginsAndFeatures/azure-toolkit-for-eclipse/com.microsoft.azuretools.appservice/src/com/microsoft/azuretools/appservice/ui/WebAppDeployDialog.java [388:515]


    private void createSlotGroup(Composite container) {
        ScrolledComposite scrolledComposite = new ScrolledComposite(container, SWT.V_SCROLL);
        scrolledComposite.setLayout(new FillLayout(SWT.HORIZONTAL));
        GridData gdGrpSlot = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
        gdGrpSlot.heightHint = 140;
        scrolledComposite.setLayoutData(gdGrpSlot);

        Group grpSlot = new Group(scrolledComposite, SWT.NONE);
        grpSlot.setLayout(new FillLayout(SWT.HORIZONTAL));
        grpSlot.setLayoutData(gdGrpSlot);
        grpSlot.setText("Deployment Slot");
        Composite parentComposite = new Composite(grpSlot, SWT.NONE);
        parentComposite.setLayout(new GridLayout(1, false));

        Composite checkBoxComposite = new Composite(parentComposite, SWT.LEFT);
        RowLayout rowLayout = new RowLayout();
        rowLayout.marginLeft = 0;
        rowLayout.marginTop = 0;
        rowLayout.marginRight = 0;
        rowLayout.marginBottom = 0;
        checkBoxComposite.setLayout(rowLayout);

        btnDeployToSlot = new Button(checkBoxComposite, SWT.CHECK);
        btnDeployToSlot.setSelection(false);
        btnDeployToSlot.setText("Deploy to Slot");
        btnDeployToSlot.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                radioSlotLogic();
                fillSlot();
            }
        });

        DefaultToolTip iconTooltip = new DefaultToolTip(btnDeployToSlot, SWT.NONE, false);
        iconTooltip.setText(DEPLOYMENT_SLOT_HOVER);
        btnDeployToSlot.addFocusListener(new FocusListener() {

            @Override
            public void focusGained(FocusEvent e) {
                iconTooltip.show(new Point(btnDeployToSlot.getSize().x, 0));
            }

            @Override
            public void focusLost(FocusEvent e) {
                iconTooltip.hide();
            }
        });

        Composite slotComposite = new Composite(parentComposite, SWT.NONE);
        slotComposite.setLayout(new GridLayout(2, false));
        slotComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

        btnSlotUseExisting = new Button(slotComposite, SWT.RADIO);
        btnSlotUseExisting.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                radioSlotLogic();
            }
        });

        btnSlotUseExisting.setSelection(true);
        btnSlotUseExisting.setText("Use existing");
        comboSlot = new Combo(slotComposite, SWT.READ_ONLY);
        AccessibilityUtils.addAccessibilityNameForUIComponent(comboSlot, "Existing deployment slot");
        comboSlot.setEnabled(false);
        comboSlot.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
        comboSlot.setBounds(0, 0, 26, 22);
        comboSlot.addFocusListener(new FocusAdapter() {
            @Override
            public void focusGained(FocusEvent e) {
                cleanError();
            }
        });

        decComboSlot = decorateContorolAndRegister(comboSlot);

        btnSlotCreateNew = new Button(slotComposite, SWT.RADIO);
        btnSlotCreateNew.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                radioSlotLogic();
            }
        });
        btnSlotCreateNew.setText("Create new");

        textSlotName = new Text(slotComposite, SWT.BORDER);
        textSlotName.addFocusListener(new FocusAdapter() {
            @Override
            public void focusGained(FocusEvent e) {
                cleanError();
            }
        });
        AccessibilityUtils.addAccessibilityNameForUIComponent(textSlotName, "New depoyment slot");
        textSlotName.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
        textSlotName.setBounds(0, 0, 64, 19);
        textSlotName.setMessage("Slot Name");
        textSlotName.setText("slot-" + date);
        textSlotName.setEnabled(false);
        decTextSlotName = decorateContorolAndRegister(textSlotName);

        lblSlotConf = new Label(slotComposite, SWT.NONE);
        lblSlotConf.setEnabled(false);
        GridData gdLblSlotConf = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
        gdLblSlotConf.horizontalIndent = 20;
        lblSlotConf.setLayoutData(gdLblSlotConf);
        lblSlotConf.setText("Clone settings from");

        comboSlotConf = new Combo(slotComposite, SWT.READ_ONLY);
        comboSlotConf.setEnabled(false);
        comboSlotConf.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
        comboSlotConf.setBounds(0, 0, 26, 22);
        comboSlotConf.addFocusListener(new FocusAdapter() {
            @Override
            public void focusGained(FocusEvent e) {
                cleanError();
            }
        });
        AccessibilityUtils.addAccessibilityNameForUIComponent(comboSlotConf, "Deployment slot configuration source");
        decComboSlotConf = decorateContorolAndRegister(comboSlotConf);

        scrolledComposite.setContent(grpSlot);
        scrolledComposite.setExpandHorizontal(true);
        scrolledComposite.setExpandVertical(true);
        scrolledComposite.setMinSize(grpSlot.computeSize(SWT.DEFAULT, SWT.DEFAULT));

        fillSlot();
        radioSlotLogic();
    }