builder.popFormat();
Layout layout = builder.getLayout();
InternalPolicyFactory policyFactory = (InternalPolicyFactory)
PolicyFactory.getDefaultInstance();
InternalLayoutContentBuilder layoutContent =
policyFactory.createLayoutContentBuilder();
layoutContent.setLayout(layout);
StyleSheetActivator styleSheetActivator =
new StyleSheetActivatorImpl(null, null);
// Activate it to turn it into a runtime device layout
LayoutContentActivator activator = new LayoutContentActivator();
final ActivatedLayoutContent activatedLayoutContent =
activator.activateLayoutContent(styleSheetActivator,
(InternalLayoutContent) layoutContent.getContent());
RuntimeDeviceLayout runtimeLayout = new RuntimeLayoutAdapter(
"<anonymous>", layout,
activatedLayoutContent.getCompiledStyleSheet(),
activatedLayoutContent.getContainerNameToFragments());