• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java InlineDateField类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.vaadin.ui.InlineDateField的典型用法代码示例。如果您正苦于以下问题:Java InlineDateField类的具体用法?Java InlineDateField怎么用?Java InlineDateField使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: DatePickerDialog

import com.vaadin.ui.InlineDateField; //导入依赖的package包/类
public DatePickerDialog(boolean lightTheme) {
    setPrimaryStyleName(lightTheme ? Styles.Windows.LIGHT : Styles.Windows.DARK);
    addStyleName(Styles.Windows.NO_HEADER);

    field = new InlineDateField();
    field.setPrimaryStyleName(lightTheme ? Styles.DatePickers.LIGHT : Styles.DatePickers.DARK);
    field.addStyleName(FlexItem.FlexGrow.GROW_1);
    field.addStyleName(FlexLayout.Overflow.AUTO.getStyleName());

    // Header
    header = new DatePickerHeader(field, lightTheme);

    // Footer
    footer = new DatePickerFooter(field, lightTheme);

    // Content wrapper
    content = new FlexLayout(FlexLayout.FlexDirection.COLUMN, header, field, footer);
    setContent(content);
}
 
开发者ID:vaadin,项目名称:material-theme-fw8,代码行数:20,代码来源:DatePickerDialog.java


示例2: DatePickerFooter

import com.vaadin.ui.InlineDateField; //导入依赖的package包/类
public DatePickerFooter(InlineDateField field, boolean lightTheme) {
    setAlignItems(FlexLayout.AlignItems.CENTER);
    setJustifyContent(FlexLayout.JustifyContent.FLEX_END);
    addStyleName(Paddings.All.SMALL);
    addStyleName(Spacings.Right.SMALL);
    addStyleName(FlexItem.FlexShrink.SHRINK_0);

    cancel = new Button("Cancel");
    cancel.setPrimaryStyleName(lightTheme ? Styles.Buttons.Flat.LIGHT : Styles.Buttons.Flat.DARK);

    ok = new Button("OK");
    ok.setPrimaryStyleName(lightTheme ? Styles.Buttons.Flat.LIGHT : Styles.Buttons.Flat.DARK);
    ok.setEnabled(field.getValue() != null);

    this.field = field;
    this.field.addValueChangeListener(event -> ok.setEnabled(this.field.getValue() != null));

    addComponents(cancel, ok);
}
 
开发者ID:vaadin,项目名称:material-theme-fw8,代码行数:20,代码来源:DatePickerFooter.java


示例3: DatePickerHeader

import com.vaadin.ui.InlineDateField; //导入依赖的package包/类
public DatePickerHeader(InlineDateField field, boolean lightTheme) {
    setFlexDirection(FlexDirection.COLUMN);
    setJustifyContent(JustifyContent.CENTER);
    addStyleName(Paddings.Horizontal.LARGE);
    addStyleName(FlexItem.FlexShrink.SHRINK_0);

    this.field = field;
    field.addValueChangeListener((HasValue.ValueChangeListener<LocalDate>) event -> {
        year.setValue(field.getValue().format(DateTimeFormatter.ofPattern("yyyy")));
        date.setValue(field.getValue().format(DateTimeFormatter.ofPattern("EEE, MMM d")));
    });

    setHeight(Metrics.DatePicker.HEADER_HEIGHT, Unit.PIXELS);
    addStyleName(lightTheme ? MaterialColor.BLUE_500.getBackgroundColorStyle() : MaterialColor.GREY_700.getBackgroundColorStyle());

    year.setPrimaryStyleName(Typography.Light.Body2.SECONDARY);
    date.setPrimaryStyleName(Typography.Light.DatePicker.Title.PRIMARY);

    addComponents(year, date);
}
 
开发者ID:vaadin,项目名称:material-theme-fw8,代码行数:21,代码来源:DatePickerHeader.java


示例4: PickersView

import com.vaadin.ui.InlineDateField; //导入依赖的package包/类
public PickersView() {
    setAlignItems(FlexLayout.AlignItems.FLEX_START);
    setAlignSelf(AlignSelf.BASELINE);
    setFlexWrap(FlexLayout.FlexWrap.WRAP);
    setJustifyContent(JustifyContent.CENTER);
    addStyleName(Spacings.All.LARGE);

    InlineDateField idf1 = new InlineDateField();
    idf1.setPrimaryStyleName(Styles.DatePickers.LIGHT);
    FlexLayout c1 = new FlexLayout(FlexDirection.COLUMN, idf1);
    c1.addStyleName("card");

    InlineDateField idf2 = new InlineDateField();
    idf2.setPrimaryStyleName(Styles.DatePickers.LIGHT);

    FlexLayout c2 = new FlexLayout(FlexDirection.COLUMN, new DatePickerHeader(idf2, true), idf2, createFooter(idf2, true));
    c2.addStyleName("card");


    InlineDateField idf3 = new InlineDateField();
    idf3.setPrimaryStyleName(Styles.DatePickers.DARK);
    FlexLayout c3 = new FlexLayout(FlexDirection.COLUMN, idf3);
    c3.addStyleName("card" + " " + MaterialColor.GREY_800.getBackgroundColorStyle());

    InlineDateField idf4 = new InlineDateField();
    idf4.setPrimaryStyleName(Styles.DatePickers.DARK);
    FlexLayout c4 = new FlexLayout(FlexDirection.COLUMN, new DatePickerHeader(idf4, false), idf4, createFooter(idf4, false));
    c4.addStyleName("card" + " " + MaterialColor.GREY_800.getBackgroundColorStyle());


    addComponents(c1, c2, c3, c4);
}
 
开发者ID:vaadin,项目名称:material-theme-fw8,代码行数:33,代码来源:PickersView.java


示例5: createFooter

import com.vaadin.ui.InlineDateField; //导入依赖的package包/类
public CssLayout createFooter(InlineDateField field, boolean lightTheme) {
    DatePickerFooter footer = new DatePickerFooter(field, lightTheme);

    if (!lightTheme) {
        footer.getDismissiveActionButton().addStyleName(MaterialColor.BLUE_200.getFontColorStyle());
        footer.getAffirmativeActionButton().addStyleName(MaterialColor.BLUE_200.getFontColorStyle());
    }

    return footer;

}
 
开发者ID:vaadin,项目名称:material-theme-fw8,代码行数:12,代码来源:PickersView.java


示例6: buildInternalField

import com.vaadin.ui.InlineDateField; //导入依赖的package包/类
@Override
protected AbstractDateField<LocalDate, ?> buildInternalField(Class<? extends Date> type) {
	AbstractLocalDateField field = isInline() ? new InlineDateField() : new com.vaadin.ui.DateField();
	if (getResolution() == Resolution.MONTH) {
		field.setResolution(DateResolution.MONTH);
	}
	if (getResolution() == Resolution.YEAR) {
		field.setResolution(DateResolution.YEAR);
	}
	return field;
}
 
开发者ID:holon-platform,项目名称:holon-vaadin,代码行数:12,代码来源:DateField.java


示例7: createInlineDateField

import com.vaadin.ui.InlineDateField; //导入依赖的package包/类
/**
 * Creates an inline date field.
 * @param pid property name.
 * @param propertyType property type.
 * @return a new field to select a date.
 */
public Field createInlineDateField(String pid, Class<?> propertyType) {
	Field field = null;
	if(Date.class.isAssignableFrom(propertyType)) {
		InlineDateField dateField = new InlineDateField();
		dateField.setResolution(InlineDateField.RESOLUTION_DAY);
		dateField.setDateFormat(Utils.getDateFormatPattern());
		field = dateField;
	}
       
       return field;
}
 
开发者ID:alejandro-du,项目名称:enterprise-app,代码行数:18,代码来源:DefaultCrudFieldFactory.java


示例8: buildInternalField

import com.vaadin.ui.InlineDateField; //导入依赖的package包/类
@Override
protected DateField buildInternalField(Class<? extends T> type) {
	DateField field = isInline() ? new InlineDateField() : new DateField();
	configureDateField(field);
	return field;
}
 
开发者ID:holon-platform,项目名称:holon-vaadin7,代码行数:7,代码来源:AbstractTemporalField.java


示例9: getField

import com.vaadin.ui.InlineDateField; //导入依赖的package包/类
public InlineDateField getField() {
    return field;
}
 
开发者ID:vaadin,项目名称:material-theme-fw8,代码行数:4,代码来源:DatePickerDialog.java


示例10: setField

import com.vaadin.ui.InlineDateField; //导入依赖的package包/类
public void setField(InlineDateField field) {
    this.field = field;
}
 
开发者ID:vaadin,项目名称:material-theme-fw8,代码行数:4,代码来源:DatePickerDialog.java


示例11: buildInternalField

import com.vaadin.ui.InlineDateField; //导入依赖的package包/类
@Override
protected AbstractDateField<LocalDate, ?> buildInternalField(Class<? extends LocalDate> type) {
	return isInline() ? new InlineDateField() : new DateField();
}
 
开发者ID:holon-platform,项目名称:holon-vaadin,代码行数:5,代码来源:LocalDateField.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java BeanGenerator类代码示例发布时间:2022-05-23
下一篇:
Java TaskUtils类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap