use of org.ovirt.engine.ui.common.widget.editor.EntityModelDateTimeBoxEditor 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);
}
});
}
Aggregations