pbwest      2004/06/06 09:50:58

  Modified:    src/java/org/apache/fop/area Tag: FOP_0-20-0_Alt-Design
                        PaddingRectangle.java ContentRectangle.java
                        SpacesRectangle.java BorderRectangle.java
  Log:
  Added ripple constructor:
  ContentRectangle>PaddingRectangle>BorderRectangle>SpacesRectangle
  with private frame field and get method
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.2   +21 -5     xml-fop/src/java/org/apache/fop/area/Attic/PaddingRectangle.java
  
  Index: PaddingRectangle.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/area/Attic/PaddingRectangle.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- PaddingRectangle.java     6 Jun 2004 15:30:29 -0000       1.1.2.1
  +++ PaddingRectangle.java     6 Jun 2004 16:50:58 -0000       1.1.2.2
  @@ -28,7 +28,14 @@
    */
   public class PaddingRectangle extends AreaFrame {
   
  -     /**
  +    public PaddingRectangle() {
  +        contents = new ContentRectangle();
  +        contentOffset = new Point2D.Double();
  +        borders = new BorderRectangle();
  +        borders.setContents(this);
  +    }
  +
  +    /**
         * @param x
         * @param y
         * @param w
  @@ -37,8 +44,10 @@
         * @param contentOffset
         */
        public PaddingRectangle(double x, double y, double w, double h,
  -                     Rectangle2D contents, Point2D contentOffset) {
  +                     ContentRectangle contents, Point2D contentOffset) {
                super(x, y, w, h, contents, contentOffset);
  +        borders = new BorderRectangle();
  +        borders.setContents(this);
        }
   
        /**
  @@ -46,9 +55,16 @@
         * @param contents
         * @param contentOffset
         */
  -     public PaddingRectangle(Rectangle2D rect, Rectangle2D contents,
  +     public PaddingRectangle(Rectangle2D rect, ContentRectangle contents,
                        Point2D contentOffset) {
                super(rect, contents, contentOffset);
  +        borders = new BorderRectangle();
  +        borders.setContents(this);
        }
   
  +    private BorderRectangle borders = null;
  +
  +    public BorderRectangle getBorders() {
  +        return borders;
  +    }
   }
  
  
  
  1.1.2.2   +11 -13    xml-fop/src/java/org/apache/fop/area/Attic/ContentRectangle.java
  
  Index: ContentRectangle.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/area/Attic/ContentRectangle.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- ContentRectangle.java     6 Jun 2004 15:30:29 -0000       1.1.2.1
  +++ ContentRectangle.java     6 Jun 2004 16:50:58 -0000       1.1.2.2
  @@ -35,6 +35,8 @@
         */
        public ContentRectangle() {
                super();
  +        padding = new PaddingRectangle();
  +        padding.setContents(this);
        }
   
        /**
  @@ -47,22 +49,18 @@
         */
        public ContentRectangle(double x, double y, double w, double h) {
                super(x, y, w, h);
  +        padding = new PaddingRectangle();
  +        padding.setContents(this);
        }
   
        private PaddingRectangle padding = null;
  -     private BorderRectangle borders = null;
  -     private SpacesRectangle spaces = null;
   
  -    public void setPadding(PaddingRectangle padding) {
  -        this.padding = padding;
  +    public PaddingRectangle getPadding() {
  +        return padding;
       }
   
  -    public void setBorders(BorderRectangle borders) {
  -        this.borders = borders;
  +    public void setRect(double x, double y, double w, double h) {
  +        super.setRect(x, y, w, h);
  +        padding.setContents(this);
       }
  -
  -    public void setSpaces(SpacesRectangle spaces) {
  -        this.spaces = spaces;
  -    }
  -
   }
  
  
  
  1.1.2.2   +11 -5     xml-fop/src/java/org/apache/fop/area/Attic/SpacesRectangle.java
  
  Index: SpacesRectangle.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/Attic/SpacesRectangle.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- SpacesRectangle.java      6 Jun 2004 15:30:29 -0000       1.1.2.1
  +++ SpacesRectangle.java      6 Jun 2004 16:50:58 -0000       1.1.2.2
  @@ -28,7 +28,13 @@
    */
   public class SpacesRectangle extends AreaFrame {
   
  -     /**
  +    public SpacesRectangle() {
  +        contents = new BorderRectangle();
  +        contentOffset = new Point2D.Double();
  +
  +    }
  +
  +    /**
         * @param x
         * @param y
         * @param w
  @@ -37,7 +43,7 @@
         * @param contentOffset
         */
        public SpacesRectangle(double x, double y, double w, double h,
  -                     Rectangle2D contents, Point2D contentOffset) {
  +                     BorderRectangle contents, Point2D contentOffset) {
                super(x, y, w, h, contents, contentOffset);
        }
   
  @@ -46,7 +52,7 @@
         * @param contents
         * @param contentOffset
         */
  -     public SpacesRectangle(Rectangle2D rect, Rectangle2D contents,
  +     public SpacesRectangle(Rectangle2D rect, BorderRectangle contents,
                        Point2D contentOffset) {
                super(rect, contents, contentOffset);
        }
  
  
  
  1.1.2.2   +21 -5     xml-fop/src/java/org/apache/fop/area/Attic/BorderRectangle.java
  
  Index: BorderRectangle.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/Attic/BorderRectangle.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- BorderRectangle.java      6 Jun 2004 15:30:29 -0000       1.1.2.1
  +++ BorderRectangle.java      6 Jun 2004 16:50:58 -0000       1.1.2.2
  @@ -28,7 +28,14 @@
    */
   public class BorderRectangle extends AreaFrame {
   
  -     /**
  +    public BorderRectangle() {
  +        contents = new PaddingRectangle();
  +        contentOffset = new Point2D.Double();
  +        spaces = new SpacesRectangle();
  +        spaces.setContents(this);
  +    }
  +
  +    /**
         * @param x
         * @param y
         * @param w
  @@ -37,8 +44,10 @@
         * @param contentOffset
         */
        public BorderRectangle(double x, double y, double w, double h,
  -                     Rectangle2D contents, Point2D contentOffset) {
  +                     PaddingRectangle contents, Point2D contentOffset) {
                super(x, y, w, h, contents, contentOffset);
  +        spaces = new SpacesRectangle();
  +        spaces.setContents(this);
        }
   
        /**
  @@ -46,9 +55,16 @@
         * @param contents
         * @param contentOffset
         */
  -     public BorderRectangle(Rectangle2D rect, Rectangle2D contents,
  +     public BorderRectangle(Rectangle2D rect, PaddingRectangle contents,
                        Point2D contentOffset) {
                super(rect, contents, contentOffset);
  +        spaces = new SpacesRectangle();
  +        spaces.setContents(this);
        }
   
  +    private SpacesRectangle spaces = null;
  +
  +    public SpacesRectangle getSpaces() {
  +        return spaces;
  +    }
   }
  
  
  

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

Reply via email to