pbwest      2004/04/15 22:18:52

  Modified:    src/java/org/apache/fop/fo Tag: FOP_0-20-0_Alt-Design
                        FOTree.java
  Log:
  Added getNextPageId and getLogger methods
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.9   +22 -3     xml-fop/src/java/org/apache/fop/fo/Attic/FOTree.java
  
  Index: FOTree.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/Attic/FOTree.java,v
  retrieving revision 1.1.2.8
  retrieving revision 1.1.2.9
  diff -u -r1.1.2.8 -r1.1.2.9
  --- FOTree.java       8 Mar 2004 20:46:29 -0000       1.1.2.8
  +++ FOTree.java       16 Apr 2004 05:18:52 -0000      1.1.2.9
  @@ -43,6 +43,17 @@
       private static final String tag = "$Name$";
       private static final String revision = "$Revision$";
   
  +    /** Provides a monotonically increasing pageId */
  +    private long nextPageId = 0;
  +    /** Locking object for synchronizing <code>getNextPageId</code> method.
  +     * The value is irrelevant. */
  +    private Boolean lock = new Boolean(true);
  +    public long getNextPageId() {
  +        synchronized (lock) {
  +            return ++nextPageId;
  +        }
  +    }
  +
       /**
        * The buffer from which the <tt>XmlEvent</tt>s from the parser will
        * be read.  <tt>protected</tt> so that FONode can access it.
  @@ -165,6 +176,14 @@
               */
           }
           System.out.println("# of FONodes: " + nodecount);
  +    }
  +
  +    /**
  +     * Gets the <code>FOTree</code> logger
  +     * @return the logger
  +     */
  +    public Logger getLogger() {
  +        return log;
       }
   
   }// FOTree
  
  
  

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

Reply via email to