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...@apache.org on 2001/07/16 12:45:43 UTC

cvs commit: xml-fop/src/org/apache/fop/layout Page.java Area.java

arved       01/07/16 03:45:43

  Modified:    src/org/apache/fop/layout Page.java Area.java
  Log:
  AHS: initial marker support
  
  Revision  Changes    Path
  1.13      +12 -1     xml-fop/src/org/apache/fop/layout/Page.java
  
  Index: Page.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/Page.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Page.java	2001/07/08 05:04:56	1.12
  +++ Page.java	2001/07/16 10:45:43	1.13
  @@ -1,4 +1,4 @@
  -/* $Id: Page.java,v 1.12 2001/07/08 05:04:56 arved Exp $
  +/* $Id: Page.java,v 1.13 2001/07/16 10:45:43 arved Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -38,10 +38,13 @@
   
       private Vector footnotes = null;
   
  +	private Vector markers = null;
  +	
       Page(AreaTree areaTree, int height, int width) {
   	this.areaTree = areaTree;
   	this.height = height;
   	this.width = width;
  +	markers = new Vector();
       }
   
       public void setNumber(int number) {
  @@ -172,4 +175,12 @@
           }
           footnotes.addElement(fb);
       }
  +	
  +	public void registerMarker(Marker marker) {
  +		markers.addElement(marker);
  +	}
  +	
  +	public Vector getMarkers() {
  +		return this.markers;
  +	}
   }
  
  
  
  1.21      +31 -3     xml-fop/src/org/apache/fop/layout/Area.java
  
  Index: Area.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/Area.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- Area.java	2001/07/13 02:31:14	1.20
  +++ Area.java	2001/07/16 10:45:43	1.21
  @@ -1,4 +1,4 @@
  -/* $Id: Area.java,v 1.20 2001/07/13 02:31:14 arved Exp $
  +/* $Id: Area.java,v 1.21 2001/07/16 10:45:43 arved Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -8,9 +8,11 @@
   
   // FOP
   import org.apache.fop.datatypes.*;
  +import org.apache.fop.fo.flow.Marker;
   
   // Java
   import java.util.Vector;
  +import java.util.Hashtable;
   
   abstract public class Area extends Box {
   
  @@ -46,12 +48,29 @@
   
       private IDReferences idReferences;
   
  +	protected Vector markers;
  +	
  +	// as defined in Section 6.1.1
  +	public org.apache.fop.fo.FObj generatedBy;	// corresponds to 'generated-by' trait
  +	protected Hashtable returnedBy;
  +	
  +	// as defined in Section 6.1.1
  +	protected String areaClass;
  +	
  +	// as defined in Section 4.2.2
  +	public boolean isFirst = false;
  +	public boolean isLast = false;
  +	
       /* author : Seshadri G
       ** the fo which created it */	
  +	// This is deprecated and should be phased out in
  +	// favour of using 'generatedBy'
       public org.apache.fop.fo.FObj foCreator;	
           
       public Area (FontState fontState) {
  -	setFontState(fontState);
  +		setFontState(fontState);
  +		this.markers = new Vector();
  +		this.returnedBy = new Hashtable();
       }
   
       /**
  @@ -64,10 +83,12 @@
        * for this Area (its allocation rectangle)
        */
       public Area (FontState fontState, int allocationWidth, int maxHeight) {
  -	setFontState(fontState);
  +		setFontState(fontState);
           this.allocationWidth = allocationWidth;
           this.contentRectangleWidth = allocationWidth;
           this.maxHeight = maxHeight;
  +		this.markers = new Vector();
  +		this.returnedBy = new Hashtable();
       }
   
     private void setFontState(FontState fontState) {
  @@ -340,4 +361,11 @@
       return bp;
     }
   
  +  public void addMarkers(Vector markers) {
  +	  markers.addAll(markers);
  +  }
  +  
  +  public void addLineagePair(org.apache.fop.fo.FObj fo, int areaPosition) {
  +	  returnedBy.put(fo, new Integer(areaPosition));
  +  }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org