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();
}
Aggregations