Search in sources :

Example 1 with StringEntityModelTextBoxEditor

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

the class AbstractVmPopupWidget method initTextBoxEditors.

private void initTextBoxEditors() {
    templateVersionNameEditor = new StringEntityModelTextBoxEditor(new ModeSwitchingVisibilityRenderer());
    vmIdEditor = new StringEntityModelTextBoxEditor(new ModeSwitchingVisibilityRenderer());
    descriptionEditor = new StringEntityModelTextBoxEditor(new ModeSwitchingVisibilityRenderer());
    commentEditor = new StringEntityModelTextBoxEditor(new ModeSwitchingVisibilityRenderer());
    numOfVmsEditor = new IntegerEntityModelTextBoxEditor(new ModeSwitchingVisibilityRenderer());
    cpuPinning = new StringEntityModelTextBoxOnlyEditor(new ModeSwitchingVisibilityRenderer());
    cpuSharesAmountEditor = new IntegerEntityModelTextBoxOnlyEditor(new ModeSwitchingVisibilityRenderer());
    kernel_pathEditor = new StringEntityModelTextBoxEditor(new ModeSwitchingVisibilityRenderer());
    initrd_pathEditor = new StringEntityModelTextBoxEditor(new ModeSwitchingVisibilityRenderer());
    kernel_parametersEditor = new StringEntityModelTextBoxEditor(new ModeSwitchingVisibilityRenderer());
    nameEditor = new StringEntityModelTextBoxEditor(new ModeSwitchingVisibilityRenderer());
    nameEditor.hideLabel();
    prestartedVmsEditor = new IntegerEntityModelTextBoxOnlyEditor(new ModeSwitchingVisibilityRenderer());
    editPrestartedVmsEditor = new IntegerEntityModelTextBoxOnlyEditor(new ModeSwitchingVisibilityRenderer());
    maxAssignedVmsPerUserEditor = new IntegerEntityModelTextBoxOnlyEditor(new ModeSwitchingVisibilityRenderer());
    editMaxAssignedVmsPerUserEditor = new IntegerEntityModelTextBoxOnlyEditor(new ModeSwitchingVisibilityRenderer());
}
Also used : IntegerEntityModelTextBoxEditor(org.ovirt.engine.ui.common.widget.editor.generic.IntegerEntityModelTextBoxEditor) StringEntityModelTextBoxOnlyEditor(org.ovirt.engine.ui.common.widget.editor.generic.StringEntityModelTextBoxOnlyEditor) IntegerEntityModelTextBoxOnlyEditor(org.ovirt.engine.ui.common.widget.editor.generic.IntegerEntityModelTextBoxOnlyEditor) StringEntityModelTextBoxEditor(org.ovirt.engine.ui.common.widget.editor.generic.StringEntityModelTextBoxEditor)

Example 2 with StringEntityModelTextBoxEditor

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

the class VmRunOncePopupWidget method initComboBox.

void initComboBox() {
    sysPrepDomainNameListBoxEditor = new ListModelListBoxEditor<>();
    sysPrepDomainNameTextBoxEditor = new StringEntityModelTextBoxEditor();
    sysPrepDomainNameListBoxEditor.asListBox().addValueChangeHandler(event -> runOnceModel.sysPrepListBoxChanged());
    sysPrepDomainNameComboBox = new ComboBox<>(sysPrepDomainNameListBoxEditor, sysPrepDomainNameTextBoxEditor);
    defaultHostEditor = new ListModelListBoxEditor<>(new NameRenderer<VDS>());
    emulatedMachine = new ListModelTypeAheadChangeableListBoxEditor(new ListModelTypeAheadChangeableListBoxEditor.NullSafeSuggestBoxRenderer() {

        @Override
        public String getDisplayStringNullSafe(String data) {
            return typeAheadNameTemplateNullSafe(data);
        }
    }, false);
    customCpu = new ListModelTypeAheadChangeableListBoxEditor(new ListModelTypeAheadChangeableListBoxEditor.NullSafeSuggestBoxRenderer() {

        @Override
        public String getDisplayStringNullSafe(String data) {
            return typeAheadNameTemplateNullSafe(data);
        }
    }, false);
}
Also used : NameRenderer(org.ovirt.engine.ui.common.widget.renderer.NameRenderer) StringEntityModelTextBoxEditor(org.ovirt.engine.ui.common.widget.editor.generic.StringEntityModelTextBoxEditor) ListModelTypeAheadChangeableListBoxEditor(org.ovirt.engine.ui.common.widget.editor.ListModelTypeAheadChangeableListBoxEditor)

Example 3 with StringEntityModelTextBoxEditor

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

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

the class VmInitWidget method initComboBoxEditors.

void initComboBoxEditors() {
    networkListEditor = new ListModelListBoxEditor<>();
    networkNameEditor = new StringEntityModelTextBoxEditor();
    networkComboBox = new ComboBox<>(networkListEditor, networkNameEditor);
}
Also used : StringEntityModelTextBoxEditor(org.ovirt.engine.ui.common.widget.editor.generic.StringEntityModelTextBoxEditor)

Aggregations

StringEntityModelTextBoxEditor (org.ovirt.engine.ui.common.widget.editor.generic.StringEntityModelTextBoxEditor)4 AbstractRenderer (com.google.gwt.text.shared.AbstractRenderer)1 GlusterVolumeSnapshotScheduleRecurrence (org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotScheduleRecurrence)1 DayOfWeek (org.ovirt.engine.core.compat.DayOfWeek)1 EntityModelWidgetWithInfo (org.ovirt.engine.ui.common.widget.EntityModelWidgetWithInfo)1 EntityModelDateTimeBoxEditor (org.ovirt.engine.ui.common.widget.editor.EntityModelDateTimeBoxEditor)1 ListModelTypeAheadChangeableListBoxEditor (org.ovirt.engine.ui.common.widget.editor.ListModelTypeAheadChangeableListBoxEditor)1 IntegerEntityModelTextBoxEditor (org.ovirt.engine.ui.common.widget.editor.generic.IntegerEntityModelTextBoxEditor)1 IntegerEntityModelTextBoxOnlyEditor (org.ovirt.engine.ui.common.widget.editor.generic.IntegerEntityModelTextBoxOnlyEditor)1 StringEntityModelTextBoxOnlyEditor (org.ovirt.engine.ui.common.widget.editor.generic.StringEntityModelTextBoxOnlyEditor)1 EnableableFormLabel (org.ovirt.engine.ui.common.widget.label.EnableableFormLabel)1 NameRenderer (org.ovirt.engine.ui.common.widget.renderer.NameRenderer)1