if (field.isNameField()) {
tc.setPreferredWidth((svg)?170:150);
tc.setCellRenderer(new SpreadSheetNameCellRenderer());
// tc.setCellEditor(new SpreadSheetNameCellEditor(new SimpleEditor(String.class)));
tc.setCellEditor(new SpreadSheetCellEditorAdapter(new SimpleEditor(String.class)));
} else if (field == Configuration.getFieldFromId("Field.indicators")) {
tc.setPreferredWidth(50);
tc.setCellRenderer(new SpreadSheetCellRendererAdapter(new IndicatorsRenderer()));
tc.setHeaderRenderer(new SpreadSheetColumnHeaderRenderer(IndicatorsRenderer.getCellHeader()));
} else if (field.getLookupTypes() != null) {
tc.setCellRenderer(new SpreadSheetCellRendererAdapter(new LookupRenderer()));
} else {
tc.setPreferredWidth(150);
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()));
tc.setCellEditor(new SpreadSheetCellEditorAdapter(new SpinEditor(field)));
} else if (field.isRate()) {
tc.setCellRenderer(new SpreadSheetCellRendererAdapter(new RateRenderer()));
tc.setCellEditor(new SpreadSheetCellEditorAdapter(new RateEditor(null, field.isMoney(),field.isPercent(),true)));
} else if (field.isMoney()) {
tc.setCellRenderer(new SpreadSheetCellRendererAdapter(new SimpleRenderer()));
tc.setCellEditor(new SpreadSheetCellEditorAdapter(new MoneyEditor()));
} else if (field.isPercent()) {
tc.setCellRenderer(new SpreadSheetCellRendererAdapter(new PercentRenderer()));
} else if (field.isDate()) {
tc.setCellRenderer(new SpreadSheetCellRendererAdapter(new DateRenderer()));
} else if (field.isBoolean()){