use of cz.metacentrum.perun.webgui.json.comparators.RichMemberComparator in project perun by CESNET.
the class MemberColumnProvider method addNameColumn.
public void addNameColumn(IsClickableCell authz, int width) {
// create column
Column<RichMember, RichMember> nameColumn = JsonUtils.addColumn(new CustomClickableTextCellWithAuthz<RichMember>(authz, "name"), new JsonUtils.GetValue<RichMember, RichMember>() {
@Override
public RichMember getValue(RichMember object) {
return object;
}
}, fieldUpdater);
// add column
table.addColumn(nameColumn, "Name");
if (width != 0) {
table.setColumnWidth(nameColumn, width, Style.Unit.PX);
}
// sort column
nameColumn.setSortable(true);
table.getColumnSortHandler().setComparator(nameColumn, new RichMemberComparator(RichMemberComparator.Column.USER_FULL_NAME));
}
use of cz.metacentrum.perun.webgui.json.comparators.RichMemberComparator in project perun by CESNET.
the class MemberColumnProvider method addEmailColumn.
public void addEmailColumn(IsClickableCell authz, int width) {
// create column
Column<RichMember, RichMember> emailColumn = JsonUtils.addColumn(new CustomClickableTextCellWithAuthz<RichMember>(authz, "email"), new JsonUtils.GetValue<RichMember, RichMember>() {
@Override
public RichMember getValue(RichMember object) {
return object;
}
}, fieldUpdater);
// add column
table.addColumn(emailColumn, "Email");
if (width != 0) {
table.setColumnWidth(emailColumn, width, Style.Unit.PX);
}
// sort column
emailColumn.setSortable(true);
table.getColumnSortHandler().setComparator(emailColumn, new RichMemberComparator(RichMemberComparator.Column.EMAIL));
}
use of cz.metacentrum.perun.webgui.json.comparators.RichMemberComparator in project perun by CESNET.
the class MemberColumnProvider method addOrganizationColumn.
public void addOrganizationColumn(IsClickableCell authz, int width) {
// create column
Column<RichMember, RichMember> organizationColumn = JsonUtils.addColumn(new CustomClickableTextCellWithAuthz<RichMember>(authz, "organization"), new JsonUtils.GetValue<RichMember, RichMember>() {
@Override
public RichMember getValue(RichMember object) {
return object;
}
}, fieldUpdater);
// add column
table.addColumn(organizationColumn, "Organization");
if (width != 0) {
table.setColumnWidth(organizationColumn, width, Style.Unit.PX);
}
// sort column
organizationColumn.setSortable(true);
table.getColumnSortHandler().setComparator(organizationColumn, new RichMemberComparator(RichMemberComparator.Column.ORGANIZATION));
}
use of cz.metacentrum.perun.webgui.json.comparators.RichMemberComparator in project perun by CESNET.
the class MemberColumnProvider method addIdColumn.
public void addIdColumn(IsClickableCell authz, int width) {
// create column
Column<RichMember, RichMember> idColumn = JsonUtils.addColumn(new CustomClickableTextCellWithAuthz<RichMember>(authz, "id"), new JsonUtils.GetValue<RichMember, RichMember>() {
@Override
public RichMember getValue(RichMember object) {
return object;
}
}, fieldUpdater);
// add column only if extended info is visible
if (JsonUtils.isExtendedInfoVisible()) {
table.addColumn(idColumn, "Member Id");
if (width != 0) {
table.setColumnWidth(idColumn, width, Style.Unit.PX);
}
// sort column
idColumn.setSortable(true);
table.getColumnSortHandler().setComparator(idColumn, new RichMemberComparator(RichMemberComparator.Column.MEMBER_ID));
}
}
use of cz.metacentrum.perun.webgui.json.comparators.RichMemberComparator in project perun by CESNET.
the class MemberColumnProvider method addUserIdColumn.
public void addUserIdColumn(IsClickableCell authz, int width) {
// create column
Column<RichMember, RichMember> idColumn = JsonUtils.addColumn(new CustomClickableTextCellWithAuthz<RichMember>(authz, "userId"), new JsonUtils.GetValue<RichMember, RichMember>() {
@Override
public RichMember getValue(RichMember object) {
return object;
}
}, fieldUpdater);
// add column only if extended info is visible
if (JsonUtils.isExtendedInfoVisible()) {
table.addColumn(idColumn, "User Id");
if (width != 0) {
table.setColumnWidth(idColumn, width, Style.Unit.PX);
}
// sort column
idColumn.setSortable(true);
table.getColumnSortHandler().setComparator(idColumn, new RichMemberComparator(RichMemberComparator.Column.USER_ID));
}
}
Aggregations