if (field.hasOptions()) {
tc.setPreferredWidth(150);
tc.setCellRenderer(new SpreadSheetCellRendererAdapter(new SimpleRenderer()));
// note that in Spreadsheet, there getCellEditor() is
// overridden and dynamic combos are filled there
tc.setCellEditor(new SpreadSheetCellEditorAdapter(new SimpleComboBoxEditor(new DefaultComboBoxModel(field.getOptions(null)))));
} else if (field.getRange() != null) {
if (field.isPercent())
tc.setCellRenderer(new SpreadSheetCellRendererAdapter(new PercentRenderer()));
else
tc.setCellRenderer(new SpreadSheetCellRendererAdapter(new SimpleRenderer()));