Search in sources :

Example 1 with IntegerEntityModelTextBoxEditor

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

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

the class PoolEditPopupWidget method createNumOfDesktopEditors.

@Override
protected void createNumOfDesktopEditors() {
    increaseNumOfVmsEditor = new IntegerEntityModelTextBoxEditor();
    numOfVmsEditor = new EntityModelTextBoxEditor<>(new ToStringEntityModelRenderer<Integer>(), text -> {
        // forwards to the currently active editor
        return increaseNumOfVmsEditor.asEditor().getValue();
    });
}
Also used : EntityModelTextBoxEditor(org.ovirt.engine.ui.common.widget.editor.generic.EntityModelTextBoxEditor) PopupWidgetConfigMap(org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfigMap) UnitVmModel(org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel) ElementIdHandler(org.ovirt.engine.ui.common.idhandler.ElementIdHandler) PopupWidgetConfig.simpleField(org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.simpleField) GWT(com.google.gwt.core.client.GWT) IntegerEntityModelTextBoxEditor(org.ovirt.engine.ui.common.widget.editor.generic.IntegerEntityModelTextBoxEditor) PopupWidgetConfig.hiddenField(org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField) ToStringEntityModelRenderer(org.ovirt.engine.ui.common.widget.editor.generic.ToStringEntityModelRenderer) IntegerEntityModelTextBoxEditor(org.ovirt.engine.ui.common.widget.editor.generic.IntegerEntityModelTextBoxEditor) ToStringEntityModelRenderer(org.ovirt.engine.ui.common.widget.editor.generic.ToStringEntityModelRenderer)

Example 3 with IntegerEntityModelTextBoxEditor

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

the class PoolNewPopupWidget method createNumOfDesktopEditors.

@Override
protected void createNumOfDesktopEditors() {
    numOfVmsEditor = new IntegerEntityModelTextBoxEditor();
    increaseNumOfVmsEditor = new EntityModelTextBoxEditor<>(new ToStringEntityModelRenderer<Integer>(), text -> {
        // forwards to the currently active editor
        return numOfVmsEditor.asEditor().getValue();
    });
}
Also used : EntityModelTextBoxEditor(org.ovirt.engine.ui.common.widget.editor.generic.EntityModelTextBoxEditor) PopupWidgetConfigMap(org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfigMap) AbstractVmPopupWidget(org.ovirt.engine.ui.common.widget.uicommon.popup.AbstractVmPopupWidget) UnitVmModel(org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel) ElementIdHandler(org.ovirt.engine.ui.common.idhandler.ElementIdHandler) PopupWidgetConfig.simpleField(org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.simpleField) GWT(com.google.gwt.core.client.GWT) IntegerEntityModelTextBoxEditor(org.ovirt.engine.ui.common.widget.editor.generic.IntegerEntityModelTextBoxEditor) PopupWidgetConfig.hiddenField(org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField) ToStringEntityModelRenderer(org.ovirt.engine.ui.common.widget.editor.generic.ToStringEntityModelRenderer) IntegerEntityModelTextBoxEditor(org.ovirt.engine.ui.common.widget.editor.generic.IntegerEntityModelTextBoxEditor) ToStringEntityModelRenderer(org.ovirt.engine.ui.common.widget.editor.generic.ToStringEntityModelRenderer)

Example 4 with IntegerEntityModelTextBoxEditor

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

the class AbstractVmPopupWidget method createNumOfDesktopEditors.

/**
 * There are two editors which edits the same entity - in the correct subclass make sure that the correct one's
 * value is used to edit the model
 * <p>
 * The default implementation just creates the simple editors
 */
protected void createNumOfDesktopEditors() {
    increaseNumOfVmsEditor = new IntegerEntityModelTextBoxEditor();
    numOfVmsEditor = new IntegerEntityModelTextBoxEditor();
}
Also used : IntegerEntityModelTextBoxEditor(org.ovirt.engine.ui.common.widget.editor.generic.IntegerEntityModelTextBoxEditor)

Aggregations

IntegerEntityModelTextBoxEditor (org.ovirt.engine.ui.common.widget.editor.generic.IntegerEntityModelTextBoxEditor)4 GWT (com.google.gwt.core.client.GWT)2 ElementIdHandler (org.ovirt.engine.ui.common.idhandler.ElementIdHandler)2 EntityModelTextBoxEditor (org.ovirt.engine.ui.common.widget.editor.generic.EntityModelTextBoxEditor)2 ToStringEntityModelRenderer (org.ovirt.engine.ui.common.widget.editor.generic.ToStringEntityModelRenderer)2 PopupWidgetConfig.hiddenField (org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.hiddenField)2 PopupWidgetConfig.simpleField (org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfig.simpleField)2 PopupWidgetConfigMap (org.ovirt.engine.ui.common.widget.uicommon.popup.vm.PopupWidgetConfigMap)2 UnitVmModel (org.ovirt.engine.ui.uicommonweb.models.vms.UnitVmModel)2 IntegerEntityModelTextBoxOnlyEditor (org.ovirt.engine.ui.common.widget.editor.generic.IntegerEntityModelTextBoxOnlyEditor)1 StringEntityModelTextBoxEditor (org.ovirt.engine.ui.common.widget.editor.generic.StringEntityModelTextBoxEditor)1 StringEntityModelTextBoxOnlyEditor (org.ovirt.engine.ui.common.widget.editor.generic.StringEntityModelTextBoxOnlyEditor)1 AbstractVmPopupWidget (org.ovirt.engine.ui.common.widget.uicommon.popup.AbstractVmPopupWidget)1