1 package at.ac.tuwien.sbc.valesriegler.pizzeria.gui.tablemodels;
3 import at.ac.tuwien.sbc.valesriegler.common.TableModel;
4 import at.ac.tuwien.sbc.valesriegler.group.GroupData;
6 public class GroupsOverviewModel extends TableModel<GroupData> {
7 private static final String ID = "ID";
8 private static final String SIZE = "Size";
10 private static final String[] COLUMNS = new String[] {
15 protected String[] getColumns() {
20 public Object getValueAt(int rowIndex, int columnIndex) {
21 GroupData group = items.get(rowIndex);
22 String wantedColumn = COLUMNS[columnIndex];
23 switch(wantedColumn) {
24 case ID : return group.getId();
25 case SIZE : return group.getSize();
26 default : throw new RuntimeException(UNHANDLEDCOLUMN);