}
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
Component result = super.getTableCellEditorComponent(table, value, isSelected, row, column);
if (result instanceof RadioList && isSelected) {
RadioList rl = (RadioList)result;
// CraigM:05/08/2008 - Java changes the colours for us, so don't do this.
// if (isSelected)
// {
// rl.setForeground(table.getSelectionForeground());
// rl.setBackground(table.getSelectionBackground());
// }
// else
// {
// rl.setBackground(table.getBackground()); //PM:27/9/07
// rl.setForeground(table.getForeground()); //PM:27/9/07
// }
if (value instanceof Integer)
((RadioListModel)rl.getModel()).setIntegerValue(((Integer)value).intValue());
else if (value instanceof IntegerData)
// Cater for null values. CraigM. 07/08/2007
if (((IntegerData)value).isNull()) {
rl.clearSelection();
}
else {
((RadioListModel)rl.getModel()).setIntegerValue(((IntegerData)value).intValue());
}
else if (value instanceof TextData)
((RadioListModel)rl.getModel()).setTextValue((TextData)value);
else if (value instanceof String)
((RadioListModel)rl.getModel()).setTextValue(new TextData((String)value));
else
((RadioListModel)rl.getModel()).setObjectValue(value);
}
return result;
}