private void createSettingsPanel()

in PluginsAndFeatures/azure-toolkit-for-eclipse/com.microsoft.azuretools.azureexplorer/src/com/microsoft/azuretools/azureexplorer/forms/createvm/SettingsStep.java [150:237]


    private void createSettingsPanel(Composite parent) {
        final Composite composite = new Composite(parent, SWT.NONE);
        GridLayout gridLayout = new GridLayout();
        gridLayout.numColumns = 1;
        GridData gridData = new GridData();
        gridData.horizontalAlignment = SWT.FILL;
        gridData.verticalAlignment = GridData.BEGINNING;
         gridData.grabExcessHorizontalSpace = true;
        composite.setLayout(gridLayout);
        composite.setLayoutData(gridData);

        resourceGrpLabel = new Label(composite, SWT.LEFT);
        resourceGrpLabel.setText("Resource group:");

        final Composite container = new Composite(composite, SWT.NONE);
        gridLayout = new GridLayout();
        gridLayout.numColumns = 2;
        gridData = new GridData();
        gridData.horizontalAlignment = SWT.FILL;
        gridData.verticalAlignment = GridData.BEGINNING;
        // gridData.grabExcessHorizontalSpace = true;
        gridData.widthHint = 250;
        container.setLayout(gridLayout);
        container.setLayoutData(gridData);

        createNewRadioButton = new Button(container, SWT.RADIO);
        createNewRadioButton.setText("Create new");
        resourceGrpField = new Text(container, SWT.LEFT | SWT.BORDER);
        gridData = new GridData(SWT.FILL, SWT.CENTER, true, true);
        resourceGrpField.setLayoutData(gridData);

        useExistingRadioButton = new Button(container, SWT.RADIO);
        useExistingRadioButton.setText("Use existing");
        resourceGrpCombo = new Combo(container, SWT.READ_ONLY);
        gridData = new GridData(SWT.FILL, SWT.CENTER, true, true);
        resourceGrpCombo.setLayoutData(gridData);
        resourceGroupViewer = new ComboViewer(resourceGrpCombo);
        resourceGroupViewer.setContentProvider(ArrayContentProvider.getInstance());

        SelectionListener updateListener = new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent arg0) {
                handleResourceGroup();
            }
        };
        createNewRadioButton.addSelectionListener(updateListener);
        useExistingRadioButton.addSelectionListener(updateListener);
        createNewRadioButton.setSelection(true);

        handleResourceGroup();

        storageAccountLabel = new Label(composite, SWT.LEFT);
        storageAccountLabel.setText("Storage account:");
        storageComboBox = new Combo(composite, SWT.READ_ONLY);
        gridData = new GridData(SWT.FILL, SWT.CENTER, true, true);
        storageComboBox.setLayoutData(gridData);

        networkLabel = new Label(composite, SWT.LEFT);
        networkLabel.setText("Virtual Network:");
        networkComboBox = new Combo(composite, SWT.READ_ONLY);
        gridData = new GridData(SWT.FILL, SWT.CENTER, true, true);
        networkComboBox.setLayoutData(gridData);

        subnetLabel = new Label(composite, SWT.LEFT);
        subnetLabel.setText("Subnet:");
        subnetComboBox = new Combo(composite, SWT.READ_ONLY);
        gridData = new GridData(SWT.FILL, SWT.CENTER, true, true);
        subnetComboBox.setLayoutData(gridData);

        pipLabel = new Label(composite, SWT.LEFT);
        pipLabel.setText("Public IP address:");
        pipCombo = new Combo(composite, SWT.READ_ONLY);
        gridData = new GridData(SWT.FILL, SWT.CENTER, true, true);
        pipCombo.setLayoutData(gridData);

        nsgLabel = new Label(composite, SWT.LEFT);
        nsgLabel.setText("Network security group (firewall):");
        nsgCombo = new Combo(composite, SWT.READ_ONLY);
        gridData = new GridData(SWT.FILL, SWT.CENTER, true, true);
        nsgCombo.setLayoutData(gridData);

        availabilityLabel = new Label(composite, SWT.LEFT);
        availabilityLabel.setText("Availability set:");
        availabilityCombo = new Combo(composite, SWT.READ_ONLY);
        gridData = new GridData(SWT.FILL, SWT.CENTER, true, true);
        availabilityCombo.setLayoutData(gridData);

    }