summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/table/UserTable.java
blob: 2dd9122fc9c24202fc83b136e4df7ec667e70df9 (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
package org.openslx.dozmod.gui.control.table;

import org.openslx.bwlp.thrift.iface.UserInfo;
import org.openslx.dozmod.util.FormatHelper;

@SuppressWarnings("serial")
public class UserTable extends ListTable<UserInfo> {

	private static String[] columnNames =
		{ "Name" };

	private static Class<?>[] columnClasses =
		{ String.class };
	
	public UserTable() {
		super(columnNames, columnClasses);
	}

	@Override
	protected Object getValueAtInternal(int rowIndex, int columnIndex) {
		UserInfo row = getModelRow(rowIndex);
		if (columnIndex == 0)
			return FormatHelper.userName(row);
		throw new IndexOutOfBoundsException();
	}
}