////////////////////////////////////////////////////////////////////////////
};
_defaultMetalTheme = new DefaultMetalTheme();
XMLObjectCache cache = plugin.getSettingsCache();
Iterator<?> it = cache.getAllForClass(MetalThemePreferences.class);
if (it.hasNext())
{
_currentThemePrefs = (MetalThemePreferences) it.next();
}
else
{
_currentThemePrefs = new MetalThemePreferences();
ClassLoader cl = getLAFRegister().getLookAndFeelClassLoader();
Class<?> clazz = Class.forName(MetalLookAndFeelController.DEFAULT_METAL_THEME, false, cl);
MetalTheme theme = (MetalTheme) clazz.newInstance();
_currentThemePrefs.setThemeName(theme.getName());
try
{
cache.add(_currentThemePrefs);
}
catch (DuplicateObjectException ex)
{
s_log.error("MetalThemePreferences object already in XMLObjectCache", ex);
}