xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dharamveer Salecha <dha...@wilco-int.com>
Subject PageSequence.java [optimisation]
Date Sat, 02 Dec 2000 07:55:26 GMT
Hi Fotis,

In the method 
org.apache.fop.fo.pagination.PageSequence.formatStaticContent(), 
 
private void formatStaticContent(AreaTree areaTree) 
{
...
  if (simpleMaster.getRegion(RegionBefore.REGION_CLASS) != null &&
(currentPage.getBefore() != null)) {
..

}

I understand that the currentPage(fo.layout.Page) is generated from
fo.pagination.SimplePageMaster (via using fo.layout.PageMaster which is
built in method end() of SimplePageMaster).
Hence the condition that "currentPage.getBefore() != null"  actually depends
on 
  "simpleMaster.getRegion(RegionBefore.REGION_CLASS) != null"

To sum up:
1. In method SimplePageMaster.end():
  The RegionArea for 'before' is added in fo.layout.PageMaster "only when" 
  simpleMaster.getRegion(RegionBefore.REGION_CLASS) is not null.
2. In method PageMaster.makePage():
  The fo.layout.AreaContainer for 'before' is added to fo.layout.Page "only
when" 
  RegionArea for 'before' is added in fo.layout.PageMaster

Hence, the below indicated conditions seem to be sufficient.
private void formatStaticContent(AreaTree areaTree) 
{
...
  if (currentPage.getBefore() != null) {
..
  }

  if (currentPage.getAfter() != null) {
  ..
  }
...
}

Hope I am right.

regards
Dharam
--------------------------------------------------------------------------------
The information transmitted is intended only for the person or entity to which 
it is addressed and may contain confidential and/or privileged material. 
Any review, retransmission, dissemination or other use of, or taking of any 
action in reliance upon, this information by persons or entities other than the intended recipient
is prohibited. 
If you received this in error, please contact the sender and delete the materialfrom any computer.
--------------------------------------------------------------------------------

Mime
View raw message