blob: adf548f17ed9c9f46bea14193838a96d07405501 (
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
|
package org.openslx.dozmod.gui.control.table;
import org.openslx.bwlp.thrift.iface.ImageSummaryRead;
import org.openslx.bwlp.thrift.iface.LectureSummary;
import org.openslx.dozmod.thrift.UserCache;
import org.openslx.dozmod.util.FormatHelper;
@SuppressWarnings("serial")
public class ImageTable extends ListTable<ImageSummaryRead> {
private static String[] columnNames = { "Name", "Verantwortlicher" };
public ImageTable() {
super(columnNames);
}
@Override
protected Object getValueAtInternal(int rowIndex, int columnIndex) {
ImageSummaryRead row = get(rowIndex);
if (columnIndex == 0)
return row.getImageName();
if (columnIndex == 1)
return FormatHelper.userName(UserCache.find(row.getOwnerId()));
throw new IndexOutOfBoundsException();
}
}
|