}
}
public Component getTableCellEditorComponent(JTable table, Object value,
boolean isSelected, int row, int col) {
Field field = ((SpreadSheetModel)table.getModel()).getFieldInColumn(col+1);
DateFormat format;
if (field.isDateOnly())
format = EditOption.getInstance().getShortDateFormat();
else
format = EditOption.getInstance().getDateFormat();
dateField = new ExtDateField(format);
dateField.setBorder(BorderFactory.createLineBorder(Color.BLACK));
if (value == null) {
long date = DateTime.midnightToday();
if (field.isStartValue())
date = CalendarOption.getInstance().makeValidStart(date, true);
else if (field.isEndValue())
date = CalendarOption.getInstance().makeValidEnd(date, true);
value = new Date(date);
}
dateField.setValue(value);
dateField.getTextField().setSelectedTextColor(Color.WHITE);