vmote       2003/08/27 12:00:10

  Modified:    src/java/org/apache/fop/fo/pagination Title.java
               src/java/org/apache/fop/layoutmgr LayoutManagerLS.java
  Log:
  move fo/pagination/Title.getTitleArea() to layoutmgr/LayoutManagerLS
  
  Revision  Changes    Path
  1.8       +1 -32     xml-fop/src/java/org/apache/fop/fo/pagination/Title.java
  
  Index: Title.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/Title.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Title.java        22 Aug 2003 17:42:41 -0000      1.7
  +++ Title.java        27 Aug 2003 19:00:10 -0000      1.8
  @@ -65,10 +65,6 @@
   import org.apache.fop.fo.properties.CommonBorderAndPadding;
   import org.apache.fop.fonts.Font;
   import org.apache.fop.fo.properties.CommonMarginInline;
  -import org.apache.fop.layoutmgr.ContentLayoutManager;
  -import org.apache.fop.layoutmgr.InlineStackingLayoutManager;
  -import org.apache.fop.layoutmgr.LMiter;
  -import org.apache.fop.apps.*;
   
   /**
    * Class modelling the fo:title object. See Sec. 6.4.20 in the XSL-FO Standard.
  @@ -80,33 +76,6 @@
        */
       public Title(FONode parent) {
           super(parent);
  -    }
  -
  -    /**
  -     * TODO: shouldn't this code be in Layout??
  -     * @return the Title area
  -     */
  -    public org.apache.fop.area.Title getTitleArea() {
  -        org.apache.fop.area.Title title =
  -                 new org.apache.fop.area.Title();
  -        // use special layout manager to add the inline areas
  -        // to the Title.
  -        InlineStackingLayoutManager lm;
  -        lm = new InlineStackingLayoutManager();
  -        lm.setUserAgent(getUserAgent());
  -        lm.setFObj(this);
  -        lm.setLMiter(new LMiter(children.listIterator()));
  -        lm.init();
  -
  -        // get breaks then add areas to title
  -
  -        ContentLayoutManager clm = new ContentLayoutManager(title);
  -        clm.setUserAgent(getUserAgent());
  -        lm.setParent(clm);
  -
  -        clm.fillArea(lm);
  -
  -        return title;
       }
   
       private void setup() {
  
  
  
  1.11      +28 -2     xml-fop/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java
  
  Index: LayoutManagerLS.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/LayoutManagerLS.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- LayoutManagerLS.java      26 Aug 2003 19:28:46 -0000      1.10
  +++ LayoutManagerLS.java      27 Aug 2003 19:00:10 -0000      1.11
  @@ -84,7 +84,7 @@
       public void format(PageSequence pageSeq, AreaTree areaTree) throws FOPException 
{
           Title title = null;
           if (pageSeq.getTitleFO() != null) {
  -            title = pageSeq.getTitleFO().getTitleArea();
  +            title = getTitleArea(pageSeq.getTitleFO());
           }
           areaTree.startPageSequence(title);
           // Make a new PageLayoutManager and a FlowLayoutManager
  @@ -173,6 +173,32 @@
               data.addSubData(createBookmarkData(out));
           }
           return data;
  +    }
  +
  +    /**
  +     * @return the Title area
  +     */
  +    public org.apache.fop.area.Title 
getTitleArea(org.apache.fop.fo.pagination.Title foTitle) {
  +        org.apache.fop.area.Title title =
  +                 new org.apache.fop.area.Title();
  +        // use special layout manager to add the inline areas
  +        // to the Title.
  +        InlineStackingLayoutManager lm;
  +        lm = new InlineStackingLayoutManager();
  +        lm.setUserAgent(foTitle.getUserAgent());
  +        lm.setFObj(foTitle);
  +        lm.setLMiter(new LMiter(foTitle.children.listIterator()));
  +        lm.init();
  +
  +        // get breaks then add areas to title
  +
  +        ContentLayoutManager clm = new ContentLayoutManager(title);
  +        clm.setUserAgent(foTitle.getUserAgent());
  +        lm.setParent(clm);
  +
  +        clm.fillArea(lm);
  +
  +        return title;
       }
   
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to