public static IconTheme createIconTheme(final Configuration config)
{
final String themeClass = config.getConfigProperty(ICON_THEME_CONFIG_KEY);
final Object maybeTheme = ObjectUtilities.loadAndInstantiate(themeClass, PreviewPane.class, IconTheme.class);
final IconTheme iconTheme;
if (maybeTheme != null)
{
iconTheme = (IconTheme) maybeTheme;
}
else
{
iconTheme = new DefaultIconTheme();
}
iconTheme.initialize(config);
return iconTheme;
}