Browse Source

Added getNextPageId and getLogger methods


git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197514 13f79535-47bb-0310-9956-ffa450edef68
tags/Defoe_export
Peter Bernard West 20 years ago
parent
commit
d3173308a9
1 changed files with 19 additions and 0 deletions
  1. 19
    0
      src/java/org/apache/fop/fo/FOTree.java

+ 19
- 0
src/java/org/apache/fop/fo/FOTree.java View File

private static final String tag = "$Name$"; private static final String tag = "$Name$";
private static final String revision = "$Revision$"; 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 * The buffer from which the <tt>XmlEvent</tt>s from the parser will
* be read. <tt>protected</tt> so that FONode can access it. * be read. <tt>protected</tt> so that FONode can access it.
System.out.println("# of FONodes: " + nodecount); System.out.println("# of FONodes: " + nodecount);
} }


/**
* Gets the <code>FOTree</code> logger
* @return the logger
*/
public Logger getLogger() {
return log;
}

}// FOTree }// FOTree

Loading…
Cancel
Save