pbwest      2004/05/04 00:46:45

  Modified:    src/java/org/apache/fop/area Tag: FOP_0-20-0_Alt-Design
                        RegionStartVport.java RegionEndVport.java
                        RegionStartRefArea.java RegionBeforeVport.java
                        Page.java RegionAfterVport.java
                        RegionBodyVport.java PageRefArea.java
                        PageViewport.java RegionBodyRefArea.java
                        RegionEndRefArea.java RegionAfterRefArea.java
                        RegionBeforeRefArea.java
  Log:
  Completed preparations for null page construction
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.4   +9 -17     xml-fop/src/java/org/apache/fop/area/Attic/RegionStartVport.java
  
  Index: RegionStartVport.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/area/Attic/RegionStartVport.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- RegionStartVport.java     4 May 2004 04:42:40 -0000       1.1.2.3
  +++ RegionStartVport.java     4 May 2004 07:46:45 -0000       1.1.2.4
  @@ -22,7 +22,6 @@
   import java.awt.geom.Rectangle2D;
   
   import org.apache.fop.datastructs.Node;
  -import org.apache.fop.fo.FONode;
   import org.apache.fop.fo.flow.FoPageSequence;
   
   /**
  @@ -34,35 +33,31 @@
       /**
        * Creates a new region-start area with no defined rectangular area
        * @param pageSeq the generating <code>page-sequence</code>
  -     * @param generatedBy the node which generated this reference area; in this
  -     * case, the <code>page-sequence</code>
        * @param parent the page-reference-area
        * @param sync
        */
       public RegionStartVport(
               FoPageSequence pageSeq,
  -            FONode generatedBy,
               Node parent,
               Object sync) {
  -        super(pageSeq, generatedBy, parent, sync);
  +        // the page-sequence is the generated-by node
  +        super(pageSeq, pageSeq, parent, sync);
       }
   
       /**
        * Creates a new region-start area with the defined rectangular area
        * @param area the rectangular area
        * @param pageSeq the generating <code>page-sequence</code>
  -     * @param generatedBy the node which generated this reference area; in this
  -     * case, the <code>page-sequence</code>
        * @param parent the page-reference-area
        * @param sync
        */
       public RegionStartVport(
               Rectangle2D area,
               FoPageSequence pageSeq,
  -            FONode generatedBy,
               Node parent,
               Object sync) {
  -        super(area, pageSeq, generatedBy, parent, sync);
  +        // the page-sequence is the generated-by node
  +        super(area, pageSeq, pageSeq, parent, sync);
       }
   
       /**
  @@ -70,19 +65,16 @@
        * rectangular area.
        * <b>N.B.</b> this is a <code>static</code> method.
        * @param pageSeq the <code>page-sequence</code> to which this area belongs
  -     * @param generatedBy the node which generated this reference area; in this
  -     * case, the <code>page-sequence</code>
        * @param parent the <code>region-body-viewport-area</code>
        * @param sync
        * @return the created reference area
        */
       public static RegionStartVport nullRegionStartVport(
  -            FoPageSequence pageSeq, FONode generatedBy,
  -            Node parent, Object sync) {
  +            FoPageSequence pageSeq, Node parent, Object sync) {
           RegionStartVport vport =
  -            new RegionStartVport(pageSeq, generatedBy, parent, sync);
  +            new RegionStartVport(pageSeq, parent, sync);
           vport.setRegion(RegionStartRefArea.nullRegionStartRef(
  -                pageSeq, generatedBy, vport, sync));
  +                pageSeq, vport, sync));
           return vport;
       }
   
  
  
  
  1.1.2.4   +9 -17     xml-fop/src/java/org/apache/fop/area/Attic/RegionEndVport.java
  
  Index: RegionEndVport.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/Attic/RegionEndVport.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- RegionEndVport.java       4 May 2004 04:42:40 -0000       1.1.2.3
  +++ RegionEndVport.java       4 May 2004 07:46:45 -0000       1.1.2.4
  @@ -22,7 +22,6 @@
   import java.awt.geom.Rectangle2D;
   
   import org.apache.fop.datastructs.Node;
  -import org.apache.fop.fo.FONode;
   import org.apache.fop.fo.flow.FoPageSequence;
   
   /**
  @@ -34,35 +33,31 @@
       /**
        * Creates a new region-end area with no defined rectangular area
        * @param pageSeq the generating <code>page-sequence</code>
  -     * @param generatedBy the node which generated this reference area; in this
  -     * case, the <code>page-sequence</code>
        * @param parent the page-reference-area
        * @param sync
        */
       public RegionEndVport(
               FoPageSequence pageSeq,
  -            FONode generatedBy,
               Node parent,
               Object sync) {
  -        super(pageSeq, generatedBy, parent, sync);
  +        // the page-sequence is the generated-by node
  +        super(pageSeq, pageSeq, parent, sync);
       }
   
       /**
        * Creates a new region-end area with the defined rectangular area
        * @param area the rectangular area
        * @param pageSeq the generating <code>page-sequence</code>
  -     * @param generatedBy the node which generated this reference area; in this
  -     * case, the <code>page-sequence</code>
        * @param parent the page-reference-area
        * @param sync
        */
       public RegionEndVport(
               Rectangle2D area,
               FoPageSequence pageSeq,
  -            FONode generatedBy,
               Node parent,
               Object sync) {
  -        super(area, pageSeq, generatedBy, parent, sync);
  +        // the page-sequence is the generated-by node
  +        super(area, pageSeq, pageSeq, parent, sync);
       }
   
       /**
  @@ -70,19 +65,16 @@
        * rectangular area.
        * <b>N.B.</b> this is a <code>static</code> method.
        * @param pageSeq the <code>page-sequence</code> to which this area belongs
  -     * @param generatedBy the node which generated this reference area; in this
  -     * case, the <code>page-sequence</code>
        * @param parent the <code>region-body-viewport-area</code>
        * @param sync
        * @return the created reference area
        */
       public static RegionEndVport nullRegionEndVport(
  -            FoPageSequence pageSeq, FONode generatedBy,
  -            Node parent, Object sync) {
  +            FoPageSequence pageSeq, Node parent, Object sync) {
           RegionEndVport vport =
  -            new RegionEndVport(pageSeq, generatedBy, parent, sync);
  +            new RegionEndVport(pageSeq, parent, sync);
           vport.setRegion(RegionEndRefArea.nullRegionEndRef(
  -                pageSeq, generatedBy, vport, sync));
  +                pageSeq, vport, sync));
           return vport;
       }
   
  
  
  
  1.1.2.4   +8 -16     
xml-fop/src/java/org/apache/fop/area/Attic/RegionStartRefArea.java
  
  Index: RegionStartRefArea.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/area/Attic/RegionStartRefArea.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- RegionStartRefArea.java   4 May 2004 04:42:40 -0000       1.1.2.3
  +++ RegionStartRefArea.java   4 May 2004 07:46:45 -0000       1.1.2.4
  @@ -22,7 +22,6 @@
   import java.awt.geom.Rectangle2D;
   
   import org.apache.fop.datastructs.Node;
  -import org.apache.fop.fo.FONode;
   import org.apache.fop.fo.flow.FoPageSequence;
   
   /**
  @@ -36,35 +35,31 @@
       /**
        * Creates a new region-start area with no defined rectangular area
        * @param pageSeq the generating <code>page-sequence</code>
  -     * @param generatedBy the node which generated this reference area; in this
  -     * case, the <code>page-sequence</code>
        * @param parent the page-reference-area
        * @param sync
        */
       public RegionStartRefArea(
               FoPageSequence pageSeq,
  -            FONode generatedBy,
               Node parent,
               Object sync) {
  -        super(pageSeq, generatedBy, parent, sync);
  +        // the page-sequence is the generated-by node
  +        super(pageSeq, pageSeq, parent, sync);
       }
   
       /**
        * Creates a new region-start area with the given rectangular area
        * @param area the rectangular area
        * @param pageSeq the generating <code>page-sequence</code>
  -     * @param generatedBy the node which generated this reference area; in this
  -     * case, the <code>page-sequence</code>
        * @param parent the page-reference-area
        * @param sync
        */
       public RegionStartRefArea(
               Rectangle2D area,
               FoPageSequence pageSeq,
  -            FONode generatedBy,
               Node parent,
               Object sync) {
  -        super(area, pageSeq, generatedBy, parent, sync);
  +        // the page-sequence is the generated-by node
  +        super(area, pageSeq, pageSeq, parent, sync);
       }
   
       /**
  @@ -72,17 +67,14 @@
        * rectangular area.
        * <b>N.B.</b> this is a <code>static</code> method.
        * @param pageSeq the <code>page-sequence</code> to which this area belongs
  -     * @param generatedBy the node which generated this reference area; in this
  -     * case, the <code>page-sequence</code>
        * @param parent the <code>region-body-viewport-area</code>
        * @param sync
        * @return the created reference area
        */
       public static RegionStartRefArea nullRegionStartRef(
  -            FoPageSequence pageSeq, FONode generatedBy,
  -            Node parent, Object sync) {
  +            FoPageSequence pageSeq, Node parent, Object sync) {
           RegionStartRefArea startRef =
  -            new RegionStartRefArea(pageSeq, generatedBy, parent, sync);
  +            new RegionStartRefArea(pageSeq, parent, sync);
           return startRef;
       }
   
  
  
  
  1.1.2.4   +9 -17     
xml-fop/src/java/org/apache/fop/area/Attic/RegionBeforeVport.java
  
  Index: RegionBeforeVport.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/area/Attic/RegionBeforeVport.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- RegionBeforeVport.java    4 May 2004 04:42:40 -0000       1.1.2.3
  +++ RegionBeforeVport.java    4 May 2004 07:46:45 -0000       1.1.2.4
  @@ -22,7 +22,6 @@
   import java.awt.geom.Rectangle2D;
   
   import org.apache.fop.datastructs.Node;
  -import org.apache.fop.fo.FONode;
   import org.apache.fop.fo.flow.FoPageSequence;
   
   /**
  @@ -34,35 +33,31 @@
       /**
        * Creates a new region-before area with no defined rectangular area
        * @param pageSeq the generating <code>page-sequence</code>
  -     * @param generatedBy the node which generated this reference area; in this
  -     * case, the <code>page-sequence</code>
        * @param parent the page-reference-area
        * @param sync
        */
       public RegionBeforeVport(
               FoPageSequence pageSeq,
  -            FONode generatedBy,
               Node parent,
               Object sync) {
  -        super(pageSeq, generatedBy, parent, sync);
  +        // the page-sequence is the generated-by node
  +        super(pageSeq, pageSeq, parent, sync);
       }
   
       /**
        * Creates a new region-before area with the defined rectangular area
        * @param area the rectangular area
        * @param pageSeq the generating <code>page-sequence</code>
  -     * @param generatedBy the node which generated this reference area; in this
  -     * case, the <code>page-sequence</code>
        * @param parent the page-reference-area
        * @param sync
        */
       public RegionBeforeVport(
               Rectangle2D area,
               FoPageSequence pageSeq,
  -            FONode generatedBy,
               Node parent,
               Object sync) {
  -        super(area, pageSeq, generatedBy, parent, sync);
  +        // the page-sequence is the generated-by node
  +        super(area, pageSeq, pageSeq, parent, sync);
       }
   
       /**
  @@ -70,19 +65,16 @@
        * rectangular area.
        * <b>N.B.</b> this is a <code>static</code> method.
        * @param pageSeq the <code>page-sequence</code> to which this area belongs
  -     * @param generatedBy the node which generated this reference area; in this
  -     * case, the <code>page-sequence</code>
        * @param parent the <code>region-body-viewport-area</code>
        * @param sync
        * @return the created reference area
        */
       public static RegionBeforeVport nullRegionBeforeVport(
  -            FoPageSequence pageSeq, FONode generatedBy,
  -            Node parent, Object sync) {
  +            FoPageSequence pageSeq, Node parent, Object sync) {
           RegionBeforeVport vport =
  -            new RegionBeforeVport(pageSeq, generatedBy, parent, sync);
  +            new RegionBeforeVport(pageSeq, parent, sync);
           vport.setRegion(RegionBeforeRefArea.nullRegionBeforeRef(
  -                pageSeq, generatedBy, vport, sync));
  +                pageSeq, vport, sync));
           return vport;
       }
   
  
  
  
  1.4.2.4   +57 -42    xml-fop/src/java/org/apache/fop/area/Page.java
  
  Index: Page.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/Page.java,v
  retrieving revision 1.4.2.3
  retrieving revision 1.4.2.4
  diff -u -r1.4.2.3 -r1.4.2.4
  --- Page.java 2 May 2004 19:24:53 -0000       1.4.2.3
  +++ Page.java 4 May 2004 07:46:45 -0000       1.4.2.4
  @@ -26,7 +26,6 @@
   import java.util.Map;
   
   import org.apache.fop.datastructs.Node;
  -import org.apache.fop.fo.FONode;
   import org.apache.fop.fo.flow.FoPageSequence;
   import org.apache.fop.fo.pagination.FoSimplePageMaster;
   import org.apache.fop.fo.properties.RetrievePosition;
  @@ -48,9 +47,9 @@
        */
       public Page(
               FoPageSequence pageSeq,
  -            FONode generatedBy,
               long pageId) {
  -        super(pageSeq, generatedBy);
  +        // the page-sequence is the generated-by node
  +        super(pageSeq, pageSeq);
           this.pageId = pageId;
       }
   
  @@ -62,14 +61,35 @@
        */
       public Page(
               FoPageSequence pageSeq,
  -            FONode generatedBy,
               long pageId,
               Node parent,
               Object sync) {
  -        super(pageSeq, generatedBy, parent, sync);
  +        // the page-sequence is the generated-by node
  +        super(pageSeq, pageSeq, parent, sync);
           this.pageId = pageId;
       }
   
  +    /** Unique ID for this page.  0 is an invalid ID.  */
  +    private long pageId = 0;
  +
  +    /**
  +     * @return the pageId
  +     */
  +    public long getPageId() {
  +        synchronized (sync) {
  +            return pageId;
  +        }
  +    }
  +
  +    /**
  +     * @param pageId to set
  +     */
  +    public void setPageId(long pageId) {
  +        synchronized (sync) {
  +            this.pageId = pageId;
  +        }
  +    }
  +
       /**
        * Creates a null page, consisting of
        * <ul>
  @@ -96,52 +116,30 @@
        * </ul>
        * 
        */
  -    public void setupNullPage() {
  -        
  +    public static Page setupNullPage(FoPageSequence pageSeq, long id) {
  +        Page page = new Page(pageSeq, id);
  +        page.setVport(PageViewport.nullPageVport(pageSeq, page, page));
  +        return page;
       }
  -
       /** The <code>simple-page-master</code> that generated this page. */
  -    protected FoSimplePageMaster pageMaster = null; 
  -    /** Unique ID for this page.  0 is an invalid ID.  */
  -    private long pageId = 0;
  -    /** The formatted page number */
  -    private String pageNumber = null;
  -
  -    // list of id references and the rectangle on the page
  -    private Map idReferences = null;
  -
  -    // this keeps a list of currently unresolved areas or extensions
  -    // once the thing is resolved it is removed
  -    // when this is empty the page can be rendered
  -    private Map unresolved = null;
  -
  -    private Map pendingResolved = null;
  -
  -    // hashmap of markers for this page
  -    // start and end are added by the fo that contains the markers
  -    private Map markerFirstStart = null;
  -    private Map markerLastStart = null;
  -    private Map markerFirstAny = null;
  -    private Map markerLastEnd = null;
  -    private Map markerLastAny = null;
  +    protected FoSimplePageMaster pageMaster = null;
  +    /** The single <code>page-viewport</code> child of this page */
  +    protected PageViewport vport = null;
   
       /**
  -     * @return the pageId
  +     * @return the vport
        */
  -    public long getPageId() {
  -        synchronized (sync) {
  -            return pageId;
  -        }
  +    public PageViewport getVport() {
  +        return vport;
       }
  -
       /**
  -     * @param pageId to set
  +     * @param vport to set
        */
  -    public void setPageId(long pageId) {
  -        synchronized (sync) {
  -            this.pageId = pageId;
  -        }
  +    public void setVport(PageViewport vport) {
  +        this.vport = vport;
       }
  +    /** The formatted page number */
  +    private String pageNumber = null;
   
       /**
        * Set the page number for this page.
  @@ -163,6 +161,16 @@
           }
       }
   
  +    // list of id references and the rectangle on the page
  +    private Map idReferences = null;
  +
  +    // this keeps a list of currently unresolved areas or extensions
  +    // once the thing is resolved it is removed
  +    // when this is empty the page can be rendered
  +    private Map unresolved = null;
  +
  +    private Map pendingResolved = null;
  +
       /**
        * Add an unresolved id to this page.
        * All unresolved ids for the contents of this page are
  @@ -195,6 +203,13 @@
           }
       }
   
  +    // hashmap of markers for this page
  +    // start and end are added by the fo that contains the markers
  +    private Map markerFirstStart = null;
  +    private Map markerLastStart = null;
  +    private Map markerFirstAny = null;
  +    private Map markerLastEnd = null;
  +    private Map markerLastAny = null;
   
       /**
        * Add the markers for this page.
  
  
  
  1.1.2.4   +8 -17     xml-fop/src/java/org/apache/fop/area/Attic/RegionAfterVport.java
  
  Index: RegionAfterVport.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/area/Attic/RegionAfterVport.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- RegionAfterVport.java     4 May 2004 04:42:40 -0000       1.1.2.3
  +++ RegionAfterVport.java     4 May 2004 07:46:45 -0000       1.1.2.4
  @@ -22,7 +22,6 @@
   import java.awt.geom.Rectangle2D;
   
   import org.apache.fop.datastructs.Node;
  -import org.apache.fop.fo.FONode;
   import org.apache.fop.fo.flow.FoPageSequence;
   
   /**
  @@ -34,35 +33,30 @@
       /**
        * Creates a new region-after area with no defined rectangular area
        * @param pageSeq the generating <code>page-sequence</code>
  -     * @param generatedBy the node which generated this reference area; in this
  -     * case, the <code>page-sequence</code>
        * @param parent the page-reference-area
        * @param sync
        */
       public RegionAfterVport(
               FoPageSequence pageSeq,
  -            FONode generatedBy,
               Node parent,
               Object sync) {
  -        super(pageSeq, generatedBy, parent, sync);
  +        // the page-sequence is the generated-by node
  +        super(pageSeq, pageSeq, parent, sync);
       }
   
       /**
        * Creates a new region-after area with the defined rectangular area
        * @param area the rectangular area
        * @param pageSeq the generating <code>page-sequence</code>
  -     * @param generatedBy the node which generated this reference area; in this
  -     * case, the <code>page-sequence</code>
        * @param parent the page-reference-area
        * @param sync
        */
       public RegionAfterVport(
               Rectangle2D area,
               FoPageSequence pageSeq,
  -            FONode generatedBy,
               Node parent,
               Object sync) {
  -        super(area, pageSeq, generatedBy, parent, sync);
  +        super(area, pageSeq, pageSeq, parent, sync);
       }
   
       /**
  @@ -70,19 +64,16 @@
        * rectangular area.
        * <b>N.B.</b> this is a <code>static</code> method.
        * @param pageSeq the <code>page-sequence</code> to which this area belongs
  -     * @param generatedBy the node which generated this reference area; in this
  -     * case, the <code>page-sequence</code>
        * @param parent the <code>region-body-viewport-area</code>
        * @param sync
        * @return the created reference area
        */
       public static RegionAfterVport nullRegionAfterVport(
  -            FoPageSequence pageSeq, FONode generatedBy,
  -            Node parent, Object sync) {
  +            FoPageSequence pageSeq, Node parent, Object sync) {
           RegionAfterVport vport =
  -            new RegionAfterVport(pageSeq, generatedBy, parent, sync);
  +            new RegionAfterVport(pageSeq, parent, sync);
           vport.setRegion(RegionAfterRefArea.nullRegionAfterRef(
  -                pageSeq, generatedBy, vport, sync));
  +                pageSeq, vport, sync));
           return vport;
       }
   
  
  
  
  1.1.2.5   +9 -17     xml-fop/src/java/org/apache/fop/area/Attic/RegionBodyVport.java
  
  Index: RegionBodyVport.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/Attic/RegionBodyVport.java,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- RegionBodyVport.java      4 May 2004 04:42:40 -0000       1.1.2.4
  +++ RegionBodyVport.java      4 May 2004 07:46:45 -0000       1.1.2.5
  @@ -22,7 +22,6 @@
   import java.awt.geom.Rectangle2D;
   
   import org.apache.fop.datastructs.Node;
  -import org.apache.fop.fo.FONode;
   import org.apache.fop.fo.flow.FoPageSequence;
   
   /**
  @@ -36,54 +35,47 @@
        * area
        * @param area the rectangular area
        * @param pageSeq the generating <code>page-sequence</code>
  -     * @param generatedBy
        * @param parent
        * @param sync
        */
       public RegionBodyVport(
               Rectangle2D area,
               FoPageSequence pageSeq,
  -            FONode generatedBy,
               Node parent,
               Object sync) {
  -        super(area, pageSeq, generatedBy, parent, sync);
  +        // the page-sequence is the generated-by node
  +        super(area, pageSeq, pageSeq, parent, sync);
       }
   
       /**
        * Creates a <code>region-body-viewport</code> with no rectangular area
        * @param pageSeq the generating <code>page-sequence</code>
  -     * @param generatedBy
        * @param parent
        * @param sync
        */
       public RegionBodyVport(
               FoPageSequence pageSeq,
  -            FONode generatedBy,
               Node parent,
               Object sync) {
  -        super(pageSeq, generatedBy, parent, sync);
  +        // the page-sequence is the generated-by node
  +        super(pageSeq, pageSeq, parent, sync);
       }
   
       /**
  -
  -    /**
        * Creates and returns a <code>RegionBodyVport</code> with no rectangular
        * area. The area created references a null <code>RegionBodyRefArea</code>.
        * <b>N.B.</b> this is a <code>static</code> method.
        * @param pageSeq the <code>page-sequence</code> to which this area belongs
  -     * @param generatedBy the node which generated this reference area; in this
  -     * case, the <code>page-sequence</code>
        * @param parent the <code>page-reference-area</code>
        * @param sync
        * @return the created reference area
        */
       public static RegionBodyVport nullRegionBodyVport(
  -            FoPageSequence pageSeq, FONode generatedBy,
  -            Node parent, Object sync) {
  +            FoPageSequence pageSeq, Node parent, Object sync) {
           RegionBodyVport vport =
  -            new RegionBodyVport(pageSeq, generatedBy, parent, sync);
  +            new RegionBodyVport(pageSeq, parent, sync);
           vport.setRegion(RegionBodyRefArea.nullRegionBodyRef(
  -                pageSeq, generatedBy, vport, sync));
  +                pageSeq, vport, sync));
           return vport;
       }
   }
  
  
  
  1.1.2.4   +39 -5     xml-fop/src/java/org/apache/fop/area/Attic/PageRefArea.java
  
  Index: PageRefArea.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/Attic/PageRefArea.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- PageRefArea.java  16 Apr 2004 05:15:16 -0000      1.1.2.3
  +++ PageRefArea.java  4 May 2004 07:46:45 -0000       1.1.2.4
  @@ -21,7 +21,6 @@
   //import java.util.Map;
   
   import org.apache.fop.datastructs.Node;
  -import org.apache.fop.fo.FONode;
   import org.apache.fop.fo.flow.FoPageSequence;
   
   /**
  @@ -44,12 +43,47 @@
   //    // temporary map of unresolved objects used when serializing the page
   //    private Map unresolved = null;
       
  +    /**
  +     * Create a <code>page-reference-area</code> with a null rectangular area
  +     * and <code>region-reference-area</code>s. 
  +     * @param pageSeq
  +     * @param parent
  +     * @param sync
  +     */
       public PageRefArea(
               FoPageSequence pageSeq,
  -            FONode generatedBy,
               Node parent,
               Object sync) {
  -        super(pageSeq, generatedBy, parent, sync);
  +        // the page-sequence is the generated-by node
  +        super(pageSeq, pageSeq, parent, sync);
  +    }
  +
  +    /**
  +     * Creates and returns a <code>PageRefArea</code> with no rectangular
  +     * area. The area created references null region viewports for
  +     * <code>region-body, region-before, region-after, region-start</code> and
  +     * <code>region-end</code>.
  +     * <b>N.B.</b> this is a <code>static</code> method.
  +     * @param pageSeq the <code>page-sequence</code> to which this area belongs
  +     * @param parent the <code>page-viewport-area</code>
  +     * @param sync
  +     * @return the created reference area
  +     */
  +    public static PageRefArea nullPageRef(
  +            FoPageSequence pageSeq, Node parent, Object sync) {
  +        PageRefArea pageRef =
  +            new PageRefArea(pageSeq, parent, sync);
  +        pageRef.setRegionBody(RegionBodyVport.nullRegionBodyVport(
  +                pageSeq, pageRef, sync));
  +        pageRef.setRegionBefore(RegionBeforeVport.nullRegionBeforeVport(
  +                pageSeq, pageRef, sync));
  +        pageRef.setRegionAfter(RegionAfterVport.nullRegionAfterVport(
  +                pageSeq, pageRef, sync));
  +        pageRef.setRegionStart(RegionStartVport.nullRegionStartVport(
  +                pageSeq, pageRef, sync));
  +        pageRef.setRegionEnd(RegionEndVport.nullRegionEndVport(
  +                pageSeq, pageRef, sync));
  +        return pageRef;
       }
   
   //    /**
  
  
  
  1.2.2.6   +40 -30    xml-fop/src/java/org/apache/fop/area/PageViewport.java
  
  Index: PageViewport.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/PageViewport.java,v
  retrieving revision 1.2.2.5
  retrieving revision 1.2.2.6
  diff -u -r1.2.2.5 -r1.2.2.6
  --- PageViewport.java 2 May 2004 05:57:50 -0000       1.2.2.5
  +++ PageViewport.java 4 May 2004 07:46:45 -0000       1.2.2.6
  @@ -20,7 +20,6 @@
   import java.awt.geom.Rectangle2D;
   
   import org.apache.fop.datastructs.Node;
  -import org.apache.fop.fo.FONode;
   import org.apache.fop.fo.flow.FoPageSequence;
   
   /**
  @@ -37,56 +36,67 @@
   implements Viewport {
   
       /**
  -     * Create a page viewport at the root of a tree, synchronized on itself,
  -     * with a given page reference area and viewport dimensions
  -     * @param pageId
  -     * @param p the page reference area for the contents of this page
  -     * @param bounds the dimensions of the viewport
  +     * Creates a page viewport at the root of a tree, synchronized on itself,
  +     * with a null page reference area and rectangular area
  +     * @param pageSeq the page-sequence which generated this area
  +     * the page-sequence
        */
       public PageViewport(
  -            FoPageSequence pageSeq,
  -            FONode generatedBy,
  -            long pageId,
  -            Rectangle2D bounds,
  -            PageRefArea p) {
  -        super(bounds, pageSeq, generatedBy);
  -        refArea = p;
  +            FoPageSequence pageSeq) {
  +        // The pageSeq is also the generating node
  +        super(pageSeq, pageSeq);
       }
   
       /**
  -     * Create a page viewport.
  -     * @param parent node of this viewport
  -     * @param sync object on which the Area is synchronized
  -     * @param pageId the unique identifier of this page
  -     * @param p the page reference area for the contents of this page
  -     * @param bounds the dimensions of the viewport
  +     * Creates a page viewport, with a null page reference area and the given
  +     * rectangular area
  +     * @param area the rectangular area
  +     * @param pageSeq the page-sequence which generated this area
  +     * @param parent
  +     * @param sync
        */
       public PageViewport(
  +            Rectangle2D area,
               FoPageSequence pageSeq,
  -            FONode generatedBy,
  -            long pageId,
  -            Rectangle2D bounds,
  -            PageRefArea p,
               Node parent,
               Object sync) {
  -        super(bounds, pageSeq, generatedBy, parent, sync);
  -        refArea = p;
  +        // The pageSeq is also the generating node
  +        super(area, pageSeq, pageSeq, parent, sync);
       }
   
       /**
  -     * Create a page viewport with a given parent node, sync object and ID
  +     * Creates a page viewport with a null page ref area and rectangular area,
  +     * and the given parent node and sync object
  +     * @param pageSeq the page-sequence which generated this viewport. This is
  +     * also the generated-by node
        * @param parent
        * @param sync
  -     * @param pageId
        */
       public PageViewport(
               FoPageSequence pageSeq,
  -            FONode generatedBy,
  -            long pageId,
               Node parent,
               Object sync) {
  -        super(pageSeq, generatedBy, parent, sync);
  +        // The pageSeq is also the generating node
  +        super(pageSeq, pageSeq, parent, sync);
           refArea = null;
  +    }
  +
  +    /**
  +     * Creates and returns a <code>PageViewport</code> with no rectangular
  +     * area. The area created references a null <code>PageRefArea</code>.
  +     * <b>N.B.</b> this is a <code>static</code> method.
  +     * @param pageSeq the <code>page-sequence</code> to which this area belongs
  +     * @param parent the <code>Page</code> object
  +     * @param sync
  +     * @return the created viewport area
  +     */
  +    public static PageViewport nullPageVport(
  +            FoPageSequence pageSeq, Node parent, Object sync) {
  +        PageViewport vport =
  +            new PageViewport(pageSeq, parent, sync);
  +        vport.setReferenceArea(PageRefArea.nullPageRef(
  +                pageSeq, vport, sync));
  +        return vport;
       }
       
       /**
  
  
  
  1.1.2.6   +8 -16     
xml-fop/src/java/org/apache/fop/area/Attic/RegionBodyRefArea.java
  
  Index: RegionBodyRefArea.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/area/Attic/RegionBodyRefArea.java,v
  retrieving revision 1.1.2.5
  retrieving revision 1.1.2.6
  diff -u -r1.1.2.5 -r1.1.2.6
  --- RegionBodyRefArea.java    4 May 2004 04:42:40 -0000       1.1.2.5
  +++ RegionBodyRefArea.java    4 May 2004 07:46:45 -0000       1.1.2.6
  @@ -20,7 +20,6 @@
   import java.awt.geom.Rectangle2D;
   
   import org.apache.fop.datastructs.Node;
  -import org.apache.fop.fo.FONode;
   import org.apache.fop.fo.flow.FoPageSequence;
   
   /**
  @@ -42,17 +41,15 @@
        * default column count and gap
        * This sets the region reference area class to BODY.
        * @param pageSeq the generating <code>page-sequence</code>
  -     * @param generatedBy the node which generated this reference area; in this
  -     * case, the <code>page-sequence</code>
        * @param parent the page-reference-area
        * @param sync
        */
       public RegionBodyRefArea(
               FoPageSequence pageSeq,
  -            FONode generatedBy,
               Node parent,
               Object sync) {
  -        super(pageSeq, generatedBy, parent, sync);
  +        // the page-sequence is the generated-by node
  +        super(pageSeq, pageSeq, parent, sync);
       }
   
       /**
  @@ -63,8 +60,6 @@
        * @param columnGap
        * @param area the rectangular area
        * @param pageSeq the generating <code>page-sequence</code>
  -     * @param generatedBy the node which generated this reference area; in this
  -     * case, the <code>page-sequence</code>
        * @param parent the page-reference-area
        * @param sync
        */
  @@ -73,10 +68,10 @@
               int columnGap,
               Rectangle2D area,
               FoPageSequence pageSeq,
  -            FONode generatedBy,
               Node parent,
               Object sync) {
  -        super(area, pageSeq, generatedBy, parent, sync);
  +        // the page-sequence is the generated-by node
  +        super(area, pageSeq, pageSeq, parent, sync);
           this.columnCount = columnCount;
           this.columnGap = columnGap;
       }
  @@ -86,19 +81,16 @@
        * area. The area created references a null <code>MainReferenceArea</code>.
        * <b>N.B.</b> this is a <code>static</code> method.
        * @param pageSeq the <code>page-sequence</code> to which this area belongs
  -     * @param generatedBy the node which generated this reference area; in this
  -     * case, the <code>page-sequence</code>
        * @param parent the <code>region-body-viewport-area</code>
        * @param sync
        * @return the created reference area
        */
       public static RegionBodyRefArea nullRegionBodyRef(
  -            FoPageSequence pageSeq, FONode generatedBy,
  -            Node parent, Object sync) {
  +            FoPageSequence pageSeq, Node parent, Object sync) {
           RegionBodyRefArea bodyRef =
  -            new RegionBodyRefArea(pageSeq, generatedBy, parent, sync);
  +            new RegionBodyRefArea(pageSeq, parent, sync);
           bodyRef.setMainReference(MainReferenceArea.nullMainRefArea(
  -                pageSeq, generatedBy, bodyRef, sync));
  +                pageSeq, pageSeq, bodyRef, sync));
           return bodyRef;
       }
       /**
  
  
  
  1.1.2.4   +8 -16     xml-fop/src/java/org/apache/fop/area/Attic/RegionEndRefArea.java
  
  Index: RegionEndRefArea.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/area/Attic/RegionEndRefArea.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- RegionEndRefArea.java     4 May 2004 04:42:40 -0000       1.1.2.3
  +++ RegionEndRefArea.java     4 May 2004 07:46:45 -0000       1.1.2.4
  @@ -22,7 +22,6 @@
   import java.awt.geom.Rectangle2D;
   
   import org.apache.fop.datastructs.Node;
  -import org.apache.fop.fo.FONode;
   import org.apache.fop.fo.flow.FoPageSequence;
   
   /**
  @@ -36,35 +35,31 @@
       /**
        * Creates a new region-end area with no defined rectangular area
        * @param pageSeq the generating <code>page-sequence</code>
  -     * @param generatedBy the node which generated this reference area; in this
  -     * case, the <code>page-sequence</code>
        * @param parent the page-reference-area
        * @param sync
        */
       public RegionEndRefArea(
               FoPageSequence pageSeq,
  -            FONode generatedBy,
               Node parent,
               Object sync) {
  -        super(pageSeq, generatedBy, parent, sync);
  +        // the page-sequence is the generated-by node
  +        super(pageSeq, pageSeq, parent, sync);
       }
   
       /**
        * Creates a new region-end area with the given rectangular area
        * @param area the rectangular area
        * @param pageSeq the generating <code>page-sequence</code>
  -     * @param generatedBy the node which generated this reference area; in this
  -     * case, the <code>page-sequence</code>
        * @param parent the page-reference-area
        * @param sync
        */
       public RegionEndRefArea(
               Rectangle2D area,
               FoPageSequence pageSeq,
  -            FONode generatedBy,
               Node parent,
               Object sync) {
  -        super(area, pageSeq, generatedBy, parent, sync);
  +        // the page-sequence is the generated-by node
  +        super(area, pageSeq, pageSeq, parent, sync);
       }
   
       /**
  @@ -72,17 +67,14 @@
        * rectangular area.
        * <b>N.B.</b> this is a <code>static</code> method.
        * @param pageSeq the <code>page-sequence</code> to which this area belongs
  -     * @param generatedBy the node which generated this reference area; in this
  -     * case, the <code>page-sequence</code>
        * @param parent the <code>region-body-viewport-area</code>
        * @param sync
        * @return the created reference area
        */
       public static RegionEndRefArea nullRegionEndRef(
  -            FoPageSequence pageSeq, FONode generatedBy,
  -            Node parent, Object sync) {
  +            FoPageSequence pageSeq, Node parent, Object sync) {
           RegionEndRefArea endRef =
  -            new RegionEndRefArea(pageSeq, generatedBy, parent, sync);
  +            new RegionEndRefArea(pageSeq, parent, sync);
           return endRef;
       }
   
  
  
  
  1.1.2.4   +8 -16     
xml-fop/src/java/org/apache/fop/area/Attic/RegionAfterRefArea.java
  
  Index: RegionAfterRefArea.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/area/Attic/RegionAfterRefArea.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- RegionAfterRefArea.java   4 May 2004 04:42:40 -0000       1.1.2.3
  +++ RegionAfterRefArea.java   4 May 2004 07:46:45 -0000       1.1.2.4
  @@ -22,7 +22,6 @@
   import java.awt.geom.Rectangle2D;
   
   import org.apache.fop.datastructs.Node;
  -import org.apache.fop.fo.FONode;
   import org.apache.fop.fo.flow.FoPageSequence;
   
   /**
  @@ -36,35 +35,31 @@
       /**
        * Creates a new region-after area with no defined rectangular area
        * @param pageSeq the generating <code>page-sequence</code>
  -     * @param generatedBy the node which generated this reference area; in this
  -     * case, the <code>page-sequence</code>
        * @param parent the page-reference-area
        * @param sync
        */
       public RegionAfterRefArea(
               FoPageSequence pageSeq,
  -            FONode generatedBy,
               Node parent,
               Object sync) {
  -        super(pageSeq, generatedBy, parent, sync);
  +        // the page-sequence is the generated-by node
  +        super(pageSeq, pageSeq, parent, sync);
       }
   
       /**
        * Creates a new region-after area with the given rectangular area
        * @param area the rectangular area
        * @param pageSeq the generating <code>page-sequence</code>
  -     * @param generatedBy the node which generated this reference area; in this
  -     * case, the <code>page-sequence</code>
        * @param parent the page-reference-area
        * @param sync
        */
       public RegionAfterRefArea(
               Rectangle2D area,
               FoPageSequence pageSeq,
  -            FONode generatedBy,
               Node parent,
               Object sync) {
  -        super(area, pageSeq, generatedBy, parent, sync);
  +        // the page-sequence is the generated-by node
  +        super(area, pageSeq, pageSeq, parent, sync);
       }
   
       /**
  @@ -72,17 +67,14 @@
        * rectangular area.
        * <b>N.B.</b> this is a <code>static</code> method.
        * @param pageSeq the <code>page-sequence</code> to which this area belongs
  -     * @param generatedBy the node which generated this reference area; in this
  -     * case, the <code>page-sequence</code>
        * @param parent the <code>region-body-viewport-area</code>
        * @param sync
        * @return the created reference area
        */
       public static RegionAfterRefArea nullRegionAfterRef(
  -            FoPageSequence pageSeq, FONode generatedBy,
  -            Node parent, Object sync) {
  +            FoPageSequence pageSeq, Node parent, Object sync) {
           RegionAfterRefArea afterRef =
  -            new RegionAfterRefArea(pageSeq, generatedBy, parent, sync);
  +            new RegionAfterRefArea(pageSeq, parent, sync);
           return afterRef;
       }
   
  
  
  
  1.1.2.4   +8 -16     
xml-fop/src/java/org/apache/fop/area/Attic/RegionBeforeRefArea.java
  
  Index: RegionBeforeRefArea.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/area/Attic/RegionBeforeRefArea.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- RegionBeforeRefArea.java  4 May 2004 04:42:40 -0000       1.1.2.3
  +++ RegionBeforeRefArea.java  4 May 2004 07:46:45 -0000       1.1.2.4
  @@ -22,7 +22,6 @@
   import java.awt.geom.Rectangle2D;
   
   import org.apache.fop.datastructs.Node;
  -import org.apache.fop.fo.FONode;
   import org.apache.fop.fo.flow.FoPageSequence;
   
   /**
  @@ -36,35 +35,31 @@
       /**
        * Creates a new region-before area with no defined rectangular area
        * @param pageSeq the generating <code>page-sequence</code>
  -     * @param generatedBy the node which generated this reference area; in this
  -     * case, the <code>page-sequence</code>
        * @param parent the page-reference-area
        * @param sync
        */
       public RegionBeforeRefArea(
               FoPageSequence pageSeq,
  -            FONode generatedBy,
               Node parent,
               Object sync) {
  -        super(pageSeq, generatedBy, parent, sync);
  +        // the page-sequence is the generated-by node
  +        super(pageSeq, pageSeq, parent, sync);
       }
   
       /**
        * Creates a new region-before area with the given rectangular area
        * @param area the rectangular area
        * @param pageSeq the generating <code>page-sequence</code>
  -     * @param generatedBy the node which generated this reference area; in this
  -     * case, the <code>page-sequence</code>
        * @param parent the page-reference-area
        * @param sync
        */
       public RegionBeforeRefArea(
               Rectangle2D area,
               FoPageSequence pageSeq,
  -            FONode generatedBy,
               Node parent,
               Object sync) {
  -        super(area, pageSeq, generatedBy, parent, sync);
  +        // the page-sequence is the generated-by node
  +        super(area, pageSeq, pageSeq, parent, sync);
       }
   
       /**
  @@ -72,17 +67,14 @@
        * rectangular area.
        * <b>N.B.</b> this is a <code>static</code> method.
        * @param pageSeq the <code>page-sequence</code> to which this area belongs
  -     * @param generatedBy the node which generated this reference area; in this
  -     * case, the <code>page-sequence</code>
        * @param parent the <code>region-body-viewport-area</code>
        * @param sync
        * @return the created reference area
        */
       public static RegionBeforeRefArea nullRegionBeforeRef(
  -            FoPageSequence pageSeq, FONode generatedBy,
  -            Node parent, Object sync) {
  +            FoPageSequence pageSeq, Node parent, Object sync) {
           RegionBeforeRefArea beforeRef =
  -            new RegionBeforeRefArea(pageSeq, generatedBy, parent, sync);
  +            new RegionBeforeRefArea(pageSeq, parent, sync);
           return beforeRef;
       }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to