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/03/23 14:51:38 UTC

cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr KnuthPenalty.java KnuthGlue.java KnuthBox.java

jeremias    2005/03/23 05:51:38

  Modified:    src/java/org/apache/fop/layoutmgr Tag:
                        Temp_KnuthStylePageBreaking KnuthPenalty.java
                        KnuthGlue.java KnuthBox.java
  Log:
  Javadocs and toString() methods.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.4.2.2   +28 -1     xml-fop/src/java/org/apache/fop/layoutmgr/KnuthPenalty.java
  
  Index: KnuthPenalty.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/KnuthPenalty.java,v
  retrieving revision 1.4.2.1
  retrieving revision 1.4.2.2
  diff -u -r1.4.2.1 -r1.4.2.2
  --- KnuthPenalty.java	18 Mar 2005 09:02:54 -0000	1.4.2.1
  +++ KnuthPenalty.java	23 Mar 2005 13:51:37 -0000	1.4.2.2
  @@ -91,4 +91,31 @@
           return breakClass;
       }
       
  +    /** @see java.lang.Object#toString() */
  +    public String toString() {
  +        StringBuffer sb = new StringBuffer(64);
  +        if (isAuxiliary()) {
  +            sb.append("aux. ");
  +        }
  +        sb.append("penalty");
  +        sb.append(" p=");
  +        if (getP() < 0) {
  +            sb.append("-");
  +        }
  +        if (Math.abs(getP()) == INFINITE) {
  +            sb.append("INFINITE");
  +        } else {
  +            sb.append(getP());
  +        }
  +        if (isFlagged()) {
  +            sb.append(" [flagged]");
  +        }
  +        sb.append(" w=");
  +        sb.append(getW());
  +        if (isForcedBreak()) {
  +            sb.append(" (forced break)");
  +        }
  +        return sb.toString();
  +    }
  +    
   }
  
  
  
  1.4.2.2   +21 -7     xml-fop/src/java/org/apache/fop/layoutmgr/KnuthGlue.java
  
  Index: KnuthGlue.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/KnuthGlue.java,v
  retrieving revision 1.4.2.1
  retrieving revision 1.4.2.2
  diff -u -r1.4.2.1 -r1.4.2.2
  --- KnuthGlue.java	18 Mar 2005 09:02:55 -0000	1.4.2.1
  +++ KnuthGlue.java	23 Mar 2005 13:51:37 -0000	1.4.2.2
  @@ -73,26 +73,40 @@
           adjustmentClass = iAdjClass;
       }
   
  +    /** @see org.apache.fop.layoutmgr.KnuthElement#isGlue() */
       public boolean isGlue() {
           return true;
       }
   
  -    /**
  -     * Return the stretchability of this glue.
  -     */
  +    /** @return the stretchability of this glue. */
       public int getY() {
           return stretchability;
       }
   
  -    /**
  -     * Return the shrinkability of this glue.
  -     */
  +    /** @return the shrinkability of this glue. */
       public int getZ() {
           return shrinkability;
       }
       
  +    /** @return the adjustment class (or role) of this glue. */
       public int getAdjustmentClass() {
           return adjustmentClass;
       }
       
  +    /** @see java.lang.Object#toString() */
  +    public String toString() {
  +        StringBuffer sb = new StringBuffer(64);
  +        if (isAuxiliary()) {
  +            sb.append("aux. ");
  +        }
  +        sb.append("glue");
  +        sb.append(" w=").append(getW());
  +        sb.append(" stretch=").append(getY());
  +        sb.append(" shrink=").append(getZ());
  +        if (getAdjustmentClass() >= 0) {
  +            sb.append(" adj-class=").append(getAdjustmentClass());
  +        }
  +        return sb.toString();
  +    }
  +    
   }
  
  
  
  1.4.2.2   +14 -1     xml-fop/src/java/org/apache/fop/layoutmgr/KnuthBox.java
  
  Index: KnuthBox.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/KnuthBox.java,v
  retrieving revision 1.4.2.1
  retrieving revision 1.4.2.2
  diff -u -r1.4.2.1 -r1.4.2.2
  --- KnuthBox.java	18 Mar 2005 09:02:55 -0000	1.4.2.1
  +++ KnuthBox.java	23 Mar 2005 13:51:37 -0000	1.4.2.2
  @@ -44,8 +44,21 @@
           super(w, pos, bAux);
       }
   
  +    /** @see org.apache.fop.layoutmgr.KnuthElement#isBox() */
       public boolean isBox() {
           return true;
       }
   
  +    /** @see java.lang.Object#toString() */
  +    public String toString() {
  +        StringBuffer sb = new StringBuffer(64);
  +        if (isAuxiliary()) {
  +            sb.append("aux. ");
  +        }
  +        sb.append("box");
  +        sb.append(" w=");
  +        sb.append(getW());
  +        return sb.toString();
  +    }
  +    
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org