pbwest      2004/06/06 09:57:06

  Modified:    src/java/org/apache/fop/area Tag: FOP_0-20-0_Alt-Design
                        AreaFrame.java
  Log:
  Made no-arg constructor public.
  Added AreaFrame(Rectangle2D contents) construtor to create AreaFrame of same 
dimensions as contents.
  Made contents and contentOffset protected.
  Added getContents() and getContentOffset().
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.2   +23 -8     xml-fop/src/java/org/apache/fop/area/Attic/AreaFrame.java
  
  Index: AreaFrame.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/Attic/AreaFrame.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- AreaFrame.java    6 Jun 2004 15:30:29 -0000       1.1.2.1
  +++ AreaFrame.java    6 Jun 2004 16:57:06 -0000       1.1.2.2
  @@ -33,7 +33,14 @@
        /**
         * 
         */
  -     private AreaFrame() {}
  +     public AreaFrame() {}
  +
  +    public AreaFrame(Rectangle2D contents) {
  +        super();
  +        setRect(contents);
  +        this.contents = contents;
  +        this.contentOffset = new Point2D.Double();
  +    }
   
        /**
         * Instantiates a new framing rectangle with the given origin point, the
  @@ -58,10 +65,10 @@
        }
   
        /** The framed rectangle */
  -     private Rectangle2D contents = null;
  +     protected Rectangle2D contents = null;
        /** The offset from <code>this</code> origin to the origin of the framed
         * rectangle */
  -     private Point2D contentOffset = null;
  +     protected Point2D contentOffset = null;
   
        /**
         * Instantiates a new framing rectangle from the given rectangle, given
  @@ -94,7 +101,11 @@
                contents = this.contents;
        }
   
  -     /**
  +    public Rectangle2D getContents() {
  +        return contents;
  +    }
  +
  +    /**
         * Sets the offset from the origin of <code>this</code> to the origin of
         * the framed contents rectangle.  The dimensions of the framed contents
         * are not affected, but the dimensions of <code>this</code> are changed
  @@ -102,13 +113,17 @@
         * X and Y axes.
         * @param offset the new offset to the framed rectangle
         */
  -     public void setContentsOffset(Point2D offset) {
  +     public void setContentOffset(Point2D offset) {
                setStart(offset.getX());
                setBefore(offset.getY());
                contentOffset = offset;
        }
   
  -     /**
  +    public Point2D getContentOffset() {
  +        return contentOffset;
  +    }
  +
  +    /**
         * Sets the before edge width of the frame.  The <code>contents</code> size
         * is unaffected, but the size of the frame (<code>this</code>) will
         * change.  The height will vary by the difference between the previous and
  
  
  

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

Reply via email to