Search in sources :

Example 1 with CheckboxCellImpl

use of org.uberfire.ext.widgets.table.client.CheckboxCellImpl in project kie-wb-common by kiegroup.

the class BooleanColumnGenerator method getColumn.

@Override
public Column<HasProperties, Boolean> getColumn(final String property) {
    final CheckboxCellImpl checkbox = new CheckboxCellImpl(true);
    final Column<HasProperties, Boolean> column = new Column<HasProperties, Boolean>(checkbox) {

        @Override
        public Boolean getValue(HasProperties object) {
            Object value = object.get(property);
            if (value == null) {
                return Boolean.FALSE;
            }
            return Boolean.TRUE.equals(value);
        }
    };
    return column;
}
Also used : Column(com.google.gwt.user.cellview.client.Column) HasProperties(org.jboss.errai.databinding.client.HasProperties) CheckboxCellImpl(org.uberfire.ext.widgets.table.client.CheckboxCellImpl)

Aggregations

Column (com.google.gwt.user.cellview.client.Column)1 HasProperties (org.jboss.errai.databinding.client.HasProperties)1 CheckboxCellImpl (org.uberfire.ext.widgets.table.client.CheckboxCellImpl)1