use of org.ovirt.engine.ui.webadmin.widget.table.column.IsLockedImageTypeColumn in project ovirt-engine by oVirt.
the class RoleView method initRoleTable.
private void initRoleTable() {
roleTable.enableColumnResizing();
// $NON-NLS-1$
roleTable.addColumn(new IsLockedImageTypeColumn(), constants.empty(), "25px");
// $NON-NLS-1$
roleTable.addColumn(new RoleTypeColumn(), constants.empty(), "25px");
AbstractTextColumn<Role> nameColumn = new AbstractTextColumn<Role>() {
@Override
public String getValue(Role object) {
return object.getName();
}
};
nameColumn.makeSortable();
// $NON-NLS-1$
roleTable.addColumn(nameColumn, constants.nameRole(), "175px");
AbstractTextColumn<Role> descColumn = new AbstractTextColumn<Role>() {
@Override
public String getValue(Role object) {
return object.getDescription();
}
};
descColumn.makeSortable();
// $NON-NLS-1$
roleTable.addColumn(descColumn, constants.descriptionRole(), "500px");
roleTable.getSelectionModel().addSelectionChangeHandler(event -> {
roleModelProvider.setSelectedItems(roleTable.getSelectionModel().getSelectedObjects());
if (roleTable.getSelectionModel().getSelectedObjects().size() > 0) {
setSubTabVisibility(true);
} else {
setSubTabVisibility(false);
}
});
roleTablePanel.add(roleTable);
}
Aggregations