}
private void addData(final UserSharingSetting listItem) {
final int rowCount = flexTable.getRowCount();
String userName = listItem.getUserId().getUserName();
UserId userId = Application.get().getUserId();
if (userName.equals(userId.getUserName())) {
userName += " (you)";
}
flexTable.setText(rowCount, 0, userName);
final SharingSettingsDropDown lb = new SharingSettingsDropDown();
lb.setSelectedItem(listItem.getSharingSetting());
lb.addValueChangeHandler(new ValueChangeHandler<SharingSetting>() {
public void onValueChange(ValueChangeEvent<SharingSetting> valueChangeEvent) {
SharingSetting value = valueChangeEvent.getValue();
UserSharingSetting updatedType = new UserSharingSetting(listItem.getUserId(), value);
displayedItems.set(rowCount, updatedType);
}
});
flexTable.setWidget(rowCount, 1, lb);
flexTable.getRowFormatter().addStyleName(rowCount, "web-protege-table-row");
if (!userId.getUserName().equals(userName)) {
DeleteButton deleteButton = new DeleteButton();
deleteButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
displayedItems.remove(rowCount);
refill();