当前位置: 首页>>代码示例>>Java>>正文


Java DateField.setImmediate方法代码示例

本文整理汇总了Java中com.vaadin.ui.DateField.setImmediate方法的典型用法代码示例。如果您正苦于以下问题:Java DateField.setImmediate方法的具体用法?Java DateField.setImmediate怎么用?Java DateField.setImmediate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.vaadin.ui.DateField的用法示例。


在下文中一共展示了DateField.setImmediate方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: LocalDateField

import com.vaadin.ui.DateField; //导入方法依赖的package包/类
public LocalDateField(Boolean tiny) {
	dateField = new DateField();
	if (tiny){
		dateField.addStyleName(ValoTheme.DATEFIELD_TINY);
	}
	dateField.setWidth(100,Unit.PERCENTAGE);
	dateField.addValueChangeListener(e->showOrHideErrorDateField());
	dateField.setImmediate(true);
}
 
开发者ID:EsupPortail,项目名称:esup-ecandidat,代码行数:10,代码来源:LocalDateField.java

示例2: LocalDateTimeField

import com.vaadin.ui.DateField; //导入方法依赖的package包/类
public LocalDateTimeField() {
	dateField = new DateField();
	dateField.addValueChangeListener(e->showOrHideErrorDateField());
	hourNs = new NativeSelect();
	hourNs.addValueChangeListener(e->fireValueChange(false));
	minuteNs = new NativeSelect();
	minuteNs.addValueChangeListener(e->fireValueChange(false));
	hlContent = new HorizontalLayout();
	//hlContent.setSizeFull();
	hlContent.setSpacing(true);
	
	dateField.setImmediate(true);
	hlContent.addComponent(dateField);
	
	for (Integer i = 0; i<24; i++){
		hourNs.addItem(i);
		hourNs.setItemCaption(i, MethodUtils.getLabelMinuteHeure(i));
	}
	hourNs.setNullSelectionAllowed(false);
	hourNs.setImmediate(true);
	hourNs.setValue(0);
	for (Integer i = 0; i<60; i++){
		minuteNs.addItem(i);
		minuteNs.setItemCaption(i, MethodUtils.getLabelMinuteHeure(i));
	}
	minuteNs.setNullSelectionAllowed(false);
	minuteNs.setImmediate(true);
	minuteNs.setValue(0);
	hlContent.addComponent(hourNs);
	hlContent.setComponentAlignment(hourNs, Alignment.MIDDLE_LEFT);
	Label label1 = new Label(":");
	hlContent.addComponent(label1);
	hlContent.setComponentAlignment(label1, Alignment.MIDDLE_LEFT);
	hlContent.addComponent(minuteNs);
	hlContent.setComponentAlignment(minuteNs, Alignment.MIDDLE_LEFT);
	Label label2 = new Label("(HH:MM)");
	hlContent.addComponent(label2);
	hlContent.setComponentAlignment(label2, Alignment.MIDDLE_LEFT);
}
 
开发者ID:EsupPortail,项目名称:esup-ecandidat,代码行数:40,代码来源:LocalDateTimeField.java

示例3: getDateField

import com.vaadin.ui.DateField; //导入方法依赖的package包/类
/**
 * @param caption
 * @param bindName
 * @return
 */
private DateField getDateField(String caption, String bindName) {
	DateField dateField = new DateField(caption);
	dateField.setImmediate(true);
	dateField.setValidationVisible(false);
	dateField.setDateFormat(DATE_FORMAT);
	fieldGroup.bind(dateField, bindName);
	return dateField;
}
 
开发者ID:KrishnaPhani,项目名称:KrishnasSpace,代码行数:14,代码来源:BasicFormImpl.java

示例4: initDueDateField

import com.vaadin.ui.DateField; //导入方法依赖的package包/类
protected void initDueDateField() {
  dueDateField = new DateField();
  if (task.getDueDate() != null) {
    dueDateField.setValue(task.getDueDate());
  } else {
    dueDateField.setValue(new Date());
  }
  dueDateField.setWidth(125, UNITS_PIXELS);
  dueDateField.setResolution(DateField.RESOLUTION_DAY);
  dueDateField.setImmediate(true);
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:12,代码来源:DueDateComponent.java

示例5: bindDateField

import com.vaadin.ui.DateField; //导入方法依赖的package包/类
public DateField bindDateField(AbstractLayout form, ValidatingFieldGroup<E> group, String fieldLabel,
		String fieldName, String dateFormat, Resolution resolution)
{
	DateField field = new SplitDateField(fieldLabel);
	field.setDateFormat(dateFormat);
	field.setResolution(resolution);

	field.setImmediate(true);
	field.setWidth("100%");
	addValueChangeListeners(field);
	doBinding(group, fieldName, field);
	form.addComponent(field);
	return field;
}
 
开发者ID:rlsutton1,项目名称:VaadinUtils,代码行数:15,代码来源:FormHelper.java

示例6: ReportParameterDateTimeRange

import com.vaadin.ui.DateField; //导入方法依赖的package包/类
/**
 * 
 * @param caption
 *            - shown on the UI
 * @param parameterName
 *            - parameter name passed to ireport
 * @param resolution
 *            - Vaadin calendar control resolution
 * @param displayFormat
 *            - format to display to the user
 * @param parameterFormat
 *            - format of the value passed to ireport
 */
public ReportParameterDateTimeRange(String caption, String startParameterName, String endParameterName,
		Resolution resolution, String displayFormat, String parameterFormat, int endAdjustment)
{
	super(caption, new String[] { startParameterName, endParameterName });
	Preconditions.checkNotNull(startParameterName);
	Preconditions.checkNotNull(endParameterName);
	this.startParameterName = startParameterName;
	this.endParameterName = endParameterName;
	startfield = new DateField(caption, new DateTime().toDate());
	startfield.setResolution(resolution);
	startfield.setDateFormat(displayFormat);
	this.parameterFormat = parameterFormat;
	startfield.setImmediate(true);

	startfield.setValidationVisible(true);

	endfield = new DateField("To", new DateTime().toDate());
	endfield.setResolution(resolution);
	endfield.setDateFormat(displayFormat);
	this.parameterFormat = parameterFormat;
	endfield.setImmediate(true);

	endfield.setValidationVisible(true);
	createValidators();
	this.endAdjustment = endAdjustment;
}
 
开发者ID:rlsutton1,项目名称:VaadinUtils,代码行数:40,代码来源:ReportParameterDateTimeRange.java

示例7: 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);
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:65,代码来源:AutoStartOptionGroupLayout.java

示例8: 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);
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:63,代码来源:ActionTypeOptionGroupLayout.java

示例9: buildMainLayout

import com.vaadin.ui.DateField; //导入方法依赖的package包/类
@AutoGenerated
private AbsoluteLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new AbsoluteLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("580px");
	mainLayout.setHeight("280px");
	mainLayout.setMargin(false);
	
	// top-level component properties
	setWidth("580px");
	setHeight("280px");
	
	// clientField
	clientField = new ComboBox();
	clientField.setCaption("Cliente");
	clientField.setImmediate(false);
	clientField.setWidth("461px");
	clientField.setHeight("-1px");
	mainLayout.addComponent(clientField, "top:96.0px;left:19.0px;");
	
	// codeField
	codeField = new TextField();
	codeField.setCaption("Código");
	codeField.setImmediate(false);
	codeField.setWidth("120px");
	codeField.setHeight("-1px");
	mainLayout.addComponent(codeField, "top:16.0px;left:20.0px;");
	
	// observationField
	observationField = new TextField();
	observationField.setCaption("Observaciones");
	observationField.setImmediate(false);
	observationField.setWidth("540px");
	observationField.setHeight("119px");
	mainLayout.addComponent(observationField, "top:141.0px;left:20.0px;");
	
	// offerRequestDateField
	offerRequestDateField = new DateField();
	offerRequestDateField.setCaption("Fecha Petición Oferta");
	offerRequestDateField.setImmediate(false);
	offerRequestDateField.setWidth("100.0%");
	offerRequestDateField.setHeight("23px");
	offerRequestDateField.setInvalidAllowed(false);
	mainLayout.addComponent(offerRequestDateField,
			"top:19.0px;right:19.0px;left:421.0px;");
	
	// offerRequestStatusField
	offerRequestStatusField = new ComboBox();
	offerRequestStatusField.setCaption("Estado");
	offerRequestStatusField.setImmediate(false);
	offerRequestStatusField.setWidth("220px");
	offerRequestStatusField.setHeight("-1px");
	mainLayout.addComponent(offerRequestStatusField,
			"top:58.0px;left:340.0px;");
	
	// offerRequestTypeField
	offerRequestTypeField = new ComboBox();
	offerRequestTypeField.setCaption("Tipo");
	offerRequestTypeField.setImmediate(false);
	offerRequestTypeField.setWidth("300px");
	offerRequestTypeField.setHeight("-1px");
	mainLayout.addComponent(offerRequestTypeField,
			"top:58.0px;left:20.0px;");
	
	// hlSearchButtons
	hlSearchButtons = buildHlSearchButtons();
	mainLayout.addComponent(hlSearchButtons, "top:96.0px;left:484.0px;");
	
	return mainLayout;
}
 
开发者ID:thingtrack,项目名称:konekti,代码行数:72,代码来源:OfferRequestViewForm.java

示例10: buildMainLayout

import com.vaadin.ui.DateField; //导入方法依赖的package包/类
@AutoGenerated
private AbsoluteLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new AbsoluteLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("520px");
	mainLayout.setHeight("280px");
	mainLayout.setMargin(true);
	
	// top-level component properties
	setWidth("520px");
	setHeight("280px");
	
	// alarmDateField
	alarmDateField = new DateField();
	alarmDateField.setCaption("Fecha alarma");
	alarmDateField.setImmediate(false);
	alarmDateField.setWidth("120px");
	alarmDateField.setHeight("-1px");
	alarmDateField.setInvalidAllowed(false);
	alarmDateField.setResolution(DateField.RESOLUTION_SEC);
	mainLayout.addComponent(alarmDateField, "top:17.0px;left:380.0px;");
	
	// areaField
	areaField = new TextField();
	areaField.setCaption("Area trabajo");
	areaField.setImmediate(false);
	areaField.setWidth("160px");
	areaField.setHeight("-1px");
	mainLayout.addComponent(areaField, "top:17.0px;left:200.0px;");
	
	// messageField
	messageField = new TextField();
	messageField.setCaption("Message");
	messageField.setImmediate(false);
	messageField.setWidth("480px");
	messageField.setHeight("164px");
	mainLayout.addComponent(messageField, "top:100.0px;left:20.0px;");
	
	// organizationField
	organizationField = new TextField();
	organizationField.setCaption("Organización");
	organizationField.setImmediate(false);
	organizationField.setWidth("160px");
	organizationField.setHeight("-1px");
	mainLayout.addComponent(organizationField, "top:17.0px;left:20.0px;");
	
	// alarmTypeField
	alarmTypeField = new ComboBox();
	alarmTypeField.setCaption("Tipo alarma");
	alarmTypeField.setImmediate(false);
	alarmTypeField.setWidth("180px");
	alarmTypeField.setHeight("-1px");
	mainLayout.addComponent(alarmTypeField, "top:60.0px;left:20.0px;");
	
	// alarmStatusField
	alarmStatusField = new ComboBox();
	alarmStatusField.setCaption("Estado alarma");
	alarmStatusField.setImmediate(false);
	alarmStatusField.setWidth("180px");
	alarmStatusField.setHeight("-1px");
	mainLayout.addComponent(alarmStatusField, "top:60.0px;left:220.0px;");
	
	return mainLayout;
}
 
开发者ID:thingtrack,项目名称:konekti,代码行数:66,代码来源:AlarmViewForm.java

示例11: buildMainLayout

import com.vaadin.ui.DateField; //导入方法依赖的package包/类
@AutoGenerated
private AbsoluteLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new AbsoluteLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("520px");
	mainLayout.setHeight("360px");
	mainLayout.setMargin(true);
	
	// top-level component properties
	setWidth("520px");
	setHeight("360px");
	
	// commentField
	commentField = new TextField();
	commentField.setCaption("Comentario");
	commentField.setImmediate(false);
	commentField.setWidth("480px");
	commentField.setHeight("240px");
	mainLayout.addComponent(commentField, "top:100.0px;left:20.0px;");
	
	// feedbackDateField
	feedbackDateField = new DateField();
	feedbackDateField.setCaption("Fecha sugerencia");
	feedbackDateField.setImmediate(false);
	feedbackDateField.setWidth("160px");
	feedbackDateField.setHeight("-1px");
	feedbackDateField.setInvalidAllowed(false);
	mainLayout.addComponent(feedbackDateField, "top:20.0px;left:340.0px;");
	
	// invoiceField
	invoiceField = new TextField();
	invoiceField.setCaption("Número Factura");
	invoiceField.setImmediate(false);
	invoiceField.setWidth("140px");
	invoiceField.setHeight("-1px");
	mainLayout.addComponent(invoiceField, "top:17.0px;left:20.0px;");
	
	// feedbackStatusField
	feedbackStatusField = new ComboBox();
	feedbackStatusField.setCaption("Estado");
	feedbackStatusField.setImmediate(false);
	feedbackStatusField.setWidth("280px");
	feedbackStatusField.setHeight("-1px");
	mainLayout.addComponent(feedbackStatusField, "top:60.0px;left:20.0px;");
	
	// feedbackTypeField
	feedbackTypeField = new ComboBox();
	feedbackTypeField.setCaption("Tipo");
	feedbackTypeField.setImmediate(false);
	feedbackTypeField.setWidth("180px");
	feedbackTypeField.setHeight("-1px");
	mainLayout.addComponent(feedbackTypeField, "top:60.0px;left:320.0px;");
	
	return mainLayout;
}
 
开发者ID:thingtrack,项目名称:konekti,代码行数:57,代码来源:FeedbackViewForm.java


注:本文中的com.vaadin.ui.DateField.setImmediate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。