You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ar...@locus.apache.org on 2000/10/10 04:04:55 UTC

cvs commit: xml-fop/src/org/apache/fop/fo/flow StaticContent.java

arved       00/10/09 19:04:55

  Modified:    src/org/apache/fop/fo/flow Tag: fop-0_14_0_regions
                        StaticContent.java
  Log:
  region-name/multiple flow support
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.9.4.1   +20 -4     xml-fop/src/org/apache/fop/fo/flow/StaticContent.java
  
  Index: StaticContent.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/StaticContent.java,v
  retrieving revision 1.9
  retrieving revision 1.9.4.1
  diff -u -r1.9 -r1.9.4.1
  --- StaticContent.java	2000/08/02 22:35:09	1.9
  +++ StaticContent.java	2000/10/10 02:04:55	1.9.4.1
  @@ -1,4 +1,4 @@
  -/*-- $Id: StaticContent.java,v 1.9 2000/08/02 22:35:09 fotis Exp $ -- 
  +/*-- $Id: StaticContent.java,v 1.9.4.1 2000/10/10 02:04:55 arved Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -74,7 +74,8 @@
       }
   
       PageSequence pageSequence;
  -
  +	String regionClass;
  +	
       protected StaticContent(FObj parent, PropertyList propertyList)
   	throws FOPException {
   	super(parent, propertyList);
  @@ -88,14 +89,20 @@
   				   + parent.getName());  
   	}
   	String flowName = this.properties.get("flow-name").getString();
  +	if (flowName.equals(""))
  +	{
  +	    throw new FOPException("A 'flow-name' is required for "
  +		+ "fo:static-content");
  +	}
   
  -	pageSequence.setStaticContent(flowName, this);
  +	regionClass = pageSequence.setStaticContent(flowName, this);
       }
       
       public Status layout(Area area) throws FOPException {
   
   	int numChildren = this.children.size();
   	// Set area absolute height so that link rectangles will be drawn correctly in xsl-before and xsl-after
  +	/*
   	String flowName = this.properties.get("flow-name").getString();
   	if(flowName.equals("xsl-region-before"))
   	{
  @@ -104,8 +111,17 @@
   	else if(flowName.equals("xsl-region-after"))
   	{
   		area.setAbsoluteHeight(area.getPage().getBody().getMaxHeight());
  +	}
  +    */
  +	if(regionClass.equals("before"))
  +	{
  +		area.setAbsoluteHeight(-area.getMaxHeight());
  +	}
  +	else if(regionClass.equals("after"))
  +	{
  +		area.setAbsoluteHeight(area.getPage().getBody().getMaxHeight());
   	}
  -       
  +	
   	for (int i = 0; i < numChildren; i++) {
   	    FObj fo = (FObj) children.elementAt(i);