Map<Class, PropertyEditor> map = new HashMap<Class, PropertyEditor>();
map.put(ColourPair.class, new ColourPairPropertyEditor());
map.put(Color.class, new ColourPropertyEditor());
map.put(Pattern.class, new PatternPropertyEditor());
map.put(DateFormat.class, new DateFormatPropertyEditor());
map.put(ColumnWidths.class, new ColumnWidthsPropertyEditor());
CustomEditorConfigurer configurer = new CustomEditorConfigurer();
configurer.setCustomEditors(map);
configurer.postProcessBeanFactory(beanFactory);
return beanFactory;