vmote       2003/08/25 10:06:46

  Modified:    src/java/org/apache/fop/fo/flow Leader.java
               src/java/org/apache/fop/layoutmgr AddLMVisitor.java
  Log:
  move fo/flow/Leader.getAllocIPD() to layoutmgr/AddLMVisitor.getLeaderAllocIPD()
  
  Revision  Changes    Path
  1.12      +1 -11     xml-fop/src/java/org/apache/fop/fo/flow/Leader.java
  
  Index: Leader.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Leader.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Leader.java       25 Aug 2003 15:37:02 -0000      1.11
  +++ Leader.java       25 Aug 2003 17:06:46 -0000      1.12
  @@ -67,7 +67,6 @@
   import org.apache.fop.fonts.Font;
   import org.apache.fop.fo.properties.CommonMarginInline;
   import org.apache.fop.fo.properties.CommonRelativePosition;
  -import org.apache.fop.layoutmgr.MinOptMax;
   
   /**
    * Class modelling fo:leader object. See Sec. 6.6.9 of the XSL-FO Standard.
  @@ -178,16 +177,7 @@
   
       }
   
  -    public MinOptMax getAllocIPD(int ipd) {
  -        // length of the leader
  -        int opt = getLength("leader-length.optimum", ipd);
  -        int min = getLength("leader-length.minimum", ipd);
  -        int max = getLength("leader-length.maximum", ipd);
  -
  -        return new MinOptMax(min, opt, max);
  -    }
  -
  -    protected int getLength(String prop, int dim) {
  +    public int getLength(String prop, int dim) {
           int length;
           Length maxlength = properties.get(prop).getLength();
           if (maxlength instanceof PercentLength) {
  
  
  
  1.8       +11 -2     xml-fop/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java
  
  Index: AddLMVisitor.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- AddLMVisitor.java 25 Aug 2003 15:37:03 -0000      1.7
  +++ AddLMVisitor.java 25 Aug 2003 17:06:46 -0000      1.8
  @@ -278,7 +278,7 @@
                }
   
                protected MinOptMax getAllocationIPD(int refIPD) {
  -                return node.getAllocIPD(refIPD);
  +                return getLeaderAllocIPD(node, refIPD);
                }
   
                /*protected void offsetArea(LayoutContext context) {
  @@ -291,6 +291,15 @@
            lm.setFObj(node);
            lm.setAlignment(node.properties.get("leader-alignment").getEnum());
            currentLMList.add(lm);
  +     }
  +
  +     public MinOptMax getLeaderAllocIPD(Leader node, int ipd) {
  +         // length of the leader
  +         int opt = node.getLength("leader-length.optimum", ipd);
  +         int min = node.getLength("leader-length.minimum", ipd);
  +         int max = node.getLength("leader-length.maximum", ipd);
  +
  +         return new MinOptMax(min, opt, max);
        }
   
        private InlineArea getLeaderInlineArea(Leader node) {
  
  
  

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

Reply via email to