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 gm...@apache.org on 2005/05/11 09:08:50 UTC

cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr ContentLayoutManager.java AbstractLayoutManager.java KnuthPenalty.java TextLayoutManager.java LayoutManager.java BidiLayoutManager.java

gmazza      2005/05/11 00:08:49

  Modified:    src/java/org/apache/fop/layoutmgr Tag:
                        Temp_KnuthStylePageBreaking
                        ContentLayoutManager.java
                        AbstractLayoutManager.java KnuthPenalty.java
                        TextLayoutManager.java LayoutManager.java
                        BidiLayoutManager.java
  Log:
  Moved the FLAGGED_PENALTY constant to the KnuthPenalty class
  because it will be easier to understand this constant's meaning
  within the framework of comments/notes in this class.
  
  Removed unused setFObj() requirement from LayoutManager interface.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.24.2.8  +0 -5      xml-fop/src/java/org/apache/fop/layoutmgr/ContentLayoutManager.java
  
  Index: ContentLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/ContentLayoutManager.java,v
  retrieving revision 1.24.2.7
  retrieving revision 1.24.2.8
  diff -u -r1.24.2.7 -r1.24.2.8
  --- ContentLayoutManager.java	9 May 2005 22:15:20 -0000	1.24.2.7
  +++ ContentLayoutManager.java	11 May 2005 07:08:49 -0000	1.24.2.8
  @@ -19,7 +19,6 @@
   package org.apache.fop.layoutmgr;
   
   import org.apache.fop.apps.FOUserAgent;
  -import org.apache.fop.fo.FObj;
   import org.apache.fop.fo.Constants;
   import org.apache.fop.fo.pagination.Title;
   import org.apache.fop.area.Area;
  @@ -200,10 +199,6 @@
       }
   
       /** @see org.apache.fop.layoutmgr.LayoutManager */
  -    public void setFObj(FObj fobj) {
  -    }
  -
  -    /** @see org.apache.fop.layoutmgr.LayoutManager */
       public void setParent(LayoutManager lm) {
           parentLM = lm;
       }
  
  
  
  1.41.2.10 +0 -9      xml-fop/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java
  
  Index: AbstractLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java,v
  retrieving revision 1.41.2.9
  retrieving revision 1.41.2.10
  diff -u -r1.41.2.9 -r1.41.2.10
  --- AbstractLayoutManager.java	11 May 2005 00:17:58 -0000	1.41.2.9
  +++ AbstractLayoutManager.java	11 May 2005 07:08:49 -0000	1.41.2.10
  @@ -79,15 +79,6 @@
           if (fo == null) {
               throw new IllegalStateException("Null formatting object found.");
           }
  -        setFObj(fo);
  -    }
  -
  -    /**
  -     * Set the FO object for this layout manager
  -     *
  -     * @param fo the formatting object for this layout manager
  -     */
  -    public void setFObj(FObj fo) {
           markers = fo.getMarkers();
           fobjIter = fo.getChildNodes();
           childLMiter = new LMiter(this);
  
  
  
  1.4.2.3   +3 -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.2
  retrieving revision 1.4.2.3
  diff -u -r1.4.2.2 -r1.4.2.3
  --- KnuthPenalty.java	23 Mar 2005 13:51:37 -0000	1.4.2.2
  +++ KnuthPenalty.java	11 May 2005 07:08:49 -0000	1.4.2.3
  @@ -38,6 +38,8 @@
    */
   public class KnuthPenalty extends KnuthElement {
   
  +    public static final int FLAGGED_PENALTY = 50;
  +
       private int penalty;
       private boolean bFlagged; 
       private int breakClass = -1;
  
  
  
  1.32.2.2  +4 -4      xml-fop/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java
  
  Index: TextLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java,v
  retrieving revision 1.32.2.1
  retrieving revision 1.32.2.2
  diff -u -r1.32.2.1 -r1.32.2.2
  --- TextLayoutManager.java	18 Mar 2005 09:02:54 -0000	1.32.2.1
  +++ TextLayoutManager.java	11 May 2005 07:08:49 -0000	1.32.2.2
  @@ -837,7 +837,7 @@
                       && textArray[iTempStart] != SPACE
                       && textArray[iTempStart] != NBSPACE) {
                       returnList.add
  -                        (new KnuthPenalty(0, LayoutManager.FLAGGED_PENALTY, true,
  +                        (new KnuthPenalty(0, KnuthPenalty.FLAGGED_PENALTY, true,
                                             new LeafPosition(this, -1), false));
                       returnList.add
                           (new KnuthGlue(letterSpaceIPD.opt,
  @@ -872,7 +872,7 @@
               // the last character could be used as a line break
               // append new elements to oldList
               oldListIterator = oldList.listIterator(oldList.size());
  -            oldListIterator.add(new KnuthPenalty(0, LayoutManager.FLAGGED_PENALTY, true,
  +            oldListIterator.add(new KnuthPenalty(0, KnuthPenalty.FLAGGED_PENALTY, true,
                                                    new LeafPosition(this, -1), false));
               oldListIterator.add(new KnuthGlue(letterSpaceIPD.opt,
                                          letterSpaceIPD.max - letterSpaceIPD.opt,
  @@ -1033,7 +1033,7 @@
                   }
                   if (ai.bHyphenated) {
                       returnList.add
  -                        (new KnuthPenalty(hyphIPD, LayoutManager.FLAGGED_PENALTY, true,
  +                        (new KnuthPenalty(hyphIPD, KnuthPenalty.FLAGGED_PENALTY, true,
                                             new LeafPosition(this, -1), false));
                   }
                   // if the last character is '-' or '/', it could be used as a line end;
  @@ -1042,7 +1042,7 @@
                   if (BREAK_CHARS.indexOf(textArray[ai.iBreakIndex - 1]) >= 0
                       && ai.iLScount == (ai.iBreakIndex - ai.iStartIndex)) {
                       returnList.add
  -                        (new KnuthPenalty(0, LayoutManager.FLAGGED_PENALTY, true,
  +                        (new KnuthPenalty(0, KnuthPenalty.FLAGGED_PENALTY, true,
                                             new LeafPosition(this, -1), false));
                       returnList.add
                           (new KnuthGlue(letterSpaceIPD.opt,
  
  
  
  1.21.2.8  +0 -11     xml-fop/src/java/org/apache/fop/layoutmgr/LayoutManager.java
  
  Index: LayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/LayoutManager.java,v
  retrieving revision 1.21.2.7
  retrieving revision 1.21.2.8
  diff -u -r1.21.2.7 -r1.21.2.8
  --- LayoutManager.java	9 May 2005 22:15:20 -0000	1.21.2.7
  +++ LayoutManager.java	11 May 2005 07:08:49 -0000	1.21.2.8
  @@ -22,7 +22,6 @@
   import java.util.List;
   
   import org.apache.fop.area.Area;
  -import org.apache.fop.fo.FObj;
   
   /**
    * The interface for all LayoutManagers.
  @@ -30,15 +29,6 @@
   public interface LayoutManager {
   
       /**
  -     * Set the FO object for this layout manager.
  -     * For layout managers that are created without an FO
  -     * this may not be called.
  -     *
  -     * @param obj the FO object for this layout manager
  -     */
  -    void setFObj(FObj obj);
  -
  -    /**
        * Set the parent layout manager.
        * The parent layout manager is required for adding areas.
        *
  @@ -216,5 +206,4 @@
       LinkedList getChangedKnuthElements(List oldList, /*int flaggedPenalty,*/
                                          int alignment);
      
  -    public static final int FLAGGED_PENALTY = 50;
   }
  
  
  
  1.8.2.1   +1 -2      xml-fop/src/java/org/apache/fop/layoutmgr/BidiLayoutManager.java
  
  Index: BidiLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/BidiLayoutManager.java,v
  retrieving revision 1.8
  retrieving revision 1.8.2.1
  diff -u -r1.8 -r1.8.2.1
  --- BidiLayoutManager.java	22 Dec 2004 08:54:10 -0000	1.8
  +++ BidiLayoutManager.java	11 May 2005 07:08:49 -0000	1.8.2.1
  @@ -37,7 +37,6 @@
       public BidiLayoutManager(BidiOverride node, InlineLayoutManager cLM) {
           super(node);
           children = new ArrayList();
  -        setFObj(node);
   /*
           for (int count = cLM.size() - 1; count >= 0; count--) {
               InlineArea ia = cLM.get(count);
  
  
  

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