use of com.github.bordertech.wcomponents.RendererFactory in project wcomponents by BorderTech.
the class UIManager method findRendererFactory.
/**
* Finds the renderer factory for the given package.
*
* @param packageName the package name to find the renderer factory for.
* @return the RendererFactory for the given package, or null if not found.
*/
private synchronized RendererFactory findRendererFactory(final String packageName) {
RendererFactory factory = factoriesByPackage.get(packageName);
if (factory == null) {
try {
factory = (RendererFactory) Class.forName(packageName + ".RendererFactoryImpl").newInstance();
factoriesByPackage.put(packageName, factory);
} catch (Exception e) {
throw new SystemException("Failed to create layout manager factory for " + packageName, e);
}
}
return factory;
}
use of com.github.bordertech.wcomponents.RendererFactory in project wcomponents by BorderTech.
the class UIManager method findTemplateRenderer.
/**
* Retrieves the template renderer for the given package.
*
* @param packageName the package to retrieve the template renderer for.
* @return the template renderer for the given package, or null if the package does not contain a template renderer.
* @deprecated Use {@link WTemplate} instead.
*/
@Deprecated
private synchronized Renderer findTemplateRenderer(final String packageName) {
RendererFactory factory = INSTANCE.findRendererFactory(packageName);
Renderer renderer = factory.getTemplateRenderer();
if (renderer == null) {
templateRenderers.put(packageName, NULL_RENDERER);
} else {
templateRenderers.put(packageName, renderer);
}
return renderer;
}
Aggregations