Example usage for com.vaadin.ui.renderers DateRenderer DateRenderer

List of usage examples for com.vaadin.ui.renderers DateRenderer DateRenderer

Introduction

In this page you can find the example usage for com.vaadin.ui.renderers DateRenderer DateRenderer.

Prototype

public DateRenderer(DateFormat dateFormat, String nullRepresentation) throws IllegalArgumentException 

Source Link

Document

Creates a new date renderer.

Usage

From source file:com.haulmont.cuba.web.gui.components.renderers.WebDateRenderer.java

License:Apache License

@Override
protected DateRenderer createImplementation() {
    if (dateFormat == null) {
        checkNotNullArgument(formatString, "Format string may not be null");
        checkNotNullArgument(locale, "Locale may not be null");
        dateFormat = new SimpleDateFormat(formatString, locale);
    }//from  w  ww  .j av  a  2s .  co m
    return new DateRenderer(dateFormat, getNullRepresentation());
}

From source file:facs.components.BookAdmin.java

License:Open Source License

private void setRenderers(Grid grid) {
    grid.getColumn("price").setRenderer(new NumberRenderer("%1$.2f "));

    grid.getColumn("start")
            .setRenderer(new DateRenderer("%1$tB %1$te %1$tY, %1$tH:%1$tM:%1$tS", Locale.GERMAN));

    grid.getColumn("end").setRenderer(new DateRenderer("%1$tB %1$te %1$tY, %1$tH:%1$tM:%1$tS", Locale.GERMAN));
}

From source file:facs.components.Statistics.java

License:Open Source License

private void setRenderers(Grid grid) {
    grid.getColumn(costCaption).setRenderer(new NumberRenderer("%1$.2f "));

    grid.getColumn(startCaption)//from   www.  j  a va2 s . c o m
            .setRenderer(new DateRenderer("%1$tB %1$te %1$tY, %1$tH:%1$tM:%1$tS", Locale.GERMAN));

    grid.getColumn(endCaption)
            .setRenderer(new DateRenderer("%1$tB %1$te %1$tY, %1$tH:%1$tM:%1$tS", Locale.GERMAN));

}