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);
}
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()));
}
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);
}
});
}
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()));
}
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()));
}
Aggregations