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 ke...@apache.org on 2002/08/29 09:58:38 UTC

cvs commit: xml-fop/src/org/apache/fop/fo/flow Leader.java

keiron      2002/08/29 00:58:37

  Modified:    src/org/apache/fop/fo/flow Leader.java
  Added:       src/org/apache/fop/area/inline FilledArea.java
  Log:
  moved filed area to its own class
  
  Revision  Changes    Path
  1.1                  xml-fop/src/org/apache/fop/area/inline/FilledArea.java
  
  Index: FilledArea.java
  ===================================================================
  /*
   * $Id: FilledArea.java,v 1.1 2002/08/29 07:58:37 keiron Exp $
   * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
   * For details on use and redistribution please refer to the
   * LICENSE file included with these sources.
   */
  
  package org.apache.fop.area.inline;
  
  import org.apache.fop.area.MinOptMax;
  
  import java.util.List;
  import java.util.ArrayList;
  
  /**
   * Filled area.
   * This inline area contains some inline areas.
   * When the renderer gets the child areas to render
   * the inline areas are repeated to fill the ipd of
   * this inline parent.
   */
  public class FilledArea extends InlineParent {
      MinOptMax alloc;
      int unitWidth;
  
      public FilledArea() {
      }
  
      public void setUnitWidth(int w) {
          unitWidth = w;
      }
  
      public void setAllocationIPD(MinOptMax all) {
          alloc = all;
      }
  
      public MinOptMax getAllocationIPD() {
          return alloc;
      }
  
      public List getChildAreas() {
          int units = (int)(getWidth() / unitWidth);
          ArrayList newList = new ArrayList();
          for (int count = 0; count < units; count++) {
              newList.addAll(inlines);
          }
          return newList;
      }
  }
  
  
  
  
  1.24      +2 -34     xml-fop/src/org/apache/fop/fo/flow/Leader.java
  
  Index: Leader.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Leader.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- Leader.java	23 Aug 2002 13:45:25 -0000	1.23
  +++ Leader.java	29 Aug 2002 07:58:37 -0000	1.24
  @@ -26,6 +26,7 @@
   import org.apache.fop.area.inline.Word;
   import org.apache.fop.area.inline.Stretch;
   import org.apache.fop.area.inline.InlineParent;
  +import org.apache.fop.area.inline.FilledArea;
   import org.apache.fop.util.CharUtilities;
   import org.apache.fop.apps.StructureHandler;
   import org.apache.fop.area.Trait;
  @@ -140,39 +141,6 @@
                   fa.addChild(spacer);
               }
               leaderArea = fa;
  -        }
  -    }
  -
  -    protected static class FilledArea extends InlineParent {
  -        MinOptMax alloc;
  -        int unitWidth;
  -
  -        public FilledArea() {
  -        }
  -
  -        public void setUnitWidth(int w) {
  -            unitWidth = w;
  -        }
  -
  -        public void setAllocationIPD(MinOptMax all) {
  -            alloc = all;
  -        }
  -
  -        public MinOptMax getAllocationIPD() {
  -            return alloc;
  -        }
  -
  -        public void addChild(InlineArea childArea) {
  -            inlines.add(childArea);
  -        }
  -
  -        public List getChildAreas() {
  -            int units = (int)(getWidth() / unitWidth);
  -            ArrayList newList = new ArrayList();
  -            for(int count = 0; count < units; count++) {
  -                newList.addAll(inlines);
  -            }
  -            return newList;
           }
       }
   
  
  
  

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