}
}
}
protected Page makePage(AreaTree areaTree) throws FOPException {
PageMaster pageMaster;
// layout this page sequence
// while there is still stuff in the flow, ask the
// sequence-specification for a new page
if ( this.sequenceSpecification == null )
{
throw new FOPException("page-sequence is missing an"
+ " sequence-specification");
}
PageMasterFactory pmf =
this.sequenceSpecification.getFirstPageMasterFactory();
pageMaster = pmf.getNextPageMaster();
while ( pageMaster == null )
{
/* move on to next sequence specifier */
pmf = pmf.getNext();
if ( pmf == null )
{
throw new FOPException("out of sequence specifiers"
+ " (FOP will eventually allow this)");
}
pageMaster = pmf.getNextPageMaster();
}
return pageMaster.makePage(areaTree);
}