Search in sources :

Example 1 with EntityModelWidgetWithInfo

use of org.ovirt.engine.ui.common.widget.EntityModelWidgetWithInfo 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 2 with EntityModelWidgetWithInfo

use of org.ovirt.engine.ui.common.widget.EntityModelWidgetWithInfo 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 3 with EntityModelWidgetWithInfo

use of org.ovirt.engine.ui.common.widget.EntityModelWidgetWithInfo 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)

Example 4 with EntityModelWidgetWithInfo

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

the class VmRunOncePopupWidget method initCheckBoxEditors.

void initCheckBoxEditors() {
    attachFloppyEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
    attachIsoEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
    bootMenuEnabledEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
    runAsStatelessEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
    runAndPauseEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
    useAlternateCredentialsEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
    spiceFileTransferEnabledEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
    spiceCopyPasteEnabledEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
    cloudInitEnabledEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
    volatileRunEditor = new EntityModelCheckBoxOnlyEditor();
    volatileRunEditorWithInfo = new EntityModelWidgetWithInfo(new EnableableFormLabel(constants.volatileRunOnce()), volatileRunEditor);
    volatileRunEditorWithInfo.setExplanation(templates.italicText(constants.volatileRunInfo()));
}
Also used : EntityModelWidgetWithInfo(org.ovirt.engine.ui.common.widget.EntityModelWidgetWithInfo) EntityModelCheckBoxEditor(org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxEditor) EntityModelCheckBoxOnlyEditor(org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxOnlyEditor) EnableableFormLabel(org.ovirt.engine.ui.common.widget.label.EnableableFormLabel)

Example 5 with EntityModelWidgetWithInfo

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

the class AbstractVmPopupWidget method initSpiceProxy.

protected void initSpiceProxy() {
    EnableableFormLabel label = new EnableableFormLabel();
    label.setText(constants.defineSpiceProxyEnable());
    spiceProxyOverrideEnabledEditor = new EntityModelCheckBoxOnlyEditor();
    spiceProxyEnabledCheckboxWithInfoIcon = new EntityModelWidgetWithInfo(label, spiceProxyOverrideEnabledEditor, Align.LEFT);
}
Also used : EntityModelWidgetWithInfo(org.ovirt.engine.ui.common.widget.EntityModelWidgetWithInfo) EnableableFormLabel(org.ovirt.engine.ui.common.widget.label.EnableableFormLabel) EntityModelCheckBoxOnlyEditor(org.ovirt.engine.ui.common.widget.editor.generic.EntityModelCheckBoxOnlyEditor)

Aggregations

EntityModelWidgetWithInfo (org.ovirt.engine.ui.common.widget.EntityModelWidgetWithInfo)6 EnableableFormLabel (org.ovirt.engine.ui.common.widget.label.EnableableFormLabel)6 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 StringEntityModelTextBoxOnlyEditor (org.ovirt.engine.ui.common.widget.editor.generic.StringEntityModelTextBoxOnlyEditor)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 ListModelTypeAheadChangeableListBoxEditor (org.ovirt.engine.ui.common.widget.editor.ListModelTypeAheadChangeableListBoxEditor)1 VncKeyMapRenderer (org.ovirt.engine.ui.common.widget.editor.VncKeyMapRenderer)1