pbwest      2004/04/20 10:15:32

  Modified:    src/java/org/apache/fop/fo/properties Tag:
                        FOP_0-20-0_Alt-Design WritingMode.java
                        BorderAfterStyle.java BorderEndStyle.java
                        BorderTopStyle.java BorderLeftStyle.java
                        BorderBeforeStyle.java BorderStartStyle.java
                        BorderBottomStyle.java BorderRightStyle.java
  Added:       src/java/org/apache/fop/fo/properties Tag:
                        FOP_0-20-0_Alt-Design
                        BorderCommonStyleRelative.java
                        BorderCommonStyleAbsolute.java
                        AbsoluteCorrespondingProperty.java
                        RelativeCorrespondingProperty.java
  Log:
  Initial phase of corresponding property handling
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.6   +227 -10   
xml-fop/src/java/org/apache/fop/fo/properties/Attic/WritingMode.java
  
  Index: WritingMode.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/Attic/WritingMode.java,v
  retrieving revision 1.1.2.5
  retrieving revision 1.1.2.6
  diff -u -r1.1.2.5 -r1.1.2.6
  --- WritingMode.java  25 Feb 2004 23:09:09 -0000      1.1.2.5
  +++ WritingMode.java  20 Apr 2004 17:15:25 -0000      1.1.2.6
  @@ -22,6 +22,7 @@
   
   import java.util.HashMap;
   
  +import org.apache.fop.datastructs.ROIntArray;
   import org.apache.fop.datatypes.EnumType;
   import org.apache.fop.datatypes.Ints;
   import org.apache.fop.datatypes.PropertyValue;
  @@ -50,9 +51,11 @@
       public static final int LR_TB = 1;
       public static final int RL_TB = 2;
       public static final int TB_RL = 3;
  -    public static final int LR = 4;
  -    public static final int RL = 5;
  -    public static final int TB = 6;
  +    public static final int LR = 1;
  +    public static final int RL = 2;
  +    public static final int TB = 3;
  +    public static final int MAX_WRITING_MODE = TB_RL;
  +
       public PropertyValue getInitialValue(int property)
           throws PropertyException
       {
  @@ -64,22 +67,28 @@
           return inherited;
       }
   
  -
       private static final String[] rwEnums = {
           null
           ,"lr-tb"
           ,"rl-tb"
           ,"tb-rl"
  -        ,"lr"
  -        ,"rl"
  -        ,"tb"
       };
  +
  +    private static final String[] rwEnumsSynon = {
  +            null
  +            ,"lr"
  +            ,"rl"
  +            ,"tb"
  +    };
  +
       private static final HashMap rwEnumHash;
       static {
  -        rwEnumHash = new HashMap((int)(rwEnums.length / 0.75) + 1);
  +        rwEnumHash = new HashMap(9);
           for (int i = 1; i < rwEnums.length; i++ ) {
               rwEnumHash.put(rwEnums[i],
  -                                Ints.consts.get(i));
  +                    Ints.consts.get(i));
  +            rwEnumHash.put(rwEnumsSynon[i],
  +                    Ints.consts.get(i));
           }
       }
       public int getEnumIndex(String enumval)
  @@ -97,5 +106,213 @@
               throw new PropertyException("index out of range: " + index);
           return rwEnums[index];
       }
  +
  +    public static final int BEFORE = 1;
  +    public static final int AFTER = 2;
  +    public static final int START = 3;
  +    public static final int END = 4;
  +
  +    public static final int MAX_EDGE = END;
  +
  +    private static final String[] relativeEdges = {
  +            null
  +            ,"before"
  +            ,"after"
  +            ,"start"
  +            ,"end"
  +    };
  +
  +    public static final int TOP = 1;
  +    public static final int BOTTOM = 2;
  +    public static final int LEFT = 3;
  +    public static final int RIGHT = 4;
  +
  +    private static final String[] absoluteEdges = {
  +            null
  +            ,"top"
  +            ,"bottom"
  +            ,"left"
  +            ,"right"
  +    };
  +
  +    private static final int[] lr_tbAbsRelMap = {
  +            0, BEFORE, AFTER, START, END
  +    };
  +
  +    private static final int[] lr_tbRelAbsMap = {
  +            0, TOP, BOTTOM, LEFT, RIGHT
  +    };
  +
  +    private static final int[] rl_tbAbsRelMap = {
  +            0, BEFORE, AFTER, END, START
  +    };
  +
  +    private static final int[] rl_tbRelAbsMap = {
  +            0, TOP, BOTTOM, RIGHT, LEFT
  +    };
  +
  +    private static final int[] tb_rlAbsRelMap = {
  +            0, START, END, AFTER, BEFORE
  +    };
  +
  +    private static final int[] tb_rlRelAbsMap = {
  +            0, RIGHT, LEFT, TOP, BOTTOM
  +    };
  +
  +    // top-to-bottom, left-to-right, e.g., Mongolian
  +    // Currently unused
  +    private static final int[] tb_lrAbsRelMap = {
  +            0, START, END, BEFORE, AFTER
  +    };
  +
  +    private static int[] tb_lrRelAbsMap = {
  +            0, LEFT, RIGHT, TOP, BOTTOM
  +    };
  +
  +    private static final ROIntArray[] relAbsROMaps = {
  +            null
  +            ,new ROIntArray(lr_tbRelAbsMap)
  +            ,new ROIntArray(rl_tbRelAbsMap)
  +            ,new ROIntArray(tb_rlRelAbsMap)
  +    };
  +
  +    private static final ROIntArray[] absRelROMaps = {
  +            null
  +            ,new ROIntArray(lr_tbAbsRelMap)
  +            ,new ROIntArray(rl_tbAbsRelMap)
  +            ,new ROIntArray(tb_rlAbsRelMap)
  +    };
  +
  +    /**
  +     * Gets the relative-to-absolute map for the given writing mode.
  +     * <code>writingMode</code> is the enumerated constant <code>int</code>
  +     * value of the writing mode, from the set <code>LR_TB</code>,
  +     * <code>RL_TB</code> and <code>TB_RL</code>.
  +     * The result is an <code>ROIntArray</code> containing the set of absolute
  +     * edge integer eumeration constants <code>TOP</code>, <code>BOTTOM</code>,
  +     * <code>LEFT</code> and <code>RIGHT</code>, indexed by the relative edge
  +     * integer eumeration constants <code>BEFORE</code>, <code>AFTER</code>,
  +     * <code>START</code> and <code>END</code>, as appropriate for the given
  +     * writing mode.
  +     * @param writingMode the enumerated value of the writing mode
  +     * @return an array mapping from relative edges to absolute edges for the
  +     * given writing mode.
  +     * 
  +     * @throws PropertyException if the writing mode is out of range
  +     */
  +    public static ROIntArray getRelAbsMap(int writingMode)
  +    throws PropertyException {
  +        if (writingMode > 0 && writingMode <= MAX_WRITING_MODE) {
  +            return relAbsROMaps[writingMode];
  +        }
  +        throw new PropertyException(
  +                "Writing mode out of range:" + writingMode);
  +    }
  +
  +    /**
  +     * Gets the absolute-to-relative map for the given writing mode.
  +     * <code>writingMode</code> is the enumerated constant <code>int</code>
  +     * value of the writing mode, from the set <code>LR_TB</code>,
  +     * <code>RL_TB</code> and <code>TB_RL</code>.
  +     * The result is an <code>ROIntArray</code> containing the relative edge
  +     * integer eumeration constants <code>BEFORE</code>, <code>AFTER</code>,
  +     * <code>START</code> and <code>END</code>, indexed by the set of absolute
  +     * edge integer eumeration constants <code>TOP</code>, <code>BOTTOM</code>,
  +     * <code>LEFT</code> and <code>RIGHT</code>, as appropriate for the given
  +     * writing mode.
  +     * @param writingMode the enumerated value of the writing mode
  +     * @return an array mapping from absolute edges to relative edges for the
  +     * given writing mode.
  +     * 
  +     * @throws PropertyException if the writing mode is out of range
  +     */
  +    public static ROIntArray getAbsRelMap(int writingMode)
  +    throws PropertyException {
  +        if (writingMode > 0 && writingMode <= MAX_WRITING_MODE) {
  +            return absRelROMaps[writingMode];
  +        }
  +        throw new PropertyException(
  +                "Writing mode out of range:" + writingMode);
  +    }
  +
  +    private static final int[][] absRelMaps = {
  +            null
  +            ,lr_tbAbsRelMap
  +            ,rl_tbAbsRelMap
  +            ,tb_rlAbsRelMap
  +    };
  +
  +    /**
  +     * Gets the relative edge corresponding to the given absolute edge for the
  +     * given writing mode.
  +     * <code>writingMode</code> is the enumerated constant <code>int</code>
  +     * value of the writing mode, from the set <code>LR_TB</code>,
  +     * <code>RL_TB</code> and <code>TB_RL</code>.
  +     * <code>absoluteEdge</code> is the enumerated constant <code>int</code>
  +     * value of the absolute edge, from the set <code>TOP</code>,
  +     * <code>BOTTOM</code>, <code>LEFT</code> and <code>RIGHT</code>.
  +     * The result is from the enumerated constant <code>int</code> set
  +     * <code>BEFORE</code>, <code>AFTER</code>, <code>START</code> and
  +     * <code>END</code>, as appropriate for the given writing mode.
  +     * @param writingMode the enumeration value of the writing mode
  +     * @param absoluteEdge the enumeration value of the absolute edge
  +     * @return the enumeration value of the corresponding relative edge
  +     * @throws PropertyException if the writing mode or absolute edge is
  +     * out of range 
  +     */
  +    public static int getCorrespondingRelativeEdge(
  +            int writingMode, int absoluteEdge)
  +    throws PropertyException {
  +        if (writingMode <= 0 || writingMode > MAX_WRITING_MODE) {
  +            throw new PropertyException(
  +                    "Writing mode out of range:" + writingMode);
  +        }
  +        if (absoluteEdge <= 0 || absoluteEdge > MAX_EDGE) {
  +            throw new PropertyException(
  +                    "Absolute edge out of range:" + absoluteEdge);
  +        }
  +        return absRelMaps[writingMode][absoluteEdge];
  +    }
  +
  +    private static final int[][] relAbsMaps = {
  +            null
  +            ,lr_tbRelAbsMap
  +            ,rl_tbRelAbsMap
  +            ,tb_rlRelAbsMap
  +    };
  +
  +
  +    /**
  +     * Gets the absolute edge corresponding to the given relative edge for the
  +     * given writing mode.
  +     * <code>writingMode</code> is the enumerated constant <code>int</code>
  +     * value of the writing mode, from the set <code>LR_TB</code>,
  +     * <code>RL_TB</code> and <code>TB_RL</code>.
  +     * <code>relativeEdge</code> is the enumerated constant <code>int</code>
  +     * value of the relative edge, from the set <code>BEFORE</code>,
  +     * <code>AFTER</code>, <code>START</code> and <code>END</code>.
  +     * The result is from the enumerated constant <code>int</code> set
  +     * <code>TOP</code>, <code>BOTTOM</code>, <code>LEFT</code> and
  +     * <code>RIGHT</code>, as appropriate for the given writing mode.
  +     * @param writingMode the enumeration value of the writing mode
  +     * @param relativeEdge the enumeration value of the relative edge
  +     * @return the enumeration value of the corresponding absolute edge
  +     * @throws PropertyException if the writing mode or relative edge is
  +     * out of range 
  +     */
  +    public static int getCorrespondingAbsoluteEdge(
  +            int writingMode, int relativeEdge)
  +    throws PropertyException {
  +        if (writingMode <= 0 || writingMode > MAX_WRITING_MODE) {
  +            throw new PropertyException(
  +                    "Writing mode out of range:" + writingMode);
  +        }
  +        if (relativeEdge <= 0 || relativeEdge > MAX_EDGE) {
  +            throw new PropertyException(
  +                    "Relative edge out of range:" + relativeEdge);
  +        }
  +        return relAbsMaps[writingMode][relativeEdge];
  +    }
  +
   }
   
  
  
  
  1.1.2.4   +14 -2     
xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderAfterStyle.java
  
  Index: BorderAfterStyle.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderAfterStyle.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- BorderAfterStyle.java     19 Feb 2004 03:11:41 -0000      1.1.2.3
  +++ BorderAfterStyle.java     20 Apr 2004 17:15:25 -0000      1.1.2.4
  @@ -20,8 +20,12 @@
    */
   package org.apache.fop.fo.properties;
   
  +import org.apache.fop.fo.FONode;
  +import org.apache.fop.fo.expr.PropertyException;
   
  -public class BorderAfterStyle extends BorderCommonStyle {
  +
  +public class BorderAfterStyle
  +extends BorderCommonStyleRelative {
       public static final int dataTypes = ENUM | NONE | INHERIT;
   
       public int getDataTypes() {
  @@ -47,7 +51,15 @@
           return inherited;
       }
   
  +    public int getCorrespondingAbsoluteProperty(FONode foNode)
  +    throws PropertyException {
  +        return WritingMode.getCorrespondingAbsoluteEdge(
  +                getWritingMode(foNode), WritingMode.AFTER);
  +    }
   
  +    public boolean correspondingOverrides(FONode foNode) {
  +        return false;
  +    }
   
   }
   
  
  
  
  1.1.2.4   +15 -2     
xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderEndStyle.java
  
  Index: BorderEndStyle.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderEndStyle.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- BorderEndStyle.java       19 Feb 2004 03:11:40 -0000      1.1.2.3
  +++ BorderEndStyle.java       20 Apr 2004 17:15:26 -0000      1.1.2.4
  @@ -20,8 +20,12 @@
    */
   package org.apache.fop.fo.properties;
   
  +import org.apache.fop.fo.FONode;
  +import org.apache.fop.fo.expr.PropertyException;
   
  -public class BorderEndStyle extends BorderCommonStyle {
  +
  +public class BorderEndStyle
  +extends BorderCommonStyleRelative {
       public static final int dataTypes = ENUM | NONE | INHERIT;
   
       public int getDataTypes() {
  @@ -47,6 +51,15 @@
           return inherited;
       }
   
  +    public int getCorrespondingAbsoluteProperty(FONode foNode)
  +    throws PropertyException {
  +        return WritingMode.getCorrespondingAbsoluteEdge(
  +                getWritingMode(foNode), WritingMode.END);
  +    }
  +
  +    public boolean correspondingOverrides(FONode foNode) {
  +        return false;
  +    }
   
   }
   
  
  
  
  1.1.2.4   +15 -3     
xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderTopStyle.java
  
  Index: BorderTopStyle.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderTopStyle.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- BorderTopStyle.java       19 Feb 2004 03:11:40 -0000      1.1.2.3
  +++ BorderTopStyle.java       20 Apr 2004 17:15:26 -0000      1.1.2.4
  @@ -20,8 +20,12 @@
    */
   package org.apache.fop.fo.properties;
   
  +import org.apache.fop.fo.FONode;
  +import org.apache.fop.fo.expr.PropertyException;
   
  -public class BorderTopStyle extends BorderCommonStyle {
  +
  +public class BorderTopStyle
  +extends BorderCommonStyleAbsolute {
       public static final int dataTypes = ENUM | NONE | INHERIT;
   
       public int getDataTypes() {
  @@ -40,13 +44,21 @@
           return initialValueType;
       }
   
  -
       public static final int inherited = NO;
   
       public int getInherited() {
           return inherited;
       }
   
  +    public int getCorrespondingRelativeProperty(FONode foNode)
  +    throws PropertyException {
  +        return WritingMode.getCorrespondingRelativeEdge(
  +                getWritingMode(foNode), WritingMode.TOP);
  +    }
  +
  +    public boolean correspondingOverrides(FONode foNode) {
  +        return false;
  +    }
   
   }
   
  
  
  
  1.1.2.4   +14 -2     
xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderLeftStyle.java
  
  Index: BorderLeftStyle.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderLeftStyle.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- BorderLeftStyle.java      19 Feb 2004 03:11:41 -0000      1.1.2.3
  +++ BorderLeftStyle.java      20 Apr 2004 17:15:26 -0000      1.1.2.4
  @@ -20,8 +20,12 @@
    */
   package org.apache.fop.fo.properties;
   
  +import org.apache.fop.fo.FONode;
  +import org.apache.fop.fo.expr.PropertyException;
   
  -public class BorderLeftStyle extends BorderCommonStyle {
  +
  +public class BorderLeftStyle
  +extends BorderCommonStyleAbsolute {
       public static final int dataTypes = ENUM | NONE | INHERIT;
   
       public int getDataTypes() {
  @@ -47,7 +51,15 @@
           return inherited;
       }
   
  +    public int getCorrespondingRelativeProperty(FONode foNode)
  +    throws PropertyException {
  +        return WritingMode.getCorrespondingRelativeEdge(
  +                getWritingMode(foNode), WritingMode.LEFT);
  +    }
   
  +    public boolean correspondingOverrides(FONode foNode) {
  +        return false;
  +    }
   
   }
   
  
  
  
  1.1.2.4   +15 -2     
xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderBeforeStyle.java
  
  Index: BorderBeforeStyle.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderBeforeStyle.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- BorderBeforeStyle.java    19 Feb 2004 03:11:40 -0000      1.1.2.3
  +++ BorderBeforeStyle.java    20 Apr 2004 17:15:26 -0000      1.1.2.4
  @@ -20,8 +20,12 @@
    */
   package org.apache.fop.fo.properties;
   
  +import org.apache.fop.fo.FONode;
  +import org.apache.fop.fo.expr.PropertyException;
   
  -public class BorderBeforeStyle extends BorderCommonStyle {
  +
  +public class BorderBeforeStyle
  +extends BorderCommonStyleRelative {
       public static final int dataTypes = ENUM | NONE | INHERIT;
   
       public int getDataTypes() {
  @@ -47,6 +51,15 @@
           return inherited;
       }
   
  +    public int getCorrespondingAbsoluteProperty(FONode foNode)
  +    throws PropertyException {
  +        return WritingMode.getCorrespondingAbsoluteEdge(
  +                getWritingMode(foNode), WritingMode.BEFORE);
  +    }
  +
  +    public boolean correspondingOverrides(FONode foNode) {
  +        return false;
  +    }
   
   }
   
  
  
  
  1.1.2.4   +15 -2     
xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderStartStyle.java
  
  Index: BorderStartStyle.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderStartStyle.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- BorderStartStyle.java     19 Feb 2004 03:11:41 -0000      1.1.2.3
  +++ BorderStartStyle.java     20 Apr 2004 17:15:27 -0000      1.1.2.4
  @@ -20,8 +20,12 @@
    */
   package org.apache.fop.fo.properties;
   
  +import org.apache.fop.fo.FONode;
  +import org.apache.fop.fo.expr.PropertyException;
   
  -public class BorderStartStyle extends BorderCommonStyle {
  +
  +public class BorderStartStyle
  +extends BorderCommonStyleRelative {
       public static final int dataTypes = ENUM | NONE | INHERIT;
   
       public int getDataTypes() {
  @@ -47,6 +51,15 @@
           return inherited;
       }
   
  +    public int getCorrespondingAbsoluteProperty(FONode foNode)
  +    throws PropertyException {
  +        return WritingMode.getCorrespondingAbsoluteEdge(
  +                getWritingMode(foNode), WritingMode.START);
  +    }
  +
  +    public boolean correspondingOverrides(FONode foNode) {
  +        return false;
  +    }
   
   }
   
  
  
  
  1.1.2.4   +16 -2     
xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderBottomStyle.java
  
  Index: BorderBottomStyle.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderBottomStyle.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- BorderBottomStyle.java    19 Feb 2004 03:11:40 -0000      1.1.2.3
  +++ BorderBottomStyle.java    20 Apr 2004 17:15:27 -0000      1.1.2.4
  @@ -20,8 +20,12 @@
    */
   package org.apache.fop.fo.properties;
   
  +import org.apache.fop.fo.FONode;
  +import org.apache.fop.fo.expr.PropertyException;
   
  -public class BorderBottomStyle extends BorderCommonStyle {
  +
  +public class BorderBottomStyle
  +extends BorderCommonStyleAbsolute {
       public static final int dataTypes = ENUM | NONE | INHERIT;
   
       public int getDataTypes() {
  @@ -45,6 +49,16 @@
   
       public int getInherited() {
           return inherited;
  +    }
  +
  +    public int getCorrespondingRelativeProperty(FONode foNode)
  +    throws PropertyException {
  +        return WritingMode.getCorrespondingRelativeEdge(
  +                getWritingMode(foNode), WritingMode.BOTTOM);
  +    }
  +
  +    public boolean correspondingOverrides(FONode foNode) {
  +        return false;
       }
   
   
  
  
  
  1.1.2.4   +15 -2     
xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderRightStyle.java
  
  Index: BorderRightStyle.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderRightStyle.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- BorderRightStyle.java     19 Feb 2004 03:11:40 -0000      1.1.2.3
  +++ BorderRightStyle.java     20 Apr 2004 17:15:27 -0000      1.1.2.4
  @@ -20,8 +20,12 @@
    */
   package org.apache.fop.fo.properties;
   
  +import org.apache.fop.fo.FONode;
  +import org.apache.fop.fo.expr.PropertyException;
   
  -public class BorderRightStyle extends BorderCommonStyle {
  +
  +public class BorderRightStyle
  +extends BorderCommonStyleAbsolute {
       public static final int dataTypes = ENUM | NONE | INHERIT;
   
       public int getDataTypes() {
  @@ -47,6 +51,15 @@
           return inherited;
       }
   
  +    public int getCorrespondingRelativeProperty(FONode foNode)
  +    throws PropertyException {
  +        return WritingMode.getCorrespondingRelativeEdge(
  +                getWritingMode(foNode), WritingMode.RIGHT);
  +    }
  +
  +    public boolean correspondingOverrides(FONode foNode) {
  +        return false;
  +    }
   
   }
   
  
  
  
  No                   revision
  
  Index: BorderRightStyle.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderRightStyle.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- BorderRightStyle.java     19 Feb 2004 03:11:40 -0000      1.1.2.3
  +++ BorderRightStyle.java     20 Apr 2004 17:15:27 -0000      1.1.2.4
  @@ -20,8 +20,12 @@
    */
   package org.apache.fop.fo.properties;
   
  +import org.apache.fop.fo.FONode;
  +import org.apache.fop.fo.expr.PropertyException;
   
  -public class BorderRightStyle extends BorderCommonStyle {
  +
  +public class BorderRightStyle
  +extends BorderCommonStyleAbsolute {
       public static final int dataTypes = ENUM | NONE | INHERIT;
   
       public int getDataTypes() {
  @@ -47,6 +51,15 @@
           return inherited;
       }
   
  +    public int getCorrespondingRelativeProperty(FONode foNode)
  +    throws PropertyException {
  +        return WritingMode.getCorrespondingRelativeEdge(
  +                getWritingMode(foNode), WritingMode.RIGHT);
  +    }
  +
  +    public boolean correspondingOverrides(FONode foNode) {
  +        return false;
  +    }
   
   }
   
  
  
  
  No                   revision
  
  Index: BorderRightStyle.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderRightStyle.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- BorderRightStyle.java     19 Feb 2004 03:11:40 -0000      1.1.2.3
  +++ BorderRightStyle.java     20 Apr 2004 17:15:27 -0000      1.1.2.4
  @@ -20,8 +20,12 @@
    */
   package org.apache.fop.fo.properties;
   
  +import org.apache.fop.fo.FONode;
  +import org.apache.fop.fo.expr.PropertyException;
   
  -public class BorderRightStyle extends BorderCommonStyle {
  +
  +public class BorderRightStyle
  +extends BorderCommonStyleAbsolute {
       public static final int dataTypes = ENUM | NONE | INHERIT;
   
       public int getDataTypes() {
  @@ -47,6 +51,15 @@
           return inherited;
       }
   
  +    public int getCorrespondingRelativeProperty(FONode foNode)
  +    throws PropertyException {
  +        return WritingMode.getCorrespondingRelativeEdge(
  +                getWritingMode(foNode), WritingMode.RIGHT);
  +    }
  +
  +    public boolean correspondingOverrides(FONode foNode) {
  +        return false;
  +    }
   
   }
   
  
  
  
  1.1.2.1   +59 -0     
xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderCommonStyleRelative.java
  
  
  
  
  1.1.2.1   +59 -0     
xml-fop/src/java/org/apache/fop/fo/properties/Attic/BorderCommonStyleAbsolute.java
  
  
  
  
  1.1.2.1   +39 -0     
xml-fop/src/java/org/apache/fop/fo/properties/Attic/AbsoluteCorrespondingProperty.java
  
  
  
  
  1.1.2.1   +39 -0     
xml-fop/src/java/org/apache/fop/fo/properties/Attic/RelativeCorrespondingProperty.java
  
  
  
  

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

Reply via email to