keiron      2002/11/06 07:07:04

  Modified:    src/org/apache/fop/area Area.java RegionViewport.java
               src/org/apache/fop/area/inline Viewport.java
  Log:
  clone and serialize area traits
  
  Revision  Changes    Path
  1.12      +6 -2      xml-fop/src/org/apache/fop/area/Area.java
  
  Index: Area.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/area/Area.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Area.java 25 Oct 2002 09:29:39 -0000      1.11
  +++ Area.java 6 Nov 2002 15:07:04 -0000       1.12
  @@ -105,7 +105,11 @@
   
       private int areaClass = CLASS_NORMAL;
       private int ipd;
  -    private HashMap props = null;
  +
  +    /**
  +     * Traits for this area stored in a HashMap
  +     */
  +    protected HashMap props = null;
   
       /**
        * Get the area class of this area.
  
  
  
  1.6       +7 -1      xml-fop/src/org/apache/fop/area/RegionViewport.java
  
  Index: RegionViewport.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/area/RegionViewport.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- RegionViewport.java       18 Sep 2002 13:50:13 -0000      1.5
  +++ RegionViewport.java       6 Nov 2002 15:07:04 -0000       1.6
  @@ -9,6 +9,7 @@
   
   import java.awt.geom.Rectangle2D;
   import java.io.IOException;
  +import java.util.HashMap;
   
   /**
    * Region Viewport reference area.
  @@ -72,6 +73,7 @@
           out.writeFloat((float) viewArea.getWidth());
           out.writeFloat((float) viewArea.getHeight());
           out.writeBoolean(clip);
  +        out.writeObject(props);
           out.writeObject(region);
       }
   
  @@ -80,6 +82,7 @@
           viewArea = new Rectangle2D.Float(in.readFloat(), in.readFloat(),
                                            in.readFloat(), in.readFloat());
           clip = in.readBoolean();
  +        props = (HashMap)in.readObject();
           setRegion((RegionReference) in.readObject());
       }
   
  @@ -92,6 +95,9 @@
       public Object clone() {
           RegionViewport rv = new RegionViewport((Rectangle2D)viewArea.clone());
           rv.region = (RegionReference)region.clone();
  +        if(props != null) {
  +            rv.props = (HashMap)props.clone();
  +        }
           return rv;
       }
   }
  
  
  
  1.5       +4 -1      xml-fop/src/org/apache/fop/area/inline/Viewport.java
  
  Index: Viewport.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/area/inline/Viewport.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Viewport.java     18 Sep 2002 13:50:14 -0000      1.4
  +++ Viewport.java     6 Nov 2002 15:07:04 -0000       1.5
  @@ -12,6 +12,7 @@
   
   import java.io.IOException;
   import java.awt.geom.Rectangle2D;
  +import java.util.HashMap;
   
   /**
    * Inline viewport area.
  @@ -100,6 +101,7 @@
               out.writeFloat((float) contentPosition.getHeight());
           }
           out.writeBoolean(clip);
  +        //out.writeObject(props);
           out.writeObject(content);
       }
   
  @@ -112,6 +114,7 @@
                                                       in.readFloat());
           }
           clip = in.readBoolean();
  +        //props = (HashMap) in.readObject();
           content = (Area) in.readObject();
       }
   
  
  
  

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

Reply via email to