Search in sources :

Example 11 with EntityModelCheckBoxEditor

use of org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor in project ovirt-engine by oVirt.

the class HostConfigureLocalStoragePopupView method initialize.

private void initialize() {
    dataCenterVersionEditor = new ListModelListBoxEditor<>(new NullSafeRenderer<Version>() {

        @Override
        public String renderNullSafe(Version object) {
            return object.getValue();
        }
    });
    clusterCpuTypeEditor = new ListModelListBoxEditor<>(new NullSafeRenderer<ServerCpu>() {

        @Override
        public String renderNullSafe(ServerCpu object) {
            return object.getCpuName();
        }
    });
    // Optimization options.
    // $NON-NLS-1$
    optimizationNoneEditor = new EntityModelRadioButtonEditor("1");
    // $NON-NLS-1$
    optimizationForServerEditor = new EntityModelRadioButtonEditor("1");
    // $NON-NLS-1$
    optimizationForDesktopEditor = new EntityModelRadioButtonEditor("1");
    // $NON-NLS-1$
    optimizationCustomEditor = new EntityModelRadioButtonEditor("1");
    optimizationCustomEditor.setVisible(false);
    countThreadsAsCoresEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
    memoryOptimizationInfo = new InfoIcon(templates.italicText(constants.clusterPopupMemoryOptimizationInfo()));
    memoryOptimizationInfo.setTooltipMaxWidth(TooltipWidth.W520);
    cpuThreadsInfo = new InfoIcon(templates.italicText(constants.clusterPopupCpuThreadsInfo()));
    cpuThreadsInfo.setTooltipMaxWidth(TooltipWidth.W620);
}
Also used : Version(org.ovirt.engine.core.compat.Version) InfoIcon(org.ovirt.engine.ui.common.widget.dialog.InfoIcon) NullSafeRenderer(org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer) ServerCpu(org.ovirt.engine.core.common.businessentities.ServerCpu) EntityModelCheckBoxEditor(org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor) EntityModelRadioButtonEditor(org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor)

Example 12 with EntityModelCheckBoxEditor

use of org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor 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 13 with EntityModelCheckBoxEditor

use of org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor in project ovirt-engine by oVirt.

the class VmExportPopupView method initCheckBoxes.

void initCheckBoxes() {
    forceOverride = new EntityModelCheckBoxEditor(Align.RIGHT);
    collapseSnapshots = new EntityModelCheckBoxEditor(Align.RIGHT);
}
Also used : EntityModelCheckBoxEditor(org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor)

Example 14 with EntityModelCheckBoxEditor

use of org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor in project ovirt-engine by oVirt.

the class HostFenceAgentPopupView method initEditors.

private void initEditors() {
    pmTypeEditor = new ListModelListBoxEditor<>(new StringRenderer<String>());
    pmEncryptOptionsEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
    pmEncryptOptionsEditor.setUsePatternFly(true);
    pmSecureEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
    pmSecureEditor.setUsePatternFly(true);
    fencingOptionsUrl = new Anchor(constants.fencingOptionsLabel());
}
Also used : Anchor(com.google.gwt.user.client.ui.Anchor) StringRenderer(org.ovirt.engine.ui.common.widget.renderer.StringRenderer) EntityModelCheckBoxEditor(org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor)

Example 15 with EntityModelCheckBoxEditor

use of org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor in project ovirt-engine by oVirt.

the class HostInstallPopupView method initEditors.

void initEditors() {
    isoEditor = new ListModelListBoxEditor<>(new NullSafeRenderer<RpmVersion>() {

        @Override
        public String renderNullSafe(RpmVersion version) {
            // Format string to contain major.minor version only.
            return version.getRpmName();
        }
    });
    // $NON-NLS-1$
    rbPassword = new RadioButton("1");
    // $NON-NLS-1$
    rbPublicKey = new RadioButton("1");
    publicKeyEditor = new StringEntityModelTextAreaLabelEditor();
    activateHostAfterInstallEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
    overrideIpTablesEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
}
Also used : StringEntityModelTextAreaLabelEditor(org.ovirt.engine.ui.common.widget.editor.generic.StringEntityModelTextAreaLabelEditor) NullSafeRenderer(org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer) RadioButton(com.google.gwt.user.client.ui.RadioButton) EntityModelCheckBoxEditor(org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor) RpmVersion(org.ovirt.engine.core.compat.RpmVersion)

Aggregations

EntityModelCheckBoxEditor (org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor)28 EnumRenderer (org.ovirt.engine.ui.common.widget.renderer.EnumRenderer)9 NullSafeRenderer (org.ovirt.engine.ui.common.widget.renderer.NullSafeRenderer)8 EntityModelRadioButtonEditor (org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor)7 InfoIcon (org.ovirt.engine.ui.common.widget.dialog.InfoIcon)5 NameRenderer (org.ovirt.engine.ui.common.widget.renderer.NameRenderer)4 AbstractRenderer (com.google.gwt.text.shared.AbstractRenderer)3 RadioButton (com.google.gwt.user.client.ui.RadioButton)2 Cluster (org.ovirt.engine.core.common.businessentities.Cluster)2 OpenstackNetworkProviderProperties (org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties)2 Quota (org.ovirt.engine.core.common.businessentities.Quota)2 VDS (org.ovirt.engine.core.common.businessentities.VDS)2 GlusterVolumeEntity (org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity)2 RepoImage (org.ovirt.engine.core.common.businessentities.storage.RepoImage)2 EntityModelWidgetWithInfo (org.ovirt.engine.ui.common.widget.EntityModelWidgetWithInfo)2 GroupedListModelListBox (org.ovirt.engine.ui.common.widget.editor.GroupedListModelListBox)2 StringEntityModelTextAreaLabelEditor (org.ovirt.engine.ui.common.widget.editor.generic.StringEntityModelTextAreaLabelEditor)2 EnableableFormLabel (org.ovirt.engine.ui.common.widget.label.EnableableFormLabel)2 StorageDomainFreeSpaceRenderer (org.ovirt.engine.ui.common.widget.renderer.StorageDomainFreeSpaceRenderer)2 EntityModel (org.ovirt.engine.ui.uicommonweb.models.EntityModel)2