keiron      2002/11/14 03:13:33

  Modified:    src/org/apache/fop/area Area.java AreaTree.java
                        BlockParent.java CachedRenderPagesModel.java
                        LineArea.java Page.java PageViewport.java
                        RegionReference.java RegionViewport.java Span.java
                        Title.java Trait.java
               src/org/apache/fop/area/inline Anchor.java Character.java
                        Container.java FilledArea.java Image.java
                        InlineArea.java InlineParent.java Leader.java
                        Viewport.java Word.java
  Log:
  a bit of a cleanup of collections and comments
  
  Revision  Changes    Path
  1.13      +3 -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.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Area.java 6 Nov 2002 15:07:04 -0000       1.12
  +++ Area.java 14 Nov 2002 11:13:32 -0000      1.13
  @@ -9,6 +9,7 @@
   
   import java.io.Serializable;
   
  +import java.util.Map;
   import java.util.HashMap;
   
   // If the area appears more than once in the output
  @@ -187,7 +188,7 @@
        *
        * @return the map of traits
        */
  -    public HashMap getTraits() {
  +    public Map getTraits() {
           return this.props;
       }
   
  
  
  
  1.12      +21 -19    xml-fop/src/org/apache/fop/area/AreaTree.java
  
  Index: AreaTree.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/area/AreaTree.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- AreaTree.java     3 Nov 2002 16:24:21 -0000       1.11
  +++ AreaTree.java     14 Nov 2002 11:13:32 -0000      1.12
  @@ -11,7 +11,9 @@
   
   import java.util.ArrayList;
   import java.util.List;
  +import java.util.Map;
   import java.util.HashMap;
  +import java.util.Set;
   import java.util.HashSet;
   import java.util.Iterator;
   
  @@ -38,10 +40,10 @@
       private AreaTreeModel model;
   
       // hashmap of arraylists containing pages with id area
  -    private HashMap idLocations = new HashMap();
  +    private Map idLocations = new HashMap();
       // list of id's yet to be resolved and arraylists of pages
  -    private HashMap resolve = new HashMap();
  -    private ArrayList treeExtensions = new ArrayList();
  +    private Map resolve = new HashMap();
  +    private List treeExtensions = new ArrayList();
   
       /**
        * Create a render pages area tree model.
  @@ -100,7 +102,7 @@
           }
           list.add(pv);
   
  -        HashSet todo = (HashSet)resolve.get(id);
  +        Set todo = (Set)resolve.get(id);
           if (todo != null) {
               for (Iterator iter = todo.iterator(); iter.hasNext();) {
                   Resolveable res = (Resolveable)iter.next();
  @@ -125,7 +127,7 @@
        * @param res the Resolveable object to resolve
        */
       public void addUnresolvedID(String id, Resolveable res) {
  -        HashSet todo = (HashSet)resolve.get(id);
  +        Set todo = (Set)resolve.get(id);
           if (todo == null) {
               todo = new HashSet();
               resolve.put(id, todo);
  @@ -146,9 +148,9 @@
               String[] ids = res.getIDs();
               for (int count = 0; count < ids.length; count++) {
                   if (idLocations.containsKey(ids[count])) {
  -                    res.resolve(ids[count], (ArrayList)idLocations.get(ids[count]));
  +                    res.resolve(ids[count], (List)idLocations.get(ids[count]));
                   } else {
  -                    HashSet todo = (HashSet)resolve.get(ids[count]);
  +                    Set todo = (Set)resolve.get(ids[count]);
                       if (todo == null) {
                           todo = new HashSet();
                           resolve.put(ids[count], todo);
  @@ -180,7 +182,7 @@
       public void endDocument() {
           for (Iterator iter = resolve.keySet().iterator(); iter.hasNext();) {
               String id = (String)iter.next();
  -            HashSet list = (HashSet)resolve.get(id);
  +            Set list = (Set)resolve.get(id);
               for (Iterator resIter = list.iterator(); resIter.hasNext();) {
                   Resolveable res = (Resolveable)resIter.next();
                   if (!res.isResolved()) {
  @@ -228,10 +230,10 @@
        * The pages are stored and can be retrieved in any order.
        */
       public static class StorePagesModel extends AreaTreeModel {
  -        private ArrayList pageSequence = null;
  -        private ArrayList titles = new ArrayList();
  -        private ArrayList currSequence;
  -        private ArrayList extensions = new ArrayList();
  +        private List pageSequence = null;
  +        private List titles = new ArrayList();
  +        private List currSequence;
  +        private List extensions = new ArrayList();
   
           /**
            * Create a new store pages model
  @@ -284,7 +286,7 @@
            * @return returns the number of pages in a page sequence
            */
           public int getPageCount(int seq) {
  -            ArrayList sequence = (ArrayList) pageSequence.get(seq);
  +            List sequence = (List) pageSequence.get(seq);
               return sequence.size();
           }
   
  @@ -295,7 +297,7 @@
            * @return the PageViewport for the particular page
            */
           public PageViewport getPage(int seq, int count) {
  -            ArrayList sequence = (ArrayList) pageSequence.get(seq);
  +            List sequence = (List) pageSequence.get(seq);
               return (PageViewport) sequence.get(count);
           }
   
  @@ -363,9 +365,9 @@
           /**
            * Pages that have been prepared but not rendered yet.
            */
  -        protected ArrayList prepared = new ArrayList();
  -        private ArrayList pendingExt = new ArrayList();
  -        private ArrayList endDocExt = new ArrayList();
  +        protected List prepared = new ArrayList();
  +        private List pendingExt = new ArrayList();
  +        private List endDocExt = new ArrayList();
   
           /**
            * Create a new render pages model with the given renderer.
  @@ -488,7 +490,7 @@
               }
           }        
   
  -        private void renderExtensions(ArrayList list) {
  +        private void renderExtensions(List list) {
               for (int count = 0; count < list.size(); count++) {
                   TreeExt ext = (TreeExt)list.get(count);
                   renderer.renderExtension(ext);
  
  
  
  1.6       +2 -2      xml-fop/src/org/apache/fop/area/BlockParent.java
  
  Index: BlockParent.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/area/BlockParent.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- BlockParent.java  19 Sep 2002 09:20:06 -0000      1.5
  +++ BlockParent.java  14 Nov 2002 11:13:32 -0000      1.6
  @@ -44,7 +44,7 @@
       /**
        * The children of this block parent area.
        */
  -    protected ArrayList children = null;
  +    protected List children = null;
   
       // orientation if reference area
       private int orientation = ORIENT_0;
  
  
  
  1.3       +3 -2      xml-fop/src/org/apache/fop/area/CachedRenderPagesModel.java
  
  Index: CachedRenderPagesModel.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/area/CachedRenderPagesModel.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CachedRenderPagesModel.java       3 Nov 2002 16:24:21 -0000       1.2
  +++ CachedRenderPagesModel.java       14 Nov 2002 11:13:32 -0000      1.3
  @@ -9,6 +9,7 @@
   
   import org.apache.fop.render.Renderer;
   
  +import java.util.Map;
   import java.util.HashMap;
   import java.util.Iterator;
   
  @@ -27,7 +28,7 @@
    * the contents a reloaded.
    */
   public class CachedRenderPagesModel extends AreaTree.RenderPagesModel {
  -    private HashMap pageMap = new HashMap();
  +    private Map pageMap = new HashMap();
   
       /**
        * Create a new render pages model with the given renderer.
  
  
  
  1.11      +2 -2      xml-fop/src/org/apache/fop/area/LineArea.java
  
  Index: LineArea.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/area/LineArea.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- LineArea.java     18 Sep 2002 13:50:13 -0000      1.10
  +++ LineArea.java     14 Nov 2002 11:13:32 -0000      1.11
  @@ -30,7 +30,7 @@
       // this class can contain the dominant char styling info
       // this means that many renderers can optimise a bit
   
  -    private ArrayList inlineAreas = new ArrayList();
  +    private List inlineAreas = new ArrayList();
   
       /**
        * Set the height of this line area.
  
  
  
  1.7       +7 -6      xml-fop/src/org/apache/fop/area/Page.java
  
  Index: Page.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/area/Page.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Page.java 18 Sep 2002 13:50:13 -0000      1.6
  +++ Page.java 14 Nov 2002 11:13:32 -0000      1.7
  @@ -8,6 +8,7 @@
   package org.apache.fop.area;
   
   import java.io.Serializable;
  +import java.util.Map;
   import java.util.HashMap;
   
   /**
  @@ -31,11 +32,11 @@
   
       // hashmap of markers for this page
       // start and end are added by the fo that contains the markers
  -    private HashMap markerStart = null;
  -    private HashMap markerEnd = null;
  +    private Map markerStart = null;
  +    private Map markerEnd = null;
   
       // temporary map of unresolved objects used when serializing the page
  -    private HashMap unresolved = null;
  +    private Map unresolved = null;
   
       /**
        * Set the region on this page.
  @@ -110,7 +111,7 @@
        *
        * @param unres the map of unresolved objects
        */
  -    public void setUnresolvedReferences(HashMap unres) {
  +    public void setUnresolvedReferences(Map unres) {
           unresolved = unres;
       }
   
  @@ -121,7 +122,7 @@
        *
        * @return the de-serialized map of unresolved objects
        */
  -    public HashMap getUnresolvedReferences() {
  +    public Map getUnresolvedReferences() {
           return unresolved;
       }
   }
  
  
  
  1.10      +5 -4      xml-fop/src/org/apache/fop/area/PageViewport.java
  
  Index: PageViewport.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/area/PageViewport.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- PageViewport.java 3 Nov 2002 16:24:21 -0000       1.9
  +++ PageViewport.java 14 Nov 2002 11:13:32 -0000      1.10
  @@ -12,6 +12,7 @@
   import java.io.ObjectInputStream;
   import java.util.ArrayList;
   import java.util.List;
  +import java.util.Map;
   import java.util.HashMap; 
   import java.util.Iterator;
   
  @@ -30,14 +31,14 @@
       private String pageNumber = null;
   
       // list of id references and the rectangle on the page
  -    private HashMap idReferences = null;
  +    private Map idReferences = null;
   
       // this keeps a list of currently unresolved areas or extensions
       // once the thing is resolved it is removed
       // when this is empty the page can be rendered
  -    private HashMap unresolved = null;
  +    private Map unresolved = null;
   
  -    private HashMap pendingResolved = null;
  +    private Map pendingResolved = null;
   
       /**
        * Create a page viewport.
  
  
  
  1.8       +2 -2      xml-fop/src/org/apache/fop/area/RegionReference.java
  
  Index: RegionReference.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/area/RegionReference.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- RegionReference.java      19 Sep 2002 09:20:06 -0000      1.7
  +++ RegionReference.java      14 Nov 2002 11:13:32 -0000      1.8
  @@ -44,7 +44,7 @@
       private int regionClass = BEFORE;
       private CTM ctm;
       // the list of block areas from the static flow
  -    private ArrayList blocks = new ArrayList();
  +    private List blocks = new ArrayList();
   
       /**
        * Create a new region reference area.
  
  
  
  1.7       +2 -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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- RegionViewport.java       6 Nov 2002 15:07:04 -0000       1.6
  +++ RegionViewport.java       14 Nov 2002 11:13:32 -0000      1.7
  @@ -101,3 +101,4 @@
           return rv;
       }
   }
  +
  
  
  
  1.6       +3 -2      xml-fop/src/org/apache/fop/area/Span.java
  
  Index: Span.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/area/Span.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Span.java 18 Sep 2002 13:50:13 -0000      1.5
  +++ Span.java 14 Nov 2002 11:13:32 -0000      1.6
  @@ -7,12 +7,13 @@
   
   package org.apache.fop.area;
   
  +import java.util.List;
   import java.util.ArrayList;
   
   // this is a reference area block area with 0 border and padding
   public class Span extends Area {
       // the list of flow reference areas in this span area
  -    private ArrayList flowAreas;
  +    private List flowAreas;
       private int height;
   
       public Span(int cols) {
  
  
  
  1.3       +2 -1      xml-fop/src/org/apache/fop/area/Title.java
  
  Index: Title.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/area/Title.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Title.java        18 Sep 2002 13:50:13 -0000      1.2
  +++ Title.java        14 Nov 2002 11:13:32 -0000      1.3
  @@ -14,3 +14,4 @@
    */
   public class Title extends LineArea {
   }
  +
  
  
  
  1.9       +98 -4     xml-fop/src/org/apache/fop/area/Trait.java
  
  Index: Trait.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/area/Trait.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Trait.java        3 Nov 2002 16:24:21 -0000       1.8
  +++ Trait.java        14 Nov 2002 11:13:32 -0000      1.9
  @@ -80,7 +80,7 @@
       public static final Integer LINETHROUGH = new Integer(12);
   
       /**
  -     *
  +     * Shadow offset.
        */
       public static final Integer OFFSET = new Integer(13);
   
  @@ -93,15 +93,43 @@
        * The border start.
        */
       public static final Integer BORDER_START = new Integer(15);
  +
  +    /**
  +     * The border end.
  +     */
       public static final Integer BORDER_END = new Integer(16);
  +
  +    /**
  +     * The border before.
  +     */
       public static final Integer BORDER_BEFORE = new Integer(17);
  +
  +    /**
  +     * The border after.
  +     */
       public static final Integer BORDER_AFTER = new Integer(18);
  +
  +    /**
  +     * The padding start.
  +     */
       public static final Integer PADDING_START = new Integer(19);
  +
  +    /**
  +     * The padding end.
  +     */
       public static final Integer PADDING_END = new Integer(20);
  +
  +    /**
  +     * The padding before.
  +     */
       public static final Integer PADDING_BEFORE = new Integer(21);
  +
  +    /**
  +     * The padding after.
  +     */
       public static final Integer PADDING_AFTER = new Integer(22);
   
  -    static HashMap shmTraitInfo;
  +    private static final Map shmTraitInfo = new HashMap();
   
       private static class TraitInfo {
           String sName;
  @@ -114,7 +142,6 @@
   
       static {
           // Create a hashmap mapping trait code to name for external representation
  -        shmTraitInfo = new HashMap();
           shmTraitInfo.put(ID_LINK, new TraitInfo("id-link", String.class));
           shmTraitInfo.put(INTERNAL_LINK,
                             new TraitInfo("internal-link", String.class));
  @@ -154,6 +181,12 @@
                             new TraitInfo("padding-after", Integer.class));
       }
   
  +    /**
  +     * Get the trait name for a trait code.
  +     *
  +     * @param traitCode the trait code to get the name for
  +     * @return the trait name
  +     */
       public static String getTraitName(Object traitCode) {
           Object obj = shmTraitInfo.get(traitCode);
           if (obj != null) {
  @@ -163,6 +196,12 @@
           }
       }
   
  +    /**
  +     * Get the trait code for a trait name.
  +     *
  +     * @param sTraitName the name of the trait to find
  +     * @return the trait code object
  +     */
       public static Object getTraitCode(String sTraitName) {
           Iterator iter = shmTraitInfo.entrySet().iterator();
           while (iter.hasNext()) {
  @@ -175,28 +214,60 @@
           return null;
       }
   
  +    /**
  +     * Get the data storage class for the trait.
  +     *
  +     * @param oTraitCode the trait code to lookup
  +     * @return the class type for the trait
  +     */
       private static Class getTraitClass(Object oTraitCode) {
           TraitInfo ti = (TraitInfo) shmTraitInfo.get(oTraitCode);
           return (ti != null ? ti.sClass : null);
       }
   
  +    /**
  +     * The type of trait for an area.
  +     */
       public Object propType;
  +
  +    /**
  +     * The data value of the trait.
  +     */
       public Object data;
   
  +    /**
  +     * Create a new emty trait.
  +     */
       public Trait() {
           this.propType = null;
           this.data = null;
       }
   
  +    /**
  +     * Create a trait with the value and type.
  +     *
  +     * @param propType the type of trait
  +     * @param data the data value
  +     */
       public Trait(Object propType, Object data) {
           this.propType = propType;
           this.data = data;
       }
   
  +    /**
  +     * Return the string for debugging.
  +     *
  +     * @param the string from the data value
  +     */
       public String toString() {
           return data.toString();
       }
   
  +    /**
  +     * Make a trait value.
  +     *
  +     * @param oCode 
  +     */
       public static Object makeTraitValue(Object oCode, String sTraitValue) {
           // Get the code from the name
           // See what type of object it is
  @@ -229,11 +300,34 @@
           return null;
       }
   
  +    /**
  +     * Background trait structure.
  +     * Used for storing back trait information which are related.
  +     */
       public static class Background implements Serializable {
  +        /**
  +         * The background color if any.
  +         */
           public ColorType color = null;
  +
  +        /**
  +         * The background image url if any.
  +         */
           public String url = null;
  +
  +        /**
  +         * Background repeat enum for images.
  +         */
           public int repeat;
  +
  +        /**
  +         * Background horizontal offset for images.
  +         */
           public int horiz;
  +
  +        /**
  +         * Background vertical offset for images.
  +         */
           public int vertical;
       }
   
  
  
  
  1.3       +2 -1      xml-fop/src/org/apache/fop/area/inline/Anchor.java
  
  Index: Anchor.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/area/inline/Anchor.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Anchor.java       18 Sep 2002 13:50:14 -0000      1.2
  +++ Anchor.java       14 Nov 2002 11:13:33 -0000      1.3
  @@ -17,3 +17,4 @@
       // has reference to associated footnote or float out-of-line area
   
   }
  +
  
  
  
  1.3       +3 -5      xml-fop/src/org/apache/fop/area/inline/Character.java
  
  Index: Character.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/area/inline/Character.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Character.java    18 Sep 2002 13:50:14 -0000      1.2
  +++ Character.java    14 Nov 2002 11:13:33 -0000      1.3
  @@ -11,7 +11,7 @@
   
   /**
    * Single character inline area.
  - * This inline area holds a single characater.
  + * This inline area holds a single character.
    */
   public class Character extends InlineArea {
       private char character;
  @@ -25,8 +25,6 @@
           character = ch;
       }
   
  -    // character info: font, char spacing, colour, baseline
  -
       /**
        * Render this inline area.
        *
  @@ -44,5 +42,5 @@
       public char getChar() {
           return character;
       }
  -
   }
  +
  
  
  
  1.4       +36 -10    xml-fop/src/org/apache/fop/area/inline/Container.java
  
  Index: Container.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/area/inline/Container.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Container.java    2 Nov 2001 07:45:17 -0000       1.3
  +++ Container.java    14 Nov 2002 11:13:33 -0000      1.4
  @@ -14,28 +14,54 @@
   import java.util.List;
   import java.util.ArrayList;
   
  -// this is an inline area that can have blocks as children
  +/**
  + * Container area for inline container.
  + * This area should be placed in a viewport as a result of the
  + * inline container formatting object.
  + * This allows an inline area to have blocks as children.
  + */
   public class Container extends Area {
  -    ArrayList blocks = new ArrayList();
  -    int width;
  -
  +    /**
  +     * The list of block areas stacked inside this container
  +     */
  +    protected List blocks = new ArrayList();
  +
  +    /**
  +     * The width of this container
  +     */
  +    protected int width;
  +
  +    /**
  +     * Create a new container area
  +     */
       public Container() {
       }
   
  -    public void render(Renderer renderer) {
  -        renderer.renderContainer(this);
  -    }
  -
  +    /**
  +     * Add the block to this area.
  +     *
  +     * @param block the block area to add
  +     */
       public void addBlock(Block block) {
           blocks.add(block);
       }
   
  +    /**
  +     * Get the block areas stacked inside this container area.
  +     *
  +     * @return the list of block areas
  +     */
       public List getBlocks() {
           return blocks;
       }
   
  +    /**
  +     * Get the width of this container area.
  +     *
  +     * @return the width
  +     */
       public int getWidth() {
           return width;
       }
  -
   }
  +
  
  
  
  1.4       +2 -2      xml-fop/src/org/apache/fop/area/inline/FilledArea.java
  
  Index: FilledArea.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/area/inline/FilledArea.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FilledArea.java   18 Sep 2002 13:50:14 -0000      1.3
  +++ FilledArea.java   14 Nov 2002 11:13:33 -0000      1.4
  @@ -47,7 +47,7 @@
        */
       public List getChildAreas() {
           int units = (int)(getWidth() / unitWidth);
  -        ArrayList newList = new ArrayList();
  +        List newList = new ArrayList();
           for (int count = 0; count < units; count++) {
               newList.addAll(inlines);
           }
  
  
  
  1.5       +2 -2      xml-fop/src/org/apache/fop/area/inline/Image.java
  
  Index: Image.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/area/inline/Image.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Image.java        18 Sep 2002 13:50:14 -0000      1.4
  +++ Image.java        14 Nov 2002 11:13:33 -0000      1.5
  @@ -35,5 +35,5 @@
       public String getURL() {
           return url;
       }
  -
   }
  +
  
  
  
  1.13      +29 -6     xml-fop/src/org/apache/fop/area/inline/InlineArea.java
  
  Index: InlineArea.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/area/inline/InlineArea.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- InlineArea.java   18 Sep 2002 13:50:14 -0000      1.12
  +++ InlineArea.java   14 Nov 2002 11:13:33 -0000      1.13
  @@ -12,8 +12,6 @@
   import org.apache.fop.render.Renderer;
   import org.apache.fop.traits.BorderProps;
   
  -import java.util.ArrayList;
  -
   /**
    * Inline Area
    * This area is for all inline areas that can be placed
  @@ -29,9 +27,6 @@
       // offset position from top of parent area
       int verticalPosition = 0;
   
  -    // store properties in array list, need better solution
  -    private ArrayList props = null;
  -
       /**
        * Render this inline area.
        * Inline areas that extend this class are expected
  @@ -43,10 +38,22 @@
       public void render(Renderer renderer) {
       }
   
  +    /**
  +     * Set the width of this inline area.
  +     * Currently sets the ipd.
  +     *
  +     * @param w the width
  +     */
       public void setWidth(int w) {
           contentIPD = w;
       }
   
  +    /**
  +     * Get the width of this inline area.
  +     * Currently gets the ipd.
  +     *
  +     * @return the width
  +     */
       public int getWidth() {
           return contentIPD;
       }
  @@ -90,10 +97,26 @@
           return iBP;
       }
   
  +    /**
  +     * Set the offset of this inline area.
  +     * This is used to set the offset of the inline area
  +     * which is normally relative to the top of the line
  +     * or the baseline.
  +     *
  +     * @param v the offset
  +     */
       public void setOffset(int v) {
           verticalPosition = v;
       }
   
  +    /**
  +     * Get the offset of this inline area.
  +     * This returns the offset of the inline area
  +     * which is normally relative to the top of the line
  +     * or the baseline.
  +     *
  +     * @return the offset
  +     */
       public int getOffset() {
           return verticalPosition;
       }
  
  
  
  1.7       +2 -2      xml-fop/src/org/apache/fop/area/inline/InlineParent.java
  
  Index: InlineParent.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/area/inline/InlineParent.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- InlineParent.java 25 Oct 2002 09:29:39 -0000      1.6
  +++ InlineParent.java 14 Nov 2002 11:13:33 -0000      1.7
  @@ -22,7 +22,7 @@
       /**
        * The list of inline areas added to this inline parent.
        */
  -    protected ArrayList inlines = new ArrayList();
  +    protected List inlines = new ArrayList();
   
       /**
        * An inline parent is a reference area somay have clipping
  
  
  
  1.5       +2 -3      xml-fop/src/org/apache/fop/area/inline/Leader.java
  
  Index: Leader.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/area/inline/Leader.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Leader.java       18 Sep 2002 13:50:14 -0000      1.4
  +++ Leader.java       14 Nov 2002 11:13:33 -0000      1.5
  @@ -16,8 +16,6 @@
    */
   public class Leader extends InlineArea {
   
  -    // pattern, length min opt max
  -
       // in the case of use content or dots this is replaced
       // with the set of inline areas
       // if space replaced with a space
  @@ -77,3 +75,4 @@
           renderer.renderLeader(this);
       }
   }
  +
  
  
  
  1.6       +3 -3      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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Viewport.java     6 Nov 2002 15:07:04 -0000       1.5
  +++ Viewport.java     14 Nov 2002 11:13:33 -0000      1.6
  @@ -101,7 +101,7 @@
               out.writeFloat((float) contentPosition.getHeight());
           }
           out.writeBoolean(clip);
  -        //out.writeObject(props);
  +        out.writeObject(props);
           out.writeObject(content);
       }
   
  @@ -114,7 +114,7 @@
                                                       in.readFloat());
           }
           clip = in.readBoolean();
  -        //props = (HashMap) in.readObject();
  +        props = (HashMap) in.readObject();
           content = (Area) in.readObject();
       }
   
  
  
  
  1.8       +32 -2     xml-fop/src/org/apache/fop/area/inline/Word.java
  
  Index: Word.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/area/inline/Word.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Word.java 18 Sep 2002 14:04:32 -0000      1.7
  +++ Word.java 14 Nov 2002 11:13:33 -0000      1.8
  @@ -10,29 +10,59 @@
   import org.apache.fop.render.Renderer;
   
   public class Word extends InlineArea {
  -    // character info: font, char spacing, colour, baseline
       /**
        * The word for this word area.
        */
       protected String word;
       private int iWSadjust = 0;
   
  +    /**
  +     * Create a word area.
  +     */
  +    public Word() {
  +    }
  +
  +    /**
  +     * Render the word to the renderer.
  +     *
  +     * @param renderer the renderer to render this word
  +     */
       public void render(Renderer renderer) {
           renderer.renderWord(this);
       }
   
  +    /**
  +     * Set the word.
  +     *
  +     * @param w the word string
  +     */
       public void setWord(String w) {
           word = w;
       }
   
  +    /**
  +     * Get the word string.
  +     *
  +     * @return the word string
  +     */
       public String getWord() {
           return word;
       }
   
  +    /**
  +     * Get word space adjust.
  +     *
  +     * @return the word space adjustment
  +     */
       public int getWSadjust() {
           return iWSadjust;
       }
   
  +    /**
  +     * Set word space adjust.
  +     *
  +     * @param iWSadjust the word space adjustment
  +     */
       public void setWSadjust(int iWSadjust) {
           this.iWSadjust = iWSadjust;
       }
  
  
  

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

Reply via email to