Search in sources :

Example 1 with EnableableFormLabel

use of org.ovirt.engine.ui.common.widget.label.EnableableFormLabel in project ovirt-engine by oVirt.

the class AbstractVmPopupWidget method initDetachableFields.

private void initDetachableFields() {
    detachableInstanceTypesEditor = new EntityModelDetachableWidgetWithLabel(instanceTypesEditor);
    detachableMemSizeEditor = new EntityModelDetachableWidgetWithLabel(memSizeEditor);
    final EnableableFormLabel maxMemoryLabel = new EnableableFormLabel(constants.maxMemorySizePopup());
    maxMemorySizeEditor = new MemorySizeEntityModelTextBoxEditor(new ModeSwitchingVisibilityRenderer());
    detachableMaxMemorySizeEditor = new EntityModelDetachableWidgetWithInfo(maxMemoryLabel, maxMemorySizeEditor);
    isHighlyAvailableEditorWithDetachable = new EntityModelDetachableWidget(isHighlyAvailableEditor, Align.IGNORE);
    detachablePriorityEditor = new EntityModelDetachableWidgetWithLabel(priorityEditor);
    isMemoryBalloonDeviceEnabledDetachable = new EntityModelDetachableWidget(isMemoryBalloonDeviceEnabled);
    isIoThreadsEnabledDetachable = new EntityModelDetachableWidget(isIoThreadsEnabled);
    detachableMinAllocatedMemoryEditor = new EntityModelDetachableWidget(minAllocatedMemoryEditor);
    overrideMigrationDowntimeEditorWithDetachable = new EntityModelDetachableWidget(overrideMigrationDowntimeEditor, Align.IGNORE);
    overrideMigrationDowntimeEditorWithDetachable.setupContentWrapper(Align.RIGHT);
    overrideMigrationPolicyEditorWithDetachable = new EntityModelDetachableWidget(overrideMigrationPolicyEditor, Align.IGNORE);
    overrideMigrationPolicyEditorWithDetachable.setupContentWrapper(Align.RIGHT);
    migrationModeEditorWithDetachable = new EntityModelDetachableWidget(migrationModeEditor, Align.IGNORE);
    migrationModeEditorWithDetachable.setupContentWrapper(Align.RIGHT);
}
Also used : EntityModelDetachableWidgetWithInfo(org.ovirt.engine.ui.common.widget.EntityModelDetachableWidgetWithInfo) EnableableFormLabel(org.ovirt.engine.ui.common.widget.label.EnableableFormLabel) EntityModelDetachableWidget(org.ovirt.engine.ui.common.widget.editor.generic.EntityModelDetachableWidget) EntityModelDetachableWidgetWithLabel(org.ovirt.engine.ui.common.widget.editor.generic.EntityModelDetachableWidgetWithLabel) MemorySizeEntityModelTextBoxEditor(org.ovirt.engine.ui.common.widget.editor.generic.MemorySizeEntityModelTextBoxEditor)

Example 2 with EnableableFormLabel

use of org.ovirt.engine.ui.common.widget.label.EnableableFormLabel in project ovirt-engine by oVirt.

the class AbstractVmPopupWidget method initThreadsPerCore.

private void initThreadsPerCore() {
    EnableableFormLabel label = new EnableableFormLabel();
    label.setText(constants.threadsPerCore());
    threadsPerCoreEditor = new ListModelListBoxOnlyEditor<>(IntegerRenderer.instance(), new ModeSwitchingVisibilityRenderer());
    threadsPerCoreEditorWithInfoIcon = new EntityModelDetachableWidgetWithInfo(label, threadsPerCoreEditor);
    threadsPerCoreEditorWithInfoIcon.setExplanation(multiLineItalicSafeHtml(messages.threadsPerCoreInfo()));
}
Also used : EntityModelDetachableWidgetWithInfo(org.ovirt.engine.ui.common.widget.EntityModelDetachableWidgetWithInfo) EnableableFormLabel(org.ovirt.engine.ui.common.widget.label.EnableableFormLabel)

Example 3 with EnableableFormLabel

use of org.ovirt.engine.ui.common.widget.label.EnableableFormLabel in project ovirt-engine by oVirt.

the class GlusterVolumeSnapshotCreatePopupView method initEditors.

private void initEditors() {
    snapshotNameEditor = new StringEntityModelTextBoxEditor();
    snapshotNameEditor.hideLabel();
    EnableableFormLabel label = new EnableableFormLabel();
    label.setText(constants.volumeSnapshotNamePrefixLabel());
    snapshotNameEditorWithInfo = new EntityModelWidgetWithInfo(label, snapshotNameEditor);
    snapshotNameEditorWithInfo.setExplanation(templates.italicText(constants.snapshotNameInfo()));
    startAtEditor = new EntityModelDateTimeBoxEditor();
    startAtEditor.getContentWidget().setDateTimeFormat(GwtBootstrapDateTimePicker.DEFAULT_DATE_TIME_FORMAT);
    startAtEditor.getContentWidget().showDateAndTime();
    daysOfWeekEditor = new ListModelCheckBoxGroupEditor<>(new AbstractRenderer<DayOfWeek>() {

        @Override
        public String render(DayOfWeek object) {
            return object.toString().substring(0, 3);
        }
    });
    endDate = new EntityModelDateTimeBoxEditor();
    endDate.getContentWidget().setDateTimeFormat(GwtBootstrapDateTimePicker.DEFAULT_DATE_TIME_FORMAT);
    endDate.getContentWidget().showDateAndTime();
    executionTimeEditor = new EntityModelDateTimeBoxEditor();
    // $NON-NLS-1$
    executionTimeEditor.getContentWidget().setDateTimeFormat("hh:ii");
    executionTimeEditor.getContentWidget().showTimeOnly();
    recurrenceEditor = new ListModelListBoxEditor<>(new AbstractRenderer<GlusterVolumeSnapshotScheduleRecurrence>() {

        @Override
        public String render(GlusterVolumeSnapshotScheduleRecurrence object) {
            return EnumTranslator.getInstance().translate(object);
        }
    });
}
Also used : DayOfWeek(org.ovirt.engine.core.compat.DayOfWeek) EntityModelWidgetWithInfo(org.ovirt.engine.ui.common.widget.EntityModelWidgetWithInfo) GlusterVolumeSnapshotScheduleRecurrence(org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotScheduleRecurrence) AbstractRenderer(com.google.gwt.text.shared.AbstractRenderer) EnableableFormLabel(org.ovirt.engine.ui.common.widget.label.EnableableFormLabel) EntityModelDateTimeBoxEditor(org.ovirt.engine.ui.common.widget.editor.EntityModelDateTimeBoxEditor) StringEntityModelTextBoxEditor(org.ovirt.engine.ui.common.widget.editor.generic.StringEntityModelTextBoxEditor)

Example 4 with EnableableFormLabel

use of org.ovirt.engine.ui.common.widget.label.EnableableFormLabel in project ovirt-engine by oVirt.

the class ProviderSecretPopupView method initManualWidgets.

@SuppressWarnings("unchecked")
private void initManualWidgets() {
    usageTypeEditor = new ListModelListBoxEditor<>(new EnumRenderer());
    uuidEditor = new StringEntityModelTextBoxOnlyEditor();
    uuidEditorWithInfo = new EntityModelWidgetWithInfo(new EnableableFormLabel(constants.idLibvirtSecret()), uuidEditor);
    uuidEditorWithInfo.setExplanation(SafeHtmlUtils.fromTrustedString(constants.idLibvirtSecretHint()));
}
Also used : EnumRenderer(org.ovirt.engine.ui.common.widget.renderer.EnumRenderer) EntityModelWidgetWithInfo(org.ovirt.engine.ui.common.widget.EntityModelWidgetWithInfo) StringEntityModelTextBoxOnlyEditor(org.ovirt.engine.ui.common.widget.editor.generic.StringEntityModelTextBoxOnlyEditor) EnableableFormLabel(org.ovirt.engine.ui.common.widget.label.EnableableFormLabel)

Example 5 with EnableableFormLabel

use of org.ovirt.engine.ui.common.widget.label.EnableableFormLabel in project ovirt-engine by oVirt.

the class VmInitWidget method initEditorsWithIcon.

private void initEditorsWithIcon() {
    windowsHostnameEditor = new StringEntityModelTextBoxOnlyEditor();
    EnableableFormLabel label = new EnableableFormLabel();
    label.setText(constants.cloudInitHostnameLabel());
    windowsHostnameEditorWithInfo = new EntityModelWidgetWithInfo(label, windowsHostnameEditor);
    windowsHostnameEditorWithInfo.setExplanation(templates.italicText(constants.windowsHostNameInfo()));
}
Also used : EntityModelWidgetWithInfo(org.ovirt.engine.ui.common.widget.EntityModelWidgetWithInfo) StringEntityModelTextBoxOnlyEditor(org.ovirt.engine.ui.common.widget.editor.generic.StringEntityModelTextBoxOnlyEditor) EnableableFormLabel(org.ovirt.engine.ui.common.widget.label.EnableableFormLabel)

Aggregations

EnableableFormLabel (org.ovirt.engine.ui.common.widget.label.EnableableFormLabel)9 EntityModelWidgetWithInfo (org.ovirt.engine.ui.common.widget.EntityModelWidgetWithInfo)6 EntityModelDetachableWidgetWithInfo (org.ovirt.engine.ui.common.widget.EntityModelDetachableWidgetWithInfo)3 StringEntityModelTextBoxOnlyEditor (org.ovirt.engine.ui.common.widget.editor.generic.StringEntityModelTextBoxOnlyEditor)3 AbstractRenderer (com.google.gwt.text.shared.AbstractRenderer)2 EntityModelCheckBoxEditor (org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor)2 EntityModelCheckBoxOnlyEditor (org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxOnlyEditor)2 EntityModelDetachableWidgetWithLabel (org.ovirt.engine.ui.common.widget.editor.generic.EntityModelDetachableWidgetWithLabel)2 EnumRenderer (org.ovirt.engine.ui.common.widget.renderer.EnumRenderer)2 BootSequence (org.ovirt.engine.core.common.businessentities.BootSequence)1 InstanceType (org.ovirt.engine.core.common.businessentities.InstanceType)1 OpenstackNetworkProviderProperties (org.ovirt.engine.core.common.businessentities.OpenstackNetworkProviderProperties)1 Quota (org.ovirt.engine.core.common.businessentities.Quota)1 VmPoolType (org.ovirt.engine.core.common.businessentities.VmPoolType)1 VmTemplate (org.ovirt.engine.core.common.businessentities.VmTemplate)1 GlusterVolumeSnapshotScheduleRecurrence (org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotScheduleRecurrence)1 RepoImage (org.ovirt.engine.core.common.businessentities.storage.RepoImage)1 DayOfWeek (org.ovirt.engine.core.compat.DayOfWeek)1 EntityModelDateTimeBoxEditor (org.ovirt.engine.ui.common.widget.editor.EntityModelDateTimeBoxEditor)1 GroupedListModelListBox (org.ovirt.engine.ui.common.widget.editor.GroupedListModelListBox)1