// Get the activated variant.
Content activatedContent = activateContent(themeContent, themeActivator,
"policy.mthm", PolicyType.THEME, VariantType.THEME);
// Get the content.
ActivatedThemeContent activatedThemeContent =
(ActivatedThemeContent) activatedContent;
StyleSheetCompiler styleSheetCompiler = ThemeStyleSheetCompilerFactory.
getDefaultInstance().createStyleSheetCompiler();
CompiledStyleSheet compiledStyleSheet =
styleSheetCompiler.compileStyleSheet(
activatedThemeContent.getStyleSheet());
return new RuntimeThemeAdapter(null, compiledStyleSheet);
}