Search in sources :

Example 6 with VirtualNetwork

use of com.microsoft.tooling.msservices.model.vm.VirtualNetwork in project azure-tools-for-java by Microsoft.

the class SettingsStep method showNewVirtualNetworkForm.

private void showNewVirtualNetworkForm() {
    final String resourceGroupName = createNewRadioButton.isSelected() ? resourceGrpField.getText() : resourceGrpCombo.getSelectedItem().toString();
    final CreateVirtualNetworkForm form = new CreateVirtualNetworkForm(project, model.getSubscription().getId(), model.getRegion(), model.getName());
    form.setOnCreate(new Runnable() {

        @Override
        public void run() {
            VirtualNetwork newVirtualNetwork = form.getNetwork();
            if (newVirtualNetwork != null) {
                model.setNewNetwork(newVirtualNetwork);
                model.setWithNewNetwork(true);
                ((DefaultComboBoxModel) networkComboBox.getModel()).insertElementAt(newVirtualNetwork.name + " (New)", 0);
                networkComboBox.setSelectedIndex(0);
            } else {
                networkComboBox.setSelectedItem(null);
            }
        }
    });
    form.show();
}
Also used : VirtualNetwork(com.microsoft.tooling.msservices.model.vm.VirtualNetwork) AzureString(com.microsoft.azure.toolkit.lib.common.bundle.AzureString) CreateVirtualNetworkForm(com.microsoft.intellij.forms.CreateVirtualNetworkForm)

Aggregations

VirtualNetwork (com.microsoft.tooling.msservices.model.vm.VirtualNetwork)6 Azure (com.microsoft.azure.management.Azure)2 KnownWindowsVirtualMachineImage (com.microsoft.azure.management.compute.KnownWindowsVirtualMachineImage)2 Network (com.microsoft.azure.management.network.Network)2 ResourceGroup (com.microsoft.azure.management.resources.ResourceGroup)2 AzureManager (com.microsoft.azuretools.sdkmanage.AzureManager)2 CreateVirtualNetworkForm (com.microsoft.intellij.forms.CreateVirtualNetworkForm)2 AzureString (com.microsoft.azure.toolkit.lib.common.bundle.AzureString)1