Search in sources :

Example 1 with VmImportGeneralModel

use of org.ovirt.engine.ui.uicommonweb.models.vms.VmImportGeneralModel in project ovirt-engine by oVirt.

the class ImportVmFromExportDomainPopupView method initGeneralSubTabView.

protected void initGeneralSubTabView() {
    ScrollPanel generalPanel = new ScrollPanel();
    DetailModelProvider<ImportVmModel, VmImportGeneralModel> modelProvider = new DetailModelProvider<ImportVmModel, VmImportGeneralModel>() {

        @Override
        public VmImportGeneralModel getModel() {
            VmImportGeneralModel model = (VmImportGeneralModel) importModel.getDetailModels().get(0);
            model.setSource(ImportSource.EXPORT_DOMAIN);
            return model;
        }

        @Override
        public void onSubTabSelected() {
        }

        @Override
        public void onSubTabDeselected() {
        }

        @Override
        public void activateDetailModel() {
        }

        @Override
        public ImportVmModel getMainModel() {
            // Not used, here to satisfy interface contract.
            return null;
        }
    };
    generalView = new ImportVmGeneralSubTabView(modelProvider);
    modelProvider.getModel().clearAndRegisterNameAndOsListeners();
    generalPanel.add(generalView);
    subTabLayoutPanel.add(generalPanel, constants.importVmGeneralSubTabLabel());
}
Also used : DetailModelProvider(org.ovirt.engine.ui.common.uicommon.model.DetailModelProvider) VmImportGeneralModel(org.ovirt.engine.ui.uicommonweb.models.vms.VmImportGeneralModel) ImportVmModel(org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmModel) ScrollPanel(com.google.gwt.user.client.ui.ScrollPanel)

Example 2 with VmImportGeneralModel

use of org.ovirt.engine.ui.uicommonweb.models.vms.VmImportGeneralModel in project ovirt-engine by oVirt.

the class ImportVmFromExternalProviderPopupView method initGeneralSubTabView.

protected void initGeneralSubTabView() {
    ScrollPanel generalPanel = new ScrollPanel();
    DetailModelProvider<ImportVmModel, VmImportGeneralModel> modelProvider = new DetailModelProvider<ImportVmModel, VmImportGeneralModel>() {

        @Override
        public VmImportGeneralModel getModel() {
            VmImportGeneralModel model = (VmImportGeneralModel) importModel.getDetailModels().get(0);
            model.setSource(ImportSource.VMWARE);
            return model;
        }

        @Override
        public void onSubTabSelected() {
        }

        @Override
        public void onSubTabDeselected() {
        }

        @Override
        public void activateDetailModel() {
        }

        @Override
        public ImportVmModel getMainModel() {
            // Not used, here to satisfy interface contract.
            return null;
        }
    };
    generalView = new ImportVmGeneralSubTabView(modelProvider);
    modelProvider.getModel().clearAndRegisterNameAndOsListeners();
    generalPanel.add(generalView);
    subTabLayoutPanel.add(generalPanel, constants.importVmGeneralSubTabLabel());
}
Also used : DetailModelProvider(org.ovirt.engine.ui.common.uicommon.model.DetailModelProvider) VmImportGeneralModel(org.ovirt.engine.ui.uicommonweb.models.vms.VmImportGeneralModel) ImportVmModel(org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmModel) ScrollPanel(com.google.gwt.user.client.ui.ScrollPanel) ImportVmGeneralSubTabView(org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.backup.ImportVmGeneralSubTabView)

Example 3 with VmImportGeneralModel

use of org.ovirt.engine.ui.uicommonweb.models.vms.VmImportGeneralModel in project ovirt-engine by oVirt.

the class RegisterVmInfoPanel method getVmGeneralModel.

public VmImportGeneralModel getVmGeneralModel() {
    if (vmImportGeneralModel == null) {
        vmImportGeneralModel = new VmImportGeneralModel();
        vmImportGeneralModel.setSource(ImportSource.EXPORT_DOMAIN);
    }
    return vmImportGeneralModel;
}
Also used : VmImportGeneralModel(org.ovirt.engine.ui.uicommonweb.models.vms.VmImportGeneralModel)

Example 4 with VmImportGeneralModel

use of org.ovirt.engine.ui.uicommonweb.models.vms.VmImportGeneralModel in project ovirt-engine by oVirt.

the class RegisterVmInfoPanel method initGeneralForm.

private void initGeneralForm() {
    DetailModelProvider<ImportVmModel, VmImportGeneralModel> modelProvider = new DetailModelProvider<ImportVmModel, VmImportGeneralModel>() {

        @Override
        public VmImportGeneralModel getModel() {
            return getVmGeneralModel();
        }

        @Override
        public void onSubTabSelected() {
        }

        @Override
        public void onSubTabDeselected() {
        }

        @Override
        public void activateDetailModel() {
        }

        @Override
        public ImportVmModel getMainModel() {
            // Not used, here to satisfy interface contract.
            return null;
        }
    };
    generalView = new ImportVmGeneralSubTabView(modelProvider);
}
Also used : DetailModelProvider(org.ovirt.engine.ui.common.uicommon.model.DetailModelProvider) VmImportGeneralModel(org.ovirt.engine.ui.uicommonweb.models.vms.VmImportGeneralModel) ImportVmModel(org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmModel) ImportVmGeneralSubTabView(org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.backup.ImportVmGeneralSubTabView)

Aggregations

VmImportGeneralModel (org.ovirt.engine.ui.uicommonweb.models.vms.VmImportGeneralModel)4 DetailModelProvider (org.ovirt.engine.ui.common.uicommon.model.DetailModelProvider)3 ImportVmModel (org.ovirt.engine.ui.uicommonweb.models.vms.ImportVmModel)3 ScrollPanel (com.google.gwt.user.client.ui.ScrollPanel)2 ImportVmGeneralSubTabView (org.ovirt.engine.ui.webadmin.section.main.view.popup.storage.backup.ImportVmGeneralSubTabView)2