本文整理汇总了Java中com.vaadin.ui.DateField.setInvalidCommitted方法的典型用法代码示例。如果您正苦于以下问题:Java DateField.setInvalidCommitted方法的具体用法?Java DateField.setInvalidCommitted怎么用?Java DateField.setInvalidCommitted使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vaadin.ui.DateField
的用法示例。
在下文中一共展示了DateField.setInvalidCommitted方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createOptionGroup
import com.vaadin.ui.DateField; //导入方法依赖的package包/类
private void createOptionGroup() {
autoStartOptionGroup = new FlexibleOptionGroup();
autoStartOptionGroup.addItem(AutoStartOption.MANUAL);
autoStartOptionGroup.addItem(AutoStartOption.AUTO_START);
autoStartOptionGroup.addItem(AutoStartOption.SCHEDULED);
selectDefaultOption();
final FlexibleOptionGroupItemComponent manualItem = autoStartOptionGroup
.getItemComponent(AutoStartOption.MANUAL);
manualItem.setStyleName(STYLE_DIST_WINDOW_AUTO_START);
// set Id for Forced radio button.
manualItem.setId(UIComponentIdProvider.ROLLOUT_START_MANUAL_ID);
addComponent(manualItem);
final Label manualLabel = new Label();
manualLabel.setStyleName("statusIconPending");
manualLabel.setIcon(FontAwesome.HAND_PAPER_O);
manualLabel.setCaption(i18n.getMessage("caption.rollout.start.manual"));
manualLabel.setDescription(i18n.getMessage("caption.rollout.start.manual.desc"));
manualLabel.setStyleName("padding-right-style");
addComponent(manualLabel);
final FlexibleOptionGroupItemComponent autoStartItem = autoStartOptionGroup
.getItemComponent(AutoStartOption.AUTO_START);
autoStartItem.setId(UIComponentIdProvider.ROLLOUT_START_AUTO_ID);
autoStartItem.setStyleName(STYLE_DIST_WINDOW_AUTO_START);
addComponent(autoStartItem);
final Label autoStartLabel = new Label();
autoStartLabel.setSizeFull();
autoStartLabel.setIcon(FontAwesome.PLAY);
autoStartLabel.setCaption(i18n.getMessage("caption.rollout.start.auto"));
autoStartLabel.setDescription(i18n.getMessage("caption.rollout.start.auto.desc"));
autoStartLabel.setStyleName("padding-right-style");
addComponent(autoStartLabel);
final FlexibleOptionGroupItemComponent scheduledItem = autoStartOptionGroup
.getItemComponent(AutoStartOption.SCHEDULED);
scheduledItem.setStyleName(STYLE_DIST_WINDOW_AUTO_START);
// setted Id for Time Forced radio button.
scheduledItem.setId(UIComponentIdProvider.ROLLOUT_START_SCHEDULED_ID);
addComponent(scheduledItem);
final Label scheduledLabel = new Label();
scheduledLabel.setStyleName("statusIconPending");
scheduledLabel.setIcon(FontAwesome.CLOCK_O);
scheduledLabel.setCaption(i18n.getMessage("caption.rollout.start.scheduled"));
scheduledLabel.setDescription(i18n.getMessage("caption.rollout.start.scheduled.desc"));
scheduledLabel.setStyleName(STYLE_DIST_WINDOW_AUTO_START);
addComponent(scheduledLabel);
startAtDateField = new DateField();
startAtDateField.setInvalidAllowed(false);
startAtDateField.setInvalidCommitted(false);
startAtDateField.setEnabled(false);
startAtDateField.setStyleName("dist-window-forcedtime");
final TimeZone tz = SPDateTimeUtil.getBrowserTimeZone();
startAtDateField.setValue(
Date.from(LocalDateTime.now().plusMinutes(30).atZone(SPDateTimeUtil.getTimeZoneId(tz)).toInstant()));
startAtDateField.setImmediate(true);
startAtDateField.setTimeZone(tz);
startAtDateField.setLocale(HawkbitCommonUtil.getLocale());
startAtDateField.setResolution(Resolution.MINUTE);
startAtDateField.addStyleName(ValoTheme.DATEFIELD_SMALL);
addComponent(startAtDateField);
}
示例2: createOptionGroup
import com.vaadin.ui.DateField; //导入方法依赖的package包/类
private void createOptionGroup() {
actionTypeOptionGroup = new FlexibleOptionGroup();
actionTypeOptionGroup.addItem(ActionTypeOption.SOFT);
actionTypeOptionGroup.addItem(ActionTypeOption.FORCED);
actionTypeOptionGroup.addItem(ActionTypeOption.AUTO_FORCED);
selectDefaultOption();
final FlexibleOptionGroupItemComponent forceItem = actionTypeOptionGroup
.getItemComponent(ActionTypeOption.FORCED);
forceItem.setStyleName(STYLE_DIST_WINDOW_ACTIONTYPE);
// set Id for Forced radio button.
forceItem.setId("save.action.radio.forced");
addComponent(forceItem);
final Label forceLabel = new Label();
forceLabel.setStyleName("statusIconPending");
forceLabel.setIcon(FontAwesome.BOLT);
forceLabel.setCaption("Forced");
forceLabel.setDescription(i18n.getMessage("tooltip.forced.item"));
forceLabel.setStyleName("padding-right-style");
addComponent(forceLabel);
final FlexibleOptionGroupItemComponent softItem = actionTypeOptionGroup.getItemComponent(ActionTypeOption.SOFT);
softItem.setId(UIComponentIdProvider.ACTION_DETAILS_SOFT_ID);
softItem.setStyleName(STYLE_DIST_WINDOW_ACTIONTYPE);
addComponent(softItem);
final Label softLabel = new Label();
softLabel.setSizeFull();
softLabel.setCaption("Soft");
softLabel.setDescription(i18n.getMessage("tooltip.soft.item"));
softLabel.setStyleName("padding-right-style");
addComponent(softLabel);
final FlexibleOptionGroupItemComponent autoForceItem = actionTypeOptionGroup
.getItemComponent(ActionTypeOption.AUTO_FORCED);
autoForceItem.setStyleName(STYLE_DIST_WINDOW_ACTIONTYPE);
// setted Id for Time Forced radio button.
autoForceItem.setId(UIComponentIdProvider.ACTION_TYPE_OPTION_GROUP_SAVE_TIMEFORCED);
addComponent(autoForceItem);
final Label autoForceLabel = new Label();
autoForceLabel.setStyleName("statusIconPending");
autoForceLabel.setIcon(FontAwesome.HISTORY);
autoForceLabel.setCaption("Time Forced");
autoForceLabel.setDescription(i18n.getMessage("tooltip.timeforced.item"));
autoForceLabel.setStyleName(STYLE_DIST_WINDOW_ACTIONTYPE);
addComponent(autoForceLabel);
forcedTimeDateField = new DateField();
forcedTimeDateField.setInvalidAllowed(false);
forcedTimeDateField.setInvalidCommitted(false);
forcedTimeDateField.setEnabled(false);
forcedTimeDateField.setStyleName("dist-window-forcedtime");
final TimeZone tz = SPDateTimeUtil.getBrowserTimeZone();
forcedTimeDateField.setValue(
Date.from(LocalDateTime.now().plusWeeks(2).atZone(SPDateTimeUtil.getTimeZoneId(tz)).toInstant()));
forcedTimeDateField.setImmediate(true);
forcedTimeDateField.setTimeZone(tz);
forcedTimeDateField.setLocale(HawkbitCommonUtil.getLocale());
forcedTimeDateField.setResolution(Resolution.MINUTE);
forcedTimeDateField.addStyleName(ValoTheme.DATEFIELD_SMALL);
addComponent(forcedTimeDateField);
}