themeBaseClass = Class.forName(THEME_BASE_CLASS, false, cl);
}
catch (Throwable th)
{
s_log.error("Error loading theme base class " + THEME_BASE_CLASS, th);
throw new BaseException(th);
}
// Ensure that this is a Plastic Theme.
if (!themeBaseClass.isAssignableFrom(theme.getClass()))
{
throw new BaseException("NonPlastic Theme passed in");
}
// Note: which jar is used is specified in LAFPluginResources.properties
// try
// {
// // This works for the old looks-1.3.1.jar
// Method method = laf.getClass().getMethod("setMyCurrentTheme", new Class[] { themeBaseClass });
// Object[] parms = new Object[] { theme };
// method.invoke(laf, parms);
// }
// catch (NoSuchMethodException e)
// {
// // This works for the newer looks.jar
// MetalLookAndFeel.setCurrentTheme(theme);
// }
MetalLookAndFeel.setCurrentTheme(theme);
}
catch (Throwable th)
{
throw new BaseException(th);
}
}