Search in sources :

Example 6 with InfoIcon

use of org.ovirt.engine.ui.common.widget.dialog.InfoIcon in project ovirt-engine by oVirt.

the class VmDiskPopupWidget method initManualWidgets.

@SuppressWarnings({ "unchecked", "rawtypes" })
private void initManualWidgets() {
    storageDomainEditor = new ListModelListBoxEditor<>(new StorageDomainFreeSpaceRenderer());
    hostListEditor = new ListModelListBoxEditor<>(new NameRenderer<VDS>());
    diskProfileEditor = new ListModelListBoxEditor<>(new NameRenderer<DiskProfile>());
    quotaEditor = new ListModelListBoxEditor<>(new NameRenderer<Quota>());
    interfaceEditor = new ListModelListBoxEditor<>(new EnumRenderer());
    datacenterEditor = new ListModelListBoxEditor<>(new NameRenderer<StoragePool>());
    cinderVolumeTypeEditor = new ListModelListBoxEditor<>();
    volumeTypeEditor = new ListModelListBoxEditor<>(new EnumRenderer());
    storageTypeEditor = new ListModelListBoxEditor<>(new EnumRenderer());
    plugDiskToVmEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
    wipeAfterDeleteEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
    isBootableEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
    isShareableEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
    isReadOnlyEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
    passDiscardEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
    isUsingScsiReservationEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
    isScsiPassthroughEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
    isSgIoUnfilteredEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
    interfaceInfoIcon = new InfoIcon(templates.italicText(constants.diskInterfaceInfo()));
    cinderVolumeTypeInfoIcon = new InfoIcon(templates.italicText(constants.cinderVolumeTypeInfoIcon()));
    scsiReservationInfoIcon = new InfoIcon(templates.italicText(constants.scsiReservationInfoIcon()));
}
Also used : EnumRenderer(org.ovirt.engine.ui.common.widget.renderer.EnumRenderer) NameRenderer(org.ovirt.engine.ui.common.widget.renderer.NameRenderer) InfoIcon(org.ovirt.engine.ui.common.widget.dialog.InfoIcon) EntityModelCheckBoxEditor(org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor) StorageDomainFreeSpaceRenderer(org.ovirt.engine.ui.common.widget.renderer.StorageDomainFreeSpaceRenderer)

Example 7 with InfoIcon

use of org.ovirt.engine.ui.common.widget.dialog.InfoIcon in project ovirt-engine by oVirt.

the class HostPopupView method initInfoIcon.

private void initInfoIcon() {
    consoleAddressInfoIcon = new InfoIcon(templates.italicText(constants.enableConsoleAddressOverrideHelpMessage()));
    providerSearchInfoIcon = new InfoIcon(templates.italicText(constants.providerSearchInfo()));
    provisionedHostInfoIcon = new InfoIcon(templates.italicText(constants.provisionedHostInfo()));
    discoveredHostInfoIcon = new InfoIcon(templates.italicText(constants.discoveredHostInfoIcon()));
    hostAddressInfoIcon = new InfoIcon(templates.italicText(constants.hostPopupHostAddressLabelHelpMessage()));
}
Also used : InfoIcon(org.ovirt.engine.ui.common.widget.dialog.InfoIcon)

Example 8 with InfoIcon

use of org.ovirt.engine.ui.common.widget.dialog.InfoIcon in project ovirt-engine by oVirt.

the class ImportNetworksPopupView method initEntityModelCellTables.

void initEntityModelCellTables() {
    providerNetworks.addColumn(new AbstractTextColumn<ExternalNetwork>() {

        @Override
        public String getValue(ExternalNetwork model) {
            return model.getDisplayName();
        }
    }, constants.nameNetworkHeader());
    importedNetworks.addColumn(new AbstractEditTextColumn<ExternalNetwork>((index, model, value) -> model.setDisplayName(value)) {

        @Override
        public String getValue(ExternalNetwork model) {
            return model.getDisplayName();
        }
    }, constants.nameNetworkHeader());
    Column<ExternalNetwork, String> idColumn = new AbstractTextColumn<ExternalNetwork>() {

        @Override
        public String getValue(ExternalNetwork model) {
            return model.getNetwork().getProvidedBy().getExternalId();
        }
    };
    providerNetworks.addColumn(idColumn, constants.idNetworkHeader());
    importedNetworks.addColumn(idColumn, constants.idNetworkHeader());
    dcColumn = new AbstractListModelListBoxColumn<ExternalNetwork, StoragePool>(new NameRenderer<StoragePool>()) {

        @Override
        public ListModel<StoragePool> getValue(ExternalNetwork network) {
            return network.getDataCenters();
        }
    };
    importedNetworks.addColumn(dcColumn, constants.dcNetworkHeader());
    AbstractCheckboxHeader publicAllHeader = new AbstractCheckboxHeader() {

        @Override
        protected void selectionChanged(Boolean value) {
            for (ExternalNetwork model : getAllImportedNetworks()) {
                model.setPublicUse(value);
            }
            refreshImportedNetworks();
        }

        @Override
        public Boolean getValue() {
            for (ExternalNetwork model : getAllImportedNetworks()) {
                if (!model.isPublicUse()) {
                    return false;
                }
            }
            return true;
        }

        @Override
        public boolean isEnabled() {
            return true;
        }

        @Override
        public void render(Context context, SafeHtmlBuilder sb) {
            super.render(context, sb);
            sb.append(ImportNetworksPopupView.templates.tableHeaderInlineImage(SafeHtmlUtils.fromTrustedString(new InfoIcon(SafeHtmlUtils.EMPTY_SAFE_HTML).toString())));
        }

        @Override
        public SafeHtml getTooltip() {
            return ImportNetworksPopupView.templates.textForCheckBoxHeader(constants.publicNetworkTooltip());
        }

        @Override
        public String getLabel() {
            return constants.publicNetwork();
        }
    };
    importedNetworks.addColumn(new AbstractCheckboxColumn<ExternalNetwork>((index, model, value) -> {
        model.setPublicUse(value);
        refreshImportedNetworks();
    }) {

        @Override
        public Boolean getValue(ExternalNetwork model) {
            return model.isPublicUse();
        }

        @Override
        protected boolean canEdit(ExternalNetwork model) {
            return true;
        }

        @Override
        public void render(Context context, ExternalNetwork object, SafeHtmlBuilder sb) {
            super.render(context, object, sb);
            // $NON-NLS-1$
            sb.append(templates.textForCheckBox(""));
        }
    }, publicAllHeader, // $NON-NLS-1$
    "80px");
}
Also used : StoragePool(org.ovirt.engine.core.common.businessentities.StoragePool) AbstractCheckboxColumn(org.ovirt.engine.ui.common.widget.table.column.AbstractCheckboxColumn) EntityModelCellTable(org.ovirt.engine.ui.common.widget.editor.EntityModelCellTable) AssetProvider(org.ovirt.engine.ui.webadmin.gin.AssetProvider) Inject(com.google.inject.Inject) Provider(org.ovirt.engine.core.common.businessentities.Provider) AbstractModelBoundPopupView(org.ovirt.engine.ui.common.view.popup.AbstractModelBoundPopupView) GWT(com.google.gwt.core.client.GWT) ImportNetworksPopupPresenterWidget(org.ovirt.engine.ui.webadmin.section.main.presenter.popup.provider.ImportNetworksPopupPresenterWidget) ListModelListBoxEditor(org.ovirt.engine.ui.common.widget.editor.ListModelListBoxEditor) ArrayList(java.util.ArrayList) UiBinder(com.google.gwt.uibinder.client.UiBinder) ApplicationConstants(org.ovirt.engine.ui.webadmin.ApplicationConstants) BaseImportNetworksModel(org.ovirt.engine.ui.uicommonweb.models.networks.BaseImportNetworksModel) ExternalNetwork(org.ovirt.engine.ui.uicommonweb.models.providers.ExternalNetwork) Context(com.google.gwt.cell.client.Cell.Context) SafeHtmlBuilder(com.google.gwt.safehtml.shared.SafeHtmlBuilder) HorizontalSplitTable(org.ovirt.engine.ui.common.widget.HorizontalSplitTable) SafeHtmlUtils(com.google.gwt.safehtml.shared.SafeHtmlUtils) InfoIcon(org.ovirt.engine.ui.common.widget.dialog.InfoIcon) ApplicationResources(org.ovirt.engine.ui.webadmin.ApplicationResources) AbstractEditTextColumn(org.ovirt.engine.ui.common.widget.table.column.AbstractEditTextColumn) EventBus(com.google.gwt.event.shared.EventBus) UiCommonEditorDriver(org.ovirt.engine.ui.common.editor.UiCommonEditorDriver) ListModel(org.ovirt.engine.ui.uicommonweb.models.ListModel) AbstractCheckboxHeader(org.ovirt.engine.ui.common.widget.table.header.AbstractCheckboxHeader) NameRenderer(org.ovirt.engine.ui.common.widget.renderer.NameRenderer) AbstractListModelListBoxColumn(org.ovirt.engine.ui.common.widget.table.column.AbstractListModelListBoxColumn) WithElementId(org.ovirt.engine.ui.common.idhandler.WithElementId) ApplicationTemplates(org.ovirt.engine.ui.webadmin.ApplicationTemplates) List(java.util.List) SimpleDialogPanel(org.ovirt.engine.ui.common.widget.dialog.SimpleDialogPanel) Column(com.google.gwt.user.cellview.client.Column) UiField(com.google.gwt.uibinder.client.UiField) AbstractTextColumn(org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn) SafeHtml(com.google.gwt.safehtml.shared.SafeHtml) Context(com.google.gwt.cell.client.Cell.Context) StoragePool(org.ovirt.engine.core.common.businessentities.StoragePool) NameRenderer(org.ovirt.engine.ui.common.widget.renderer.NameRenderer) SafeHtmlBuilder(com.google.gwt.safehtml.shared.SafeHtmlBuilder) ListModel(org.ovirt.engine.ui.uicommonweb.models.ListModel) InfoIcon(org.ovirt.engine.ui.common.widget.dialog.InfoIcon) AbstractTextColumn(org.ovirt.engine.ui.common.widget.table.column.AbstractTextColumn) ExternalNetwork(org.ovirt.engine.ui.uicommonweb.models.providers.ExternalNetwork) AbstractCheckboxHeader(org.ovirt.engine.ui.common.widget.table.header.AbstractCheckboxHeader)

Example 9 with InfoIcon

use of org.ovirt.engine.ui.common.widget.dialog.InfoIcon in project ovirt-engine by oVirt.

the class VmRunOncePopupWidget method initRadioButtonEditors.

void initRadioButtonEditors() {
    // $NON-NLS-1$
    runOnceHeadlessModeEditor = new EntityModelRadioButtonEditor("1");
    // $NON-NLS-1$
    displayConsoleVncEditor = new EntityModelRadioButtonEditor("1");
    // $NON-NLS-1$
    displayConsoleSpiceEditor = new EntityModelRadioButtonEditor("1");
    runOnceHeadlessModeEnabledInfoIcon = new InfoIcon(SafeHtmlUtils.fromTrustedString(constants.runOnceHeadlessModeExplanation()));
    // host tab
    // $NON-NLS-1$
    specificHost = new RadioButton("runVmOnHostGroup");
    // $NON-NLS-1$
    isAutoAssignEditor = new EntityModelRadioButtonEditor("runVmOnHostGroup");
}
Also used : InfoIcon(org.ovirt.engine.ui.common.widget.dialog.InfoIcon) RadioButton(com.google.gwt.user.client.ui.RadioButton) EntityModelRadioButtonEditor(org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor)

Example 10 with InfoIcon

use of org.ovirt.engine.ui.common.widget.dialog.InfoIcon in project ovirt-engine by oVirt.

the class AffinityGroupPopupView method initEditors.

private void initEditors() {
    vmAffinityRuleEditor = new ListModelListBoxEditor<>(new EnumRenderer<EntityAffinityRule>());
    vmAffinityRuleEditor.hideLabel();
    vmAffinityRuleEditorInfoIcon = new InfoIcon(templates.italicText(constants.affinityGroupVmPolarityInfo()));
    vmAffinityEnforcingEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
    vmAffinityEnforcingEditor.hideLabel();
    vmAffinityEnforcingEditorInfoIcon = new InfoIcon(templates.italicText(constants.affinityGroupEnforceInfo()));
    hostAffinityRuleEditor = new ListModelListBoxEditor<>(new EnumRenderer<EntityAffinityRule>());
    hostAffinityRuleEditor.hideLabel();
    hostAffinityRuleEditorInfoIcon = new InfoIcon(templates.italicText(constants.affinityGroupHostPolarityInfo()));
    hostAffinityEnforcingEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
    hostAffinityEnforcingEditor.hideLabel();
    hostAffinityEnforcingEditorInfoIcon = new InfoIcon(templates.italicText(constants.affinityGroupEnforceInfo()));
}
Also used : EnumRenderer(org.ovirt.engine.ui.common.widget.renderer.EnumRenderer) InfoIcon(org.ovirt.engine.ui.common.widget.dialog.InfoIcon) EntityModelCheckBoxEditor(org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor)

Aggregations

InfoIcon (org.ovirt.engine.ui.common.widget.dialog.InfoIcon)11 EntityModelCheckBoxEditor (org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor)5 EntityModelRadioButtonEditor (org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor)2 EnumRenderer (org.ovirt.engine.ui.common.widget.renderer.EnumRenderer)2 NameRenderer (org.ovirt.engine.ui.common.widget.renderer.NameRenderer)2 Context (com.google.gwt.cell.client.Cell.Context)1 GWT (com.google.gwt.core.client.GWT)1 EventBus (com.google.gwt.event.shared.EventBus)1 SafeHtml (com.google.gwt.safehtml.shared.SafeHtml)1 SafeHtmlBuilder (com.google.gwt.safehtml.shared.SafeHtmlBuilder)1 SafeHtmlUtils (com.google.gwt.safehtml.shared.SafeHtmlUtils)1 UiBinder (com.google.gwt.uibinder.client.UiBinder)1 UiField (com.google.gwt.uibinder.client.UiField)1 Column (com.google.gwt.user.cellview.client.Column)1 RadioButton (com.google.gwt.user.client.ui.RadioButton)1 Inject (com.google.inject.Inject)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Provider (org.ovirt.engine.core.common.businessentities.Provider)1 ServerCpu (org.ovirt.engine.core.common.businessentities.ServerCpu)1