[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fop-cvs
Subject:    cvs commit: xml-fop/src/java/org/apache/fop/area AbstractReferenceArea.java
From:       pbwest () apache ! org
Date:       2004-06-17 11:33:06
Message-ID: 20040617113306.25049.qmail () minotaur ! apache ! org
[Download RAW message or body]

pbwest      2004/06/17 04:33:06

  Modified:    src/java/org/apache/fop/area Tag: FOP_0-20-0_Alt-Design
                        AbstractReferenceArea.java
  Log:
  Extended to handle getFrameOrientation() and getContentOrientation()
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.6   +42 -3     xml-fop/src/java/org/apache/fop/area/Attic/AbstractReferenceArea.java
  
  Index: AbstractReferenceArea.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/Attic/AbstractReferenceArea.java,v
  retrieving revision 1.1.2.5
  retrieving revision 1.1.2.6
  diff -u -r1.1.2.5 -r1.1.2.6
  --- AbstractReferenceArea.java	1 Jun 2004 06:27:05 -0000	1.1.2.5
  +++ AbstractReferenceArea.java	17 Jun 2004 11:33:06 -0000	1.1.2.6
  @@ -20,7 +20,10 @@
   
   import java.awt.geom.AffineTransform;
   import org.apache.fop.datastructs.Node;
  +import org.apache.fop.datatypes.IntegerType;
   import org.apache.fop.fo.FONode;
  +import org.apache.fop.fo.PropNames;
  +import org.apache.fop.fo.expr.PropertyException;
   import org.apache.fop.fo.flow.FoPageSequence;
   
   /**
  @@ -46,9 +49,17 @@
               Node parent,
               Object sync) {
           super(pageSeq, generatedBy, parent, sync);
  -        // TODO Auto-generated constructor stub
  +        contentOrientation = setContentOrientation();
  +        frameOrientation = setFrameOrientation();
  +        // What transform is required?
  +        // TODO work out the transformation
  +        // TODO check for reference-area rotational transformation
  +        // in interactions between AreaFrames and ContentAreas
       }
   
  +    private int contentOrientation;
  +    private int frameOrientation;
  +
       /**
        * Set the Coordinate Transformation Matrix which transforms content
        * coordinates in this reference area which are specified in
  @@ -73,6 +84,34 @@
           synchronized (sync) {
               return this.transformer;
           }
  +    }
  +
  +    private int setContentOrientation() {
  +        try {
  +            return IntegerType.getIntValue(
  +                    generatedBy.getPropertyValue(
  +                            PropNames.REFERENCE_ORIENTATION));
  +        } catch (PropertyException e) {
  +            throw new RuntimeException(e);
  +        }
  +    }
  +
  +    public int getContentOrientation() {
  +        return contentOrientation;
  +    }
  +
  +    private int setFrameOrientation() {
  +        try {
  +            return IntegerType.getIntValue(
  +                    ((FONode)generatedBy.getParent()).getPropertyValue(
  +                            PropNames.REFERENCE_ORIENTATION));
  +        } catch (PropertyException e) {
  +            throw new RuntimeException(e);
  +        }
  +    }
  +
  +    public int getFrameOrientation() {
  +        return frameOrientation;
       }
   
       /**
  
  
  

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic