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.types.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[] { ID, SIZE };
13 protected String[] getColumns() {
18 public Object getValueAt(int rowIndex, int columnIndex) {
19 GroupData group = items.get(rowIndex);
20 String wantedColumn = COLUMNS[columnIndex];
21 switch (wantedColumn) {
25 return group.getSize();
27 throw new RuntimeException(UNHANDLEDCOLUMN);