Search in sources :

Example 1 with AbstractRenderedTextColumn

use of org.ovirt.engine.ui.common.widget.table.column.AbstractRenderedTextColumn in project ovirt-engine by oVirt.

the class PermissionListModelTable method addCreationDateColum.

private void addCreationDateColum() {
    AbstractTextColumn<Permission> creationDateColumn = new AbstractRenderedTextColumn<Permission, Date>(new FullDateTimeRenderer()) {

        @Override
        public Date getRawValue(Permission object) {
            // GWT doesn't have TimeUnit.java
            return new Date(object.getCreationDate() * 1000);
        }
    };
    // $NON-NLS-1$
    getTable().addColumn(creationDateColumn, constants.permissionsCreationDate(), "300px");
    creationDateColumn.makeSortable();
}
Also used : AbstractRenderedTextColumn(org.ovirt.engine.ui.common.widget.table.column.AbstractRenderedTextColumn) FullDateTimeRenderer(org.ovirt.engine.ui.common.widget.renderer.FullDateTimeRenderer) Permission(org.ovirt.engine.core.common.businessentities.Permission) Date(java.util.Date)

Aggregations

Date (java.util.Date)1 Permission (org.ovirt.engine.core.common.businessentities.Permission)1 FullDateTimeRenderer (org.ovirt.engine.ui.common.widget.renderer.FullDateTimeRenderer)1 AbstractRenderedTextColumn (org.ovirt.engine.ui.common.widget.table.column.AbstractRenderedTextColumn)1