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 je...@apache.org on 2005/04/05 17:39:46 UTC
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr AbstractBreaker.java
jeremias 2005/04/05 08:39:46
Modified: src/java/org/apache/fop/layoutmgr Tag:
Temp_KnuthStylePageBreaking AbstractBreaker.java
Log:
Consolidated blocklist logging
Revision Changes Path
No revision
No revision
1.1.2.4 +12 -49 xml-fop/src/java/org/apache/fop/layoutmgr/Attic/AbstractBreaker.java
Index: AbstractBreaker.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/Attic/AbstractBreaker.java,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -r1.1.2.3 -r1.1.2.4
--- AbstractBreaker.java 20 Mar 2005 12:46:11 -0000 1.1.2.3
+++ AbstractBreaker.java 5 Apr 2005 15:39:46 -0000 1.1.2.4
@@ -563,29 +563,25 @@
* Logs the contents of a block list for debugging purposes
* @param blockList block list to log
*/
- private void logBlocklist(BlockSequence blockList) {
+ private void logBlocklist(KnuthSequence blockList) {
ListIterator tempIter = blockList.listIterator();
KnuthElement temp;
System.out.println(" ");
while (tempIter.hasNext()) {
temp = (KnuthElement) tempIter.next();
- String segno = temp.isAuxiliary() ? "+ " : "- ";
if (temp.isBox()) {
- System.out.println(segno + tempIter.previousIndex()
- + ") <box> " + temp.getW());
+ System.out.println(tempIter.previousIndex()
+ + ") " + temp);
} else if (temp.isGlue()) {
- System.out.println(segno + tempIter.previousIndex()
- + ") <glue> " + temp.getW() + " + "
- + ((KnuthGlue) temp).getY() + " - "
- + ((KnuthGlue) temp).getZ());
+ System.out.println(tempIter.previousIndex()
+ + ") " + temp);
} else {
- System.out
- .println(segno
- + tempIter.previousIndex()
- + ") <"
- + (((KnuthPenalty) temp).getP() == KnuthElement.INFINITE ? "PENALTY"
- : "penalty") + "> " + temp.getW());
+ System.out.println(tempIter.previousIndex()
+ + ") " + temp);
+ }
+ if (temp.getPosition() != null) {
+ System.out.println(" " + temp.getPosition());
}
}
System.out.println(" ");
@@ -594,43 +590,10 @@
/**
* Logs the contents of an effective block list for debugging purposes
* @param effectiveList block list to log
- * @todo combine with logBlocklist()
*/
private void logEffectiveList(KnuthSequence effectiveList) {
- ListIterator tempIter;
- KnuthElement temp;
System.out.println("Effective list");
- System.out.println(" ");
- tempIter = effectiveList.listIterator();
- System.out.println(" ");
- while (tempIter.hasNext()) {
- temp = (KnuthElement) tempIter.next();
- String segno = temp.isAuxiliary() ? "+ " : "- ";
- if (temp.isBox()) {
- System.out.println(segno + tempIter.previousIndex()
- + ") <box> - - " + ((KnuthBox) temp).getW());
- } else if (temp.isGlue()) {
- System.out
- .println(segno
- + tempIter.previousIndex()
- + ") <glue> "
- + (((KnuthGlue) temp).getW() - ((KnuthGlue) temp)
- .getZ())
- + " - "
- + ((KnuthGlue) temp).getW()
- + " - "
- + (((KnuthGlue) temp).getW() + ((KnuthGlue) temp)
- .getY()));
- } else {
- System.out
- .println(segno
- + tempIter.previousIndex()
- + ") <"
- + (((KnuthPenalty) temp).getP() == KnuthElement.INFINITE ? "PENALTY"
- : "penalty") + "> ");
- }
- }
- System.out.println(" ");
+ logBlocklist(effectiveList);
}
private int adjustBlockSpaces(LinkedList spaceList, int difference, int total) {
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org