]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
toString() for easier debugging.
authorJeremias Maerki <jeremias@apache.org>
Fri, 7 Jan 2005 07:48:36 +0000 (07:48 +0000)
committerJeremias Maerki <jeremias@apache.org>
Fri, 7 Jan 2005 07:48:36 +0000 (07:48 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198245 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/layoutmgr/BreakPoss.java

index 96c30157449b1309ffb53f42ce73a7cc7c325faa..0ac769624b81562f9047c9dc48fdf3e9c3103587 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -259,4 +259,23 @@ public class BreakPoss {
     public void setMiddle(int t) {
         middle = t;
     }
+    
+    /** @see java.lang.Object#toString() */
+    public String toString() {
+        StringBuffer sb = new StringBuffer("BreakPoss");
+        if (isFirstArea()) {
+            sb.append(", first area");
+        }
+        if (isLastArea()) {
+            sb.append(", last area");
+        }
+        if (isForcedBreak()) {
+            sb.append(", forced break");
+        }
+        sb.append(", stackSize={");
+        sb.append(stackSize);
+        sb.append("}, pos=");
+        sb.append(position);
+        return sb.toString();
+    }
 }