blob: 2fd8e115e600b95f5dd9dce6e27111c9461365fe (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
package org.openslx.dozmod.gui.control.table;
import org.openslx.bwlp.thrift.iface.UserInfo;
import org.openslx.dozmod.gui.helper.I18n;
import org.openslx.dozmod.util.FormatHelper;
public class UserTable extends ListTable<UserInfo> {
/**
* Version for serialization.
*/
private static final long serialVersionUID = -6029268514356995316L;
public static final ListTableColumn COL_NAME = new ListTableColumn(
I18n.CONTROL.getString("UserTable.ListTableColumn.name.colName"));
public static final ListTableColumn COL_MAIL = new ListTableColumn(
I18n.CONTROL.getString("UserTable.ListTableColumn.mail.colName"));
public UserTable() {
super(COL_NAME, COL_MAIL);
}
@Override
protected Object getValueAtInternal(UserInfo row, ListTableColumn columnIndex) {
if (columnIndex == COL_NAME)
return FormatHelper.userName(row);
if (columnIndex == COL_MAIL)
return row.eMail;
throw new IndexOutOfBoundsException();
}
}
|