}
});
table.addColumn(predicateCol, "Predicate");
// Button to delete row
Column<SwitchCase, String> defaultCol = new Column<SwitchCase, String>(new ButtonCell()) {
@Override
public String getValue(SwitchCase object) {
Connection c = object.getConnection();
DecorationShape ds = c.getDecoration();
String rel = "Change to Default";
if (ds != null)
rel = "Default";
return rel;
}
};
defaultCol.setFieldUpdater(new FieldUpdater<SwitchCase, String>() {
@Override
public void update(int index, SwitchCase object, String value) {
initializeDefault(dataProvider.getList());
Connection c = object.getConnection();
addDecorationDefaultLabel(c);
table.redraw();
}
});
table.addColumn(defaultCol, "");
// Button to delete row
Column<SwitchCase, String> delCol = new Column<SwitchCase, String>(new ButtonCell()) {
@Override
public String getValue(SwitchCase object) {
return " - ";
}
};