renderer.elementsStore = (ContentStore) this.elementsStore.clone();
renderer.pendingStore = (ContentStore) this.pendingStore.clone();
}
catch (CloneNotSupportedException e)
{
throw new StateException();
}
renderer.boxDefinitionFactory = this.boxDefinitionFactory;
if (pageContext != null)
{
renderer.pageContext = (RenderPageContext)
this.pageContext.restore(layoutProcess);
}
if (logicalPageBox != null)
{
renderer.logicalPageBox = (LogicalPageBox)
this.logicalPageBox.derive(true);
}
renderer.flowContexts = new FastStack();
for (int i = 0; i < flowContexts.length; i++)
{
final FlowContext.FlowContextState state = flowContexts[i];
final Object currentFlowId = state.getCurrentFlowId();
final State textFactoryState = state.getTextFactoryState();
final RenderableTextFactory textFactory =
(RenderableTextFactory) textFactoryState.restore(layoutProcess);
final NormalFlowRenderBox box = (NormalFlowRenderBox)
renderer.logicalPageBox.findNodeById(currentFlowId);
if (box == null)
{
throw new StateException("No Such normal flow.");
}
renderer.flowContexts.push(new FlowContext(textFactory, box));
}
}