You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ke...@apache.org on 2001/11/02 12:06:09 UTC

cvs commit: xml-fop/src/org/apache/fop/viewer PreviewDialog.java

keiron      01/11/02 03:06:09

  Modified:    src/org/apache/fop/configuration Configuration.java
                        ConfigurationParser.java FontInfo.java
               src/org/apache/fop/fo XMLObj.java
               src/org/apache/fop/layout FontInfo.java
               src/org/apache/fop/pdf PDFColor.java PDFDocument.java
                        PDFEncoding.java PDFFunction.java PDFPattern.java
                        PDFResources.java PDFShading.java PDFStream.java
                        PDFWArray.java
               src/org/apache/fop/render/mif FontSetup.java
               src/org/apache/fop/render/pdf FontReader.java FontSetup.java
               src/org/apache/fop/render/ps PSGraphics2D.java
                        PSRenderer.java
               src/org/apache/fop/render/txt TXTRenderer.java
               src/org/apache/fop/svg PDFGraphics2D.java SVGUserAgent.java
               src/org/apache/fop/tools/anttasks Compare.java
                        CompileXMLFiles.java Fop.java
               src/org/apache/fop/viewer PreviewDialog.java
  Log:
  updated a few hashtables and vectors
  
  Revision  Changes    Path
  1.7       +49 -65    xml-fop/src/org/apache/fop/configuration/Configuration.java
  
  Index: Configuration.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/configuration/Configuration.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Configuration.java	2001/07/30 20:29:18	1.6
  +++ Configuration.java	2001/11/02 11:06:07	1.7
  @@ -1,5 +1,5 @@
   /*
  - * $Id: Configuration.java,v 1.6 2001/07/30 20:29:18 tore Exp $
  + * $Id: Configuration.java,v 1.7 2001/11/02 11:06:07 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -7,9 +7,9 @@
   
   package org.apache.fop.configuration;
   
  -import java.util.Vector;
  -import java.util.Hashtable;
  -import java.util.Enumeration;
  +import java.util.ArrayList;
  +import java.util.HashMap;
  +import java.util.Iterator;
   import org.apache.fop.messaging.MessageHandler;
   
   /**
  @@ -31,18 +31,17 @@
       /**
        * stores the configuration information
        */
  -    private static Hashtable standardConfiguration = new Hashtable(30);
  -    ;
  -    private static Hashtable pdfConfiguration = new Hashtable(20);
  -    private static Hashtable awtConfiguration = new Hashtable(20);
  +    private static HashMap standardConfiguration = new HashMap(30);
  +    private static HashMap pdfConfiguration = new HashMap(20);
  +    private static HashMap awtConfiguration = new HashMap(20);
   
       /**
  -     * contains a Hashtable of existing Hashtables
  +     * contains a HashMap of existing HashMaps
        */
  -    private static Hashtable configuration = new Hashtable(3);
  +    private static HashMap configuration = new HashMap(3);
   
       /**
  -     * loads the configuration types into the configuration Hashtable
  +     * loads the configuration types into the configuration HashMap
        */
       static {
           configuration.put("standard", standardConfiguration);
  @@ -50,7 +49,7 @@
           configuration.put("awt", awtConfiguration);
       }
   
  -    public static Hashtable getConfiguration() {
  +    public static HashMap getConfiguration() {
           return configuration;
       }
   
  @@ -76,8 +75,6 @@
           }
       }
   
  -    ;
  -
       /**
        * convenience methods to access strings values in the configuration
        * @param key a string containing the key value for the configuration value
  @@ -94,8 +91,6 @@
           }
       }
   
  -    ;
  -
       /**
        * convenience methods to access int values in the configuration
        * @param key a string containing the key value for the configuration value
  @@ -112,8 +107,6 @@
           }
       }
   
  -    ;
  -
       /**
        * convenience methods to access boolean values in the configuration
        * @param key a string containing the key value for the configuration value
  @@ -132,45 +125,38 @@
           }
       }
   
  -    ;
  -
       /**
        * convenience methods to access list values in the configuration
        * @param key a string containing the key value for the configuration value
        * role detemines the configuration target
  -     * @return Vector a Vector containing the values
  +     * @return ArrayList a ArrayList containing the values
        * null   if the key is not defined.
        */
  -    public static Vector getListValue(String key, int role) {
  +    public static ArrayList getListValue(String key, int role) {
           Object obj = Configuration.getValue(key, role);
  -        if (obj instanceof Vector) {
  -            return (Vector)obj;
  +        if (obj instanceof ArrayList) {
  +            return (ArrayList)obj;
           } else {
               return null;
           }
       }
   
  -    ;
  -
       /**
  -     * convenience methods to access map/hashtable values in the configuration
  +     * convenience methods to access hashmap values in the configuration
        * @param key a string containing the key value for the configuration value
        * role detemines the configuration target
  -     * @return Hashtable a Hashtable containing the values
  +     * @return HashMap a HashMap containing the values
        * null   if the key is not defined.
        */
  -    public static Hashtable getHashtableValue(String key, int role) {
  +    public static HashMap getHashMapValue(String key, int role) {
           Object obj = Configuration.getValue(key, role);
  -        if (obj instanceof Hashtable) {
  -            return (Hashtable)obj;
  +        if (obj instanceof HashMap) {
  +            return (HashMap)obj;
           } else {
               return null;
           }
       }
   
  -    ;
  -
  -
       /**
        * convenience method which retrieves some configuration information
        * from the standard configuration
  @@ -221,22 +207,22 @@
        * convenience methods to access list values in the standard configuration
        *
        * @param key a string containing the key value for the configuration value
  -     * @return Vector a Vector containing the values
  +     * @return ArrayList a ArrayList containing the values
        * null   if the key is not defined.
        */
  -    public static Vector getListValue(String key) {
  +    public static ArrayList getListValue(String key) {
           return Configuration.getListValue(key, Configuration.STANDARD);
       }
   
       /**
  -     * convenience methods to access map/hashtable values in the standard configuration
  +     * convenience methods to access hashmap values in the standard configuration
        *
        * @param key a string containing the key value for the configuration value
  -     * @return Hashtable a Hashtable containing the values
  +     * @return HashMap a HashMap containing the values
        * null   if the key is not defined.
        */
  -    public static Hashtable getHashtableValue(String key) {
  -        return Configuration.getHashtableValue(key, Configuration.STANDARD);
  +    public static HashMap getHashMapValue(String key) {
  +        return Configuration.getHashMapValue(key, Configuration.STANDARD);
       }
   
   
  @@ -244,11 +230,11 @@
        * method to access fonts values in the standard configuration
        *
        * @param key a string containing the key value for the configuration value
  -     * @return Hashtable a Hashtable containing the values
  +     * @return HashMap a HashMap containing the values
        * null   if the key is not defined.
        */
  -    public static Vector getFonts() {
  -        return (Vector)Configuration.getValue("fonts",
  +    public static ArrayList getFonts() {
  +        return (ArrayList)Configuration.getValue("fonts",
                                                 Configuration.STANDARD);
       }
   
  @@ -256,7 +242,7 @@
        * initializes this configuration
        * @param config contains the configuration information
        */
  -    public static void setup(int role, Hashtable config) {
  +    public static void setup(int role, HashMap config) {
           switch (role) {
           case Configuration.STANDARD:
               standardConfiguration = config;
  @@ -273,11 +259,11 @@
       }
   
       /**
  -     * adds information to the configuration map/hashtable in key,value form
  +     * adds information to the configuration hashmap in key,value form
        * @param key a string containing the key value for the configuration value
        * value the configuration information
        * role detemines the configuration target
  -     * @param value an Object containing the value; can be a String, a Vector or a Hashtable
  +     * @param value an Object containing the value; can be a String, a ArrayList or a HashMap
        */
       public static void put(String key, Object value, int role) {
           switch (role) {
  @@ -301,11 +287,11 @@
       ;
   
       /**
  -     * adds information to the standard configuration map/hashtable in key,value form
  +     * adds information to the standard configuration hashmap in key,value form
        * @param key a string containing the key value for the configuration value
        * value the configuration information
        * role detemines the configuration target
  -     * @param value an Object containing the value; can be a String, a Vector or a Hashtable
  +     * @param value an Object containing the value; can be a String, a ArrayList or a HashMap
        */
   
       public static void put(String key, Object value) {
  @@ -318,38 +304,36 @@
       public static void dumpConfiguration() {
           String key;
           Object value;
  -        Vector list;
  -        Hashtable map, configuration;
  -        Enumeration enum;
  +        ArrayList list;
  +        HashMap map, configuration;
           String tmp;
           System.out.println("Dumping configuration: ");
  -        Hashtable[] configs = {
  +        HashMap[] configs = {
               standardConfiguration, pdfConfiguration, awtConfiguration
           };
           for (int i = 0; i < configs.length; i++) {
               MessageHandler.logln("----------------------");
               configuration = configs[i];
  -            Enumeration enumeration = configuration.keys();
  -            while (enumeration.hasMoreElements()) {
  -                key = (String)enumeration.nextElement();
  +            Iterator iterator = configuration.keySet().iterator();
  +            while (iterator.hasNext()) {
  +                key = (String)iterator.next();
                   MessageHandler.logln("key: " + key);
                   value = configuration.get(key);
                   if (value instanceof String) {
                       MessageHandler.logln("   value: " + value);
  -                } else if (value instanceof Vector) {
  -                    list = (Vector)value;
  -                    enum = list.elements();
  +                } else if (value instanceof ArrayList) {
  +                    list = (ArrayList)value;
                       MessageHandler.log("   values: ");
  -                    while (enum.hasMoreElements()) {
  -                        MessageHandler.log(enum.nextElement() + " - ");
  +                    for (int count = 0; count < list.size(); count++) {
  +                        MessageHandler.log(list.get(count) + " - ");
                       }
                       MessageHandler.logln("");
  -                } else if (value instanceof Hashtable) {
  -                    map = (Hashtable)value;
  -                    enum = map.keys();
  +                } else if (value instanceof HashMap) {
  +                    map = (HashMap)value;
  +                    Iterator iter = map.keySet().iterator();
                       MessageHandler.log("   values: ");
  -                    while (enum.hasMoreElements()) {
  -                        tmp = (String)enum.nextElement();
  +                    while (iter.hasNext()) {
  +                        tmp = (String)iter.next();
                           MessageHandler.log(" " + tmp + ":" + map.get(tmp));
                       }
                       MessageHandler.logln("");
  
  
  
  1.10      +21 -22    xml-fop/src/org/apache/fop/configuration/ConfigurationParser.java
  
  Index: ConfigurationParser.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/configuration/ConfigurationParser.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ConfigurationParser.java	2001/07/30 20:29:18	1.9
  +++ ConfigurationParser.java	2001/11/02 11:06:07	1.10
  @@ -1,5 +1,5 @@
   /*
  - * $Id: ConfigurationParser.java,v 1.9 2001/07/30 20:29:18 tore Exp $
  + * $Id: ConfigurationParser.java,v 1.10 2001/11/02 11:06:07 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -14,13 +14,12 @@
   import org.xml.sax.Locator;
   
   // java
  -import java.util.Hashtable;
  -import java.util.Vector;
  +import java.util.HashMap;
  +import java.util.ArrayList;
   
   // fop
   import org.apache.fop.messaging.MessageHandler;
   
  -
   /**
    * SAX2 Handler which retrieves the configuration information and stores them in Configuration.
    * Normally this class doesn't need to be accessed directly.
  @@ -45,12 +44,12 @@
       private int datatype = -1;
   
       // store the result configuration
  -    private static Hashtable configuration;
  -    private static Hashtable activeConfiguration;
  +    private static HashMap configuration;
  +    private static HashMap activeConfiguration;
   
       // stores key for new config entry
       private String key = "";
  -    private Vector keyStack = new Vector();
  +    private ArrayList keyStack = new ArrayList();
   
       // stores string value
       private String value = "";
  @@ -59,10 +58,10 @@
       private String subkey = "";
   
       // stores list value
  -    private Vector list = new Vector(15);
  +    private ArrayList list = new ArrayList(15);
   
       // stores hashtable value
  -    private Hashtable map = new Hashtable(15);
  +    private HashMap map = new HashMap(15);
   
       /**
        * locator for line number information
  @@ -75,7 +74,7 @@
       private String role = "standard";
   
       // stores fonts
  -    private Vector fontList = null;
  +    private ArrayList fontList = null;
   
       // stores information on one font
       private FontInfo fontInfo = null;
  @@ -86,7 +85,7 @@
       // information on a font
       private String fontName, metricsFile, embedFile, kerningAsString;
       private boolean kerning;
  -    private Vector fontTriplets;
  +    private ArrayList fontTriplets;
   
       // information on a font triplet
       private String fontTripletName, weight, style;
  @@ -125,7 +124,7 @@
               }
           } else if (localName.equals("configuration")) {}
           else if (localName.equals("fonts")) {    // list of fonts starts
  -            fontList = new Vector(10);
  +            fontList = new ArrayList(10);
           } else if (localName.equals("font")) {
               kerningAsString = attributes.getValue("kerning");
               if (kerningAsString.equalsIgnoreCase("yes")) {
  @@ -136,13 +135,13 @@
               metricsFile = attributes.getValue("metrics-file");
               embedFile = attributes.getValue("embed-file");
               fontName = attributes.getValue("name");
  -            fontTriplets = new Vector(5);
  +            fontTriplets = new ArrayList(5);
           } else if (localName.equals("font-triplet")) {
               fontTripletName = attributes.getValue("name");
               weight = attributes.getValue("weight");
               style = attributes.getValue("style");
               fontTriplet = new FontTriplet(fontTripletName, weight, style);
  -            fontTriplets.addElement(fontTriplet);
  +            fontTriplets.add(fontTriplet);
           } else {
               // to make sure that user knows about false tag
               MessageHandler.errorln("Unknown tag in configuration file: "
  @@ -168,10 +167,10 @@
               status = OUT;
               role = "standard";
               if (keyStack.size() > 0) {
  -                keyStack.removeElementAt(keyStack.size() - 1);
  +                keyStack.remove(keyStack.size() - 1);
               }
               if (keyStack.size() > 0) {
  -                key = (String)keyStack.elementAt(keyStack.size() - 1);
  +                key = (String)keyStack.get(keyStack.size() - 1);
               } else {
                   key = "";
               }
  @@ -180,17 +179,17 @@
               map.put(subkey, value);
               status -= IN_SUBENTRY;
               if (keyStack.size() > 0) {
  -                keyStack.removeElementAt(keyStack.size() - 1);
  +                keyStack.remove(keyStack.size() - 1);
               }
               if (keyStack.size() > 0) {
  -                key = (String)keyStack.elementAt(keyStack.size() - 1);
  +                key = (String)keyStack.get(keyStack.size() - 1);
               } else {
                   key = "";
               }
               value = "";
           } else if (localName.equals("key")) {
               status -= IN_KEY;
  -            keyStack.addElement(key);
  +            keyStack.add(key);
           } else if (localName.equals("list")) {
               status -= IN_LIST;
               value = "";
  @@ -201,7 +200,7 @@
           } else if (localName.equals("font")) {
               fontInfo = new FontInfo(fontName, metricsFile, kerning,
                                       fontTriplets, embedFile);
  -            fontList.addElement(fontInfo);
  +            fontList.add(fontInfo);
               fontTriplets = null;
               metricsFile = null;
               embedFile = null;
  @@ -230,7 +229,7 @@
               datatype = STRING;
               break;
           case IN_LIST + IN_VALUE:
  -            list.addElement(text);
  +            list.add(text);
               datatype = LIST;
               break;
           case IN_LIST + IN_SUBENTRY + IN_VALUE:
  @@ -248,7 +247,7 @@
        * @param value a string containing the value for the configuration
        */
       private void store(String role, String key, Object value) {
  -        activeConfiguration = (Hashtable)configuration.get(role);
  +        activeConfiguration = (HashMap)configuration.get(role);
           if (activeConfiguration != null) {
               activeConfiguration.put(key, value);
           } else {
  
  
  
  1.3       +5 -5      xml-fop/src/org/apache/fop/configuration/FontInfo.java
  
  Index: FontInfo.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/configuration/FontInfo.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FontInfo.java	2001/07/30 20:29:19	1.2
  +++ FontInfo.java	2001/11/02 11:06:07	1.3
  @@ -1,5 +1,5 @@
   /*
  - * $Id: FontInfo.java,v 1.2 2001/07/30 20:29:19 tore Exp $
  + * $Id: FontInfo.java,v 1.3 2001/11/02 11:06:07 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -8,7 +8,7 @@
   
   package org.apache.fop.configuration;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   
   /**
    * FontInfo contains meta information on fonts (where is the metrics file etc.)
  @@ -17,10 +17,10 @@
   public class FontInfo {
       private String metricsFile, embedFile, name;
       private boolean kerning;
  -    private Vector fontTriplets;
  +    private ArrayList fontTriplets;
   
       public FontInfo(String name, String metricsFile, boolean kerning,
  -                    Vector fontTriplets, String embedFile) {
  +                    ArrayList fontTriplets, String embedFile) {
           this.name = name;
           this.metricsFile = metricsFile;
           this.embedFile = embedFile;
  @@ -40,7 +40,7 @@
           return kerning;
       }
   
  -    public Vector getFontTriplets() {
  +    public ArrayList getFontTriplets() {
           return fontTriplets;
       }
   
  
  
  
  1.3       +6 -7      xml-fop/src/org/apache/fop/fo/XMLObj.java
  
  Index: XMLObj.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/XMLObj.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XMLObj.java	2001/10/08 09:56:38	1.2
  +++ XMLObj.java	2001/11/02 11:06:07	1.3
  @@ -1,5 +1,5 @@
   /*
  - * $Id: XMLObj.java,v 1.2 2001/10/08 09:56:38 keiron Exp $
  + * $Id: XMLObj.java,v 1.3 2001/11/02 11:06:07 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -17,6 +17,7 @@
   
   import org.w3c.dom.*;
   import org.xml.sax.Attributes;
  +import javax.xml.parsers.DocumentBuilderFactory;
   
   import java.util.*;
   
  @@ -105,12 +106,10 @@
   
           element = null;
           try {
  -            // DOMImplementation impl = javax.xml.parsers.DocumentBuilderFactory.newInstance().newDocumentBuilder().getDOMImplementation();
  -            // String ns = GraphElementMapping.URI;
  -            // doc = impl.createDocument(ns, "graph", null);
  -            doc =
  -                javax.xml.parsers.DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
  -            Element el = doc.createElement("graph");
  +            DocumentBuilderFactory fact = DocumentBuilderFactory.newInstance();
  +            fact.setNamespaceAware(true);
  +            doc = fact.newDocumentBuilder().newDocument();
  +            Element el = doc.createElement(tagName);
               doc.appendChild(el);
   
               element = doc.getDocumentElement();
  
  
  
  1.13      +10 -10    xml-fop/src/org/apache/fop/layout/FontInfo.java
  
  Index: FontInfo.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/FontInfo.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- FontInfo.java	2001/09/11 10:04:25	1.12
  +++ FontInfo.java	2001/11/02 11:06:07	1.13
  @@ -1,5 +1,5 @@
   /*
  - * $Id: FontInfo.java,v 1.12 2001/09/11 10:04:25 keiron Exp $
  + * $Id: FontInfo.java,v 1.13 2001/11/02 11:06:07 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -7,21 +7,21 @@
   
   package org.apache.fop.layout;
   
  -import java.util.Hashtable;
  +import java.util.HashMap;
   import org.apache.fop.messaging.MessageHandler;
   import java.util.Enumeration;
   
   import org.apache.fop.apps.FOPException;
   
   public class FontInfo {
  -    Hashtable usedFonts;
  -    Hashtable triplets;    // look up a font-triplet to find a font-name
  -    Hashtable fonts;    // look up a font-name to get a font (that implements FontMetric at least)
  +    HashMap usedFonts;
  +    HashMap triplets;    // look up a font-triplet to find a font-name
  +    HashMap fonts;    // look up a font-name to get a font (that implements FontMetric at least)
   
       public FontInfo() {
  -        this.triplets = new Hashtable();
  -        this.fonts = new Hashtable();
  -        this.usedFonts = new Hashtable();
  +        this.triplets = new HashMap();
  +        this.fonts = new HashMap();
  +        this.usedFonts = new HashMap();
       }
   
       public void addFontProperties(String name, String family, String style,
  @@ -94,11 +94,11 @@
           return family + "," + style + "," + weight;
       }
   
  -    public Hashtable getFonts() {
  +    public HashMap getFonts() {
           return this.fonts;
       }
   
  -    public Hashtable getUsedFonts() {
  +    public HashMap getUsedFonts() {
           return this.usedFonts;
       }
   
  
  
  
  1.11      +12 -12    xml-fop/src/org/apache/fop/pdf/PDFColor.java
  
  Index: PDFColor.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/pdf/PDFColor.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- PDFColor.java	2001/07/30 20:29:29	1.10
  +++ PDFColor.java	2001/11/02 11:06:07	1.11
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PDFColor.java,v 1.10 2001/07/30 20:29:29 tore Exp $
  + * $Id: PDFColor.java,v 1.11 2001/11/02 11:06:07 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -8,7 +8,7 @@
   package org.apache.fop.pdf;
   
   // Java
  -import java.util.Vector;
  +import java.util.ArrayList;
   import java.io.IOException;
   import java.io.PrintWriter;
   
  @@ -65,21 +65,21 @@
       }
   
   
  -    public Vector getVector() {    // return a vector representation of the color
  +    public ArrayList getVector() {    // return a vector representation of the color
           // in the appropriate colorspace.
  -        Vector theColorVector = new Vector();
  +        ArrayList theColorVector = new ArrayList();
           if (this.colorSpace.getColorSpace() == ColorSpace.DEVICE_RGB) {    // RGB
  -            theColorVector.addElement(new Double(this.red));
  -            theColorVector.addElement(new Double(this.green));
  -            theColorVector.addElement(new Double(this.blue));
  +            theColorVector.add(new Double(this.red));
  +            theColorVector.add(new Double(this.green));
  +            theColorVector.add(new Double(this.blue));
           } else if (this.colorSpace.getColorSpace()
                      == ColorSpace.DEVICE_CMYK) {    // CMYK
  -            theColorVector.addElement(new Double(this.cyan));
  -            theColorVector.addElement(new Double(this.magenta));
  -            theColorVector.addElement(new Double(this.yellow));
  -            theColorVector.addElement(new Double(this.black));
  +            theColorVector.add(new Double(this.cyan));
  +            theColorVector.add(new Double(this.magenta));
  +            theColorVector.add(new Double(this.yellow));
  +            theColorVector.add(new Double(this.black));
           } else {                                   // GRAY
  -            theColorVector.addElement(new Double(this.black));
  +            theColorVector.add(new Double(this.black));
           }
           return (theColorVector);
       }
  
  
  
  1.32      +119 -122  xml-fop/src/org/apache/fop/pdf/PDFDocument.java
  
  Index: PDFDocument.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/pdf/PDFDocument.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- PDFDocument.java	2001/10/26 09:27:00	1.31
  +++ PDFDocument.java	2001/11/02 11:06:07	1.32
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PDFDocument.java,v 1.31 2001/10/26 09:27:00 keiron Exp $
  + * $Id: PDFDocument.java,v 1.32 2001/11/02 11:06:07 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -27,7 +27,7 @@
   // Java
   import java.io.IOException;
   import java.io.OutputStream;
  -import java.util.Vector;
  +import java.util.ArrayList;
   import java.util.Hashtable;
   import java.util.Enumeration;
   import java.awt.Rectangle;
  @@ -71,10 +71,10 @@
       /**
        * the character position of each object
        */
  -    protected Vector location = new Vector();
  +    protected ArrayList location = new ArrayList();
   
       /** List of objects to write in the trailer */
  -    private Vector trailerObjects = new Vector();
  +    private ArrayList trailerObjects = new ArrayList();
   
       /**
        * the counter for object numbering
  @@ -84,7 +84,7 @@
       /**
        * the objects themselves
        */
  -    protected Vector objects = new Vector();
  +    protected ArrayList objects = new ArrayList();
   
       /**
        * character position of xref table
  @@ -141,7 +141,7 @@
       /**
        * the XObjects
        */
  -    protected Vector xObjects = new Vector();
  +    protected ArrayList xObjects = new ArrayList();
   
       /**
        * the XObjects Map.
  @@ -152,7 +152,7 @@
       /**
        * the objects themselves
        */
  -    protected Vector pendingLinks = null;
  +    protected ArrayList pendingLinks = null;
   
       /**
        * creates an empty PDF document <p>
  @@ -238,20 +238,20 @@
           PDFInfo pdfInfo = new PDFInfo(++this.objectcount);
           // set the default producer
           pdfInfo.setProducer(org.apache.fop.apps.Version.getVersion());
  -        this.objects.addElement(pdfInfo);
  +        this.objects.add(pdfInfo);
           return pdfInfo;
       }
   
       /**
        * Make a Type 0 sampled function
        *
  -     * @param theDomain Vector objects of Double objects.
  +     * @param theDomain ArrayList objects of Double objects.
        * This is the domain of the function.
        * See page 264 of the PDF 1.3 Spec.
  -     * @param theRange Vector objects of Double objects.
  +     * @param theRange ArrayList objects of Double objects.
        * This is the Range of the function.
        * See page 264 of the PDF 1.3 Spec.
  -     * @param theSize A Vector object of Integer objects.
  +     * @param theSize A ArrayList object of Integer objects.
        * This is the number of samples in each input dimension.
        * I can't imagine there being more or less than two input dimensions,
        * so maybe this should be an array of length 2.
  @@ -266,14 +266,14 @@
        * This attribute is optional.
        *
        * See page 265 in the PDF 1.3 spec.
  -     * @param theEncode Vector objects of Double objects.
  +     * @param theEncode ArrayList objects of Double objects.
        * This is the linear mapping of input values intop the domain
        * of the function's sample table. Default is hard to represent in
        * ascii, but basically [0 (Size0 1) 0 (Size1 1)...].
        * This attribute is optional.
        *
        * See page 265 in the PDF 1.3 spec.
  -     * @param theDecode Vector objects of Double objects.
  +     * @param theDecode ArrayList objects of Double objects.
        * This is a linear mapping of sample values into the range.
        * The default is just the range.
        *
  @@ -295,12 +295,12 @@
        * @param theFunctionType This is the type of function (0,2,3, or 4).
        * It should be 0 as this is the constructor for sampled functions.
        */
  -    public PDFFunction makeFunction(int theFunctionType, Vector theDomain,
  -                                    Vector theRange, Vector theSize,
  +    public PDFFunction makeFunction(int theFunctionType, ArrayList theDomain,
  +                                    ArrayList theRange, ArrayList theSize,
                                       int theBitsPerSample, int theOrder,
  -                                    Vector theEncode, Vector theDecode,
  +                                    ArrayList theEncode, ArrayList theDecode,
                                       StringBuffer theFunctionDataStream,
  -                                    Vector theFilter) {    // Type 0 function
  +                                    ArrayList theFilter) {    // Type 0 function
           PDFFunction function = new PDFFunction(++this.objectcount,
                                                  theFunctionType, theDomain,
                                                  theRange, theSize,
  @@ -309,7 +309,7 @@
                                                  theFunctionDataStream,
                                                  theFilter);
   
  -        this.objects.addElement(function);
  +        this.objects.add(function);
           return (function);
       }
   
  @@ -317,10 +317,10 @@
        * make a type Exponential interpolation function
        * (for shading usually)
        *
  -     * @param theDomain Vector objects of Double objects.
  +     * @param theDomain ArrayList objects of Double objects.
        * This is the domain of the function.
        * See page 264 of the PDF 1.3 Spec.
  -     * @param theRange Vector of Doubles that is the Range of the function.
  +     * @param theRange ArrayList of Doubles that is the Range of the function.
        * See page 264 of the PDF 1.3 Spec.
        * @param theCZero This is a vector of Double objects which defines the function result
        * when x=0.
  @@ -338,29 +338,29 @@
        * PDF Spec page 268
        * @param theFunctionType The type of the function, which should be 2.
        */
  -    public PDFFunction makeFunction(int theFunctionType, Vector theDomain,
  -                                    Vector theRange, Vector theCZero,
  -                                    Vector theCOne,
  +    public PDFFunction makeFunction(int theFunctionType, ArrayList theDomain,
  +                                    ArrayList theRange, ArrayList theCZero,
  +                                    ArrayList theCOne,
                                       double theInterpolationExponentN) {    // type 2
           PDFFunction function = new PDFFunction(++this.objectcount,
                                                  theFunctionType, theDomain,
                                                  theRange, theCZero, theCOne,
                                                  theInterpolationExponentN);
   
  -        this.objects.addElement(function);
  +        this.objects.add(function);
           return (function);
       }
   
       /**
        * Make a Type 3 Stitching function
        *
  -     * @param theDomain Vector objects of Double objects.
  +     * @param theDomain ArrayList objects of Double objects.
        * This is the domain of the function.
        * See page 264 of the PDF 1.3 Spec.
  -     * @param theRange Vector objects of Double objects.
  +     * @param theRange ArrayList objects of Double objects.
        * This is the Range of the function.
        * See page 264 of the PDF 1.3 Spec.
  -     * @param theFunctions A Vector of the PDFFunction objects that the stitching function stitches.
  +     * @param theFunctions A ArrayList of the PDFFunction objects that the stitching function stitches.
        *
        * This attributed is required.
        * It is described on page 269 of the PDF spec.
  @@ -373,7 +373,7 @@
        *
        * This attributed is required.
        * It's described on page 269 of the PDF 1.3 spec.
  -     * @param theEncode Vector objects of Double objects.
  +     * @param theEncode ArrayList objects of Double objects.
        * This is the linear mapping of input values intop the domain
        * of the function's sample table. Default is hard to represent in
        * ascii, but basically [0 (Size0 1) 0 (Size1 1)...].
  @@ -383,17 +383,17 @@
        * @param theFunctionType This is the function type. It should be 3,
        * for a stitching function.
        */
  -    public PDFFunction makeFunction(int theFunctionType, Vector theDomain,
  -                                    Vector theRange, Vector theFunctions,
  -                                    Vector theBounds,
  -                                    Vector theEncode) {    // Type 3
  +    public PDFFunction makeFunction(int theFunctionType, ArrayList theDomain,
  +                                    ArrayList theRange, ArrayList theFunctions,
  +                                    ArrayList theBounds,
  +                                    ArrayList theEncode) {    // Type 3
   
           PDFFunction function = new PDFFunction(++this.objectcount,
                                                  theFunctionType, theDomain,
                                                  theRange, theFunctions,
                                                  theBounds, theEncode);
   
  -        this.objects.addElement(function);
  +        this.objects.add(function);
           return (function);
       }
   
  @@ -407,14 +407,14 @@
        * @param theFunctionDataStream
        */
       public PDFFunction makeFunction(int theNumber, int theFunctionType,
  -                                    Vector theDomain, Vector theRange,
  +                                    ArrayList theDomain, ArrayList theRange,
                                       StringBuffer theFunctionDataStream) {    // Type 4
           PDFFunction function = new PDFFunction(++this.objectcount,
                                                  theFunctionType, theDomain,
                                                  theRange,
                                                  theFunctionDataStream);
   
  -        this.objects.addElement(function);
  +        this.objects.add(function);
           return (function);
   
       }
  @@ -428,13 +428,13 @@
        * @param theBackground An array of color components appropriate to the
        * colorspace key specifying a single color value.
        * This key is used by the f operator buy ignored by the sh operator.
  -     * @param theBBox Vector of double's representing a rectangle
  +     * @param theBBox ArrayList of double's representing a rectangle
        * in the coordinate space that is current at the
        * time of shading is imaged. Temporary clipping
        * boundary.
        * @param theAntiAlias Whether or not to anti-alias.
        * @param theDomain Optional vector of Doubles specifying the domain.
  -     * @param theMatrix Vector of Doubles specifying the matrix.
  +     * @param theMatrix ArrayList of Doubles specifying the matrix.
        * If it's a pattern, then the matrix maps it to pattern space.
        * If it's a shading, then it maps it to current user space.
        * It's optional, the default is the identity matrix
  @@ -442,9 +442,9 @@
        */
       public PDFShading makeShading(int theShadingType,
                                     ColorSpace theColorSpace,
  -                                  Vector theBackground, Vector theBBox,
  -                                  boolean theAntiAlias, Vector theDomain,
  -                                  Vector theMatrix,
  +                                  ArrayList theBackground, ArrayList theBBox,
  +                                  boolean theAntiAlias, ArrayList theDomain,
  +                                  ArrayList theMatrix,
                                     PDFFunction theFunction) {    // make Shading of Type 1
           String theShadingName = new String("Sh" + (++this.shadingCount));
   
  @@ -453,7 +453,7 @@
                                               theColorSpace, theBackground,
                                               theBBox, theAntiAlias, theDomain,
                                               theMatrix, theFunction);
  -        this.objects.addElement(shading);
  +        this.objects.add(shading);
   
           // add this shading to resources
           this.resources.addShading(shading);
  @@ -469,23 +469,23 @@
        * @param theBackground theBackground An array of color components appropriate to the
        * colorspace key specifying a single color value.
        * This key is used by the f operator buy ignored by the sh operator.
  -     * @param theBBox Vector of double's representing a rectangle
  +     * @param theBBox ArrayList of double's representing a rectangle
        * in the coordinate space that is current at the
        * time of shading is imaged. Temporary clipping
        * boundary.
        * @param theAntiAlias Default is false
  -     * @param theCoords Vector of four (type 2) or 6 (type 3) Double
  -     * @param theDomain Vector of Doubles specifying the domain
  +     * @param theCoords ArrayList of four (type 2) or 6 (type 3) Double
  +     * @param theDomain ArrayList of Doubles specifying the domain
        * @param theFunction the Stitching (PDFfunction type 3) function, even if it's stitching a single function
  -     * @param theExtend Vector of Booleans of whether to extend teh start and end colors past the start and end points
  +     * @param theExtend ArrayList of Booleans of whether to extend teh start and end colors past the start and end points
        * The default is [false, false]
        */
       public PDFShading makeShading(int theShadingType,
                                     ColorSpace theColorSpace,
  -                                  Vector theBackground, Vector theBBox,
  -                                  boolean theAntiAlias, Vector theCoords,
  -                                  Vector theDomain, PDFFunction theFunction,
  -                                  Vector theExtend) {    // make Shading of Type 2 or 3
  +                                  ArrayList theBackground, ArrayList theBBox,
  +                                  boolean theAntiAlias, ArrayList theCoords,
  +                                  ArrayList theDomain, PDFFunction theFunction,
  +                                  ArrayList theExtend) {    // make Shading of Type 2 or 3
           String theShadingName = new String("Sh" + (++this.shadingCount));
   
           PDFShading shading = new PDFShading(++this.objectcount,
  @@ -497,7 +497,7 @@
   
           this.resources.addShading(shading);
   
  -        this.objects.addElement(shading);
  +        this.objects.add(shading);
           return (shading);
       }
   
  @@ -512,7 +512,7 @@
        * @param theBackground theBackground An array of color components appropriate to the
        * colorspace key specifying a single color value.
        * This key is used by the f operator buy ignored by the sh operator.
  -     * @param theBBox Vector of double's representing a rectangle
  +     * @param theBBox ArrayList of double's representing a rectangle
        * in the coordinate space that is current at the
        * time of shading is imaged. Temporary clipping
        * boundary.
  @@ -520,16 +520,16 @@
        * @param theBitsPerCoordinate 1,2,4,8,12,16,24 or 32.
        * @param theBitsPerComponent 1,2,4,8,12, and 16
        * @param theBitsPerFlag 2,4,8.
  -     * @param theDecode Vector of Doubles see PDF 1.3 spec pages 303 to 312.
  +     * @param theDecode ArrayList of Doubles see PDF 1.3 spec pages 303 to 312.
        * @param theFunction the PDFFunction
        */
       public PDFShading makeShading(int theShadingType,
                                     ColorSpace theColorSpace,
  -                                  Vector theBackground, Vector theBBox,
  +                                  ArrayList theBackground, ArrayList theBBox,
                                     boolean theAntiAlias,
                                     int theBitsPerCoordinate,
                                     int theBitsPerComponent,
  -                                  int theBitsPerFlag, Vector theDecode,
  +                                  int theBitsPerFlag, ArrayList theDecode,
                                     PDFFunction theFunction) {    // make Shading of type 4,6 or 7
           String theShadingName = new String("Sh" + (++this.shadingCount));
   
  @@ -544,7 +544,7 @@
   
           this.resources.addShading(shading);
   
  -        this.objects.addElement(shading);
  +        this.objects.add(shading);
           return (shading);
       }
   
  @@ -557,23 +557,23 @@
        * @param theBackground theBackground An array of color components appropriate to the
        * colorspace key specifying a single color value.
        * This key is used by the f operator buy ignored by the sh operator.
  -     * @param theBBox Vector of double's representing a rectangle
  +     * @param theBBox ArrayList of double's representing a rectangle
        * in the coordinate space that is current at the
        * time of shading is imaged. Temporary clipping
        * boundary.
        * @param theAntiAlias Default is false
        * @param theBitsPerCoordinate 1,2,4,8,12,16, 24, or 32
        * @param theBitsPerComponent 1,2,4,8,12,24,32
  -     * @param theDecode Vector of Doubles. See page 305 in PDF 1.3 spec.
  +     * @param theDecode ArrayList of Doubles. See page 305 in PDF 1.3 spec.
        * @param theVerticesPerRow number of vertices in each "row" of the lattice.
        * @param theFunction The PDFFunction that's mapped on to this shape
        */
       public PDFShading makeShading(int theShadingType,
                                     ColorSpace theColorSpace,
  -                                  Vector theBackground, Vector theBBox,
  +                                  ArrayList theBackground, ArrayList theBBox,
                                     boolean theAntiAlias,
                                     int theBitsPerCoordinate,
  -                                  int theBitsPerComponent, Vector theDecode,
  +                                  int theBitsPerComponent, ArrayList theDecode,
                                     int theVerticesPerRow,
                                     PDFFunction theFunction) {    // make shading of Type 5
           String theShadingName = new String("Sh" + (++this.shadingCount));
  @@ -588,7 +588,7 @@
   
           this.resources.addShading(shading);
   
  -        this.objects.addElement(shading);
  +        this.objects.add(shading);
   
           return (shading);
       }
  @@ -600,17 +600,17 @@
        * @param theResources the resources associated with this pattern
        * @param thePaintType 1 or 2, colored or uncolored.
        * @param theTilingType 1, 2, or 3, constant spacing, no distortion, or faster tiling
  -     * @param theBBox Vector of Doubles: The pattern cell bounding box
  +     * @param theBBox ArrayList of Doubles: The pattern cell bounding box
        * @param theXStep horizontal spacing
        * @param theYStep vertical spacing
  -     * @param theMatrix Optional Vector of Doubles transformation matrix
  +     * @param theMatrix Optional ArrayList of Doubles transformation matrix
        * @param theXUID Optional vector of Integers that uniquely identify the pattern
        * @param thePatternDataStream The stream of pattern data to be tiled.
        */
       public PDFPattern makePattern(int thePatternType,    // 1
                                     PDFResources theResources, int thePaintType, int theTilingType,
  -                                  Vector theBBox, double theXStep, double theYStep, Vector theMatrix,
  -                                  Vector theXUID, StringBuffer thePatternDataStream) {
  +                                  ArrayList theBBox, double theXStep, double theYStep, ArrayList theMatrix,
  +                                  ArrayList theXUID, StringBuffer thePatternDataStream) {
           String thePatternName = new String("Pa" + (++this.patternCount));
           // int theNumber, String thePatternName,
           // PDFResources theResources
  @@ -622,7 +622,7 @@
                                               thePatternDataStream);
   
           this.resources.addPattern(pattern);
  -        this.objects.addElement(pattern);
  +        this.objects.add(pattern);
   
           return (pattern);
       }
  @@ -634,11 +634,11 @@
        * @param theShading the PDF Shading object that comprises this pattern
        * @param theXUID optional:the extended unique Identifier if used.
        * @param theExtGState optional: the extended graphics state, if used.
  -     * @param theMatrix Optional:Vector of Doubles that specify the matrix.
  +     * @param theMatrix Optional:ArrayList of Doubles that specify the matrix.
        */
       public PDFPattern makePattern(int thePatternType, PDFShading theShading,
  -                                  Vector theXUID, StringBuffer theExtGState,
  -                                  Vector theMatrix) {
  +                                  ArrayList theXUID, StringBuffer theExtGState,
  +                                  ArrayList theMatrix) {
           String thePatternName = new String("Pa" + (++this.patternCount));
   
           PDFPattern pattern = new PDFPattern(++this.objectcount,
  @@ -646,7 +646,7 @@
                                               theXUID, theExtGState, theMatrix);
   
           this.resources.addPattern(pattern);
  -        this.objects.addElement(pattern);
  +        this.objects.add(pattern);
   
           return (pattern);
       }
  @@ -662,17 +662,17 @@
   
       public PDFPattern createGradient(boolean radial,
                                        ColorSpace theColorspace,
  -                                     Vector theColors, Vector theBounds,
  -                                     Vector theCoords) {
  +                                     ArrayList theColors, ArrayList theBounds,
  +                                     ArrayList theCoords) {
           PDFShading myShad;
           PDFFunction myfunky;
           PDFFunction myfunc;
  -        Vector theCzero;
  -        Vector theCone;
  +        ArrayList theCzero;
  +        ArrayList theCone;
           PDFPattern myPattern;
           ColorSpace theColorSpace;
           double interpolation = (double)1.000;
  -        Vector theFunctions = new Vector();
  +        ArrayList theFunctions = new ArrayList();
   
           int currentPosition;
           int lastPosition = theColors.size() - 1;
  @@ -685,8 +685,8 @@
           for (currentPosition = 0; currentPosition < lastPosition;
                   currentPosition++) {    // for every consecutive color pair
               PDFColor currentColor =
  -                (PDFColor)theColors.elementAt(currentPosition);
  -            PDFColor nextColor = (PDFColor)theColors.elementAt(currentPosition
  +                (PDFColor)theColors.get(currentPosition);
  +            PDFColor nextColor = (PDFColor)theColors.get(currentPosition
                                    + 1);
               // colorspace must be consistant
               if (this.colorspace.getColorSpace()
  @@ -702,7 +702,7 @@
               myfunc = this.makeFunction(2, null, null, theCzero, theCone,
                                          interpolation);
   
  -            theFunctions.addElement(myfunc);
  +            theFunctions.add(myfunc);
   
           }                               // end of for every consecutive color pair
   
  @@ -717,13 +717,13 @@
               } else {    // if the center x, center y, and radius specifiy
                   // the gradient, then assume the same center x, center y,
                   // and radius of zero for the other necessary component
  -                Vector newCoords = new Vector();
  -                newCoords.addElement(theCoords.elementAt(0));
  -                newCoords.addElement(theCoords.elementAt(1));
  -                newCoords.addElement(theCoords.elementAt(2));
  -                newCoords.addElement(theCoords.elementAt(0));
  -                newCoords.addElement(theCoords.elementAt(1));
  -                newCoords.addElement(new Double(0.0));
  +                ArrayList newCoords = new ArrayList();
  +                newCoords.add(theCoords.get(0));
  +                newCoords.add(theCoords.get(1));
  +                newCoords.add(theCoords.get(2));
  +                newCoords.add(theCoords.get(0));
  +                newCoords.add(theCoords.get(1));
  +                newCoords.add(new Double(0.0));
   
                   myShad = this.makeShading(3, this.colorspace, null, null,
                                             false, newCoords, null, myfunky,
  @@ -756,7 +756,7 @@
            */
           PDFEncoding encoding = new PDFEncoding(++this.objectcount,
                                                  encodingName);
  -        this.objects.addElement(encoding);
  +        this.objects.add(encoding);
           return encoding;
       }
   
  @@ -782,7 +782,7 @@
           if (descriptor == null) {
               PDFFont font = new PDFFont(++this.objectcount, fontname,
                                          PDFFont.TYPE1, basefont, encoding);
  -            this.objects.addElement(font);
  +            this.objects.add(font);
               return font;
           } else {
               byte subtype = PDFFont.TYPE1;
  @@ -804,7 +804,7 @@
                    * "Identity",
                    * 0));
                    * cmap.addContents();
  -                 * this.objects.addElement(cmap);
  +                 * this.objects.add(cmap);
                    */
                   font =
                       (PDFFontNonBase14)PDFFont.createFont(++this.objectcount,
  @@ -818,7 +818,7 @@
                                                            fontname, subtype,
                                                            basefont, encoding);
               }
  -            this.objects.addElement(font);
  +            this.objects.add(font);
   
               font.setDescriptor(pdfdesc);
   
  @@ -839,7 +839,7 @@
                                      cidMetrics.getDefaultWidth(),
                                      cidMetrics.getWidths(), sysInfo,
                                      (PDFCIDFontDescriptor)pdfdesc);
  -                this.objects.addElement(cidFont);
  +                this.objects.add(cidFont);
   
                   // ((PDFFontType0)font).setCMAP(cmap);
   
  @@ -885,7 +885,7 @@
                                            desc.getStemV(),
                                            desc.getItalicAngle());
           }
  -        this.objects.addElement(font);
  +        this.objects.add(font);
   
           // Check if the font is embeddable
           if (desc.isEmbeddable()) {
  @@ -893,7 +893,7 @@
               if (stream != null) {
                   this.objectcount++;
                   font.setFontFile(desc.getSubType(), stream);
  -                this.objects.addElement(stream);
  +                this.objects.add(stream);
               }
           }
           return font;
  @@ -906,7 +906,7 @@
       public PDFArray makeArray(int[] values) {
   
           PDFArray array = new PDFArray(++this.objectcount, values);
  -        this.objects.addElement(array);
  +        this.objects.add(array);
           return array;
       }
   
  @@ -920,8 +920,8 @@
           // else, create a new one
           xObject = new PDFXObject(++this.objectcount, ++this.xObjectCount,
                                    img);
  -        this.objects.addElement(xObject);
  -        this.xObjects.addElement(xObject);
  +        this.objects.add(xObject);
  +        this.xObjects.add(xObject);
           this.xObjectsMap.put(url, xObject);
           return xObjectCount;
       }
  @@ -947,8 +947,8 @@
                                      pagewidth, pageheight);
   
           if(pendingLinks != null) {
  -            for(Enumeration e = pendingLinks.elements(); e.hasMoreElements(); ) {
  -                PendingLink pl = (PendingLink)e.nextElement();
  +            for(int count = 0; count < pendingLinks.size(); count++) {
  +                PendingLink pl = (PendingLink)pendingLinks.get(count);
                   PDFGoTo gt = new PDFGoTo(++this.objectcount,
                                            page.referencePDF());
                   gt.setDestination(pl.dest);
  @@ -970,7 +970,7 @@
           }
   */
           /* add it to the list of objects */
  -        this.objects.addElement(page);
  +        this.objects.add(page);
   
           /* add the page to the Root */
           this.root.addPage(page);
  @@ -993,16 +993,16 @@
           PDFAction action;
   
           PDFLink link = new PDFLink(++this.objectcount, rect);
  -        this.objects.addElement(link);
  +        this.objects.add(link);
   
           if (linkType == LinkSet.EXTERNAL) {
               // check destination
               if (destination.endsWith(".pdf")) {    // FileSpec
                   PDFFileSpec fileSpec = new PDFFileSpec(++this.objectcount,
                                                          destination);
  -                this.objects.addElement(fileSpec);
  +                this.objects.add(fileSpec);
                   action = new PDFGoToRemote(++this.objectcount, fileSpec);
  -                this.objects.addElement(action);
  +                this.objects.add(action);
                   link.setAction(action);
               } else {                               // URI
                   PDFUri uri = new PDFUri(destination);
  @@ -1044,7 +1044,7 @@
       }
   
       public void addTrailerObject(PDFObject object) {
  -        this.trailerObjects.addElement(object);
  +        this.trailerObjects.add(object);
       }
   
       class PendingLink {
  @@ -1054,21 +1054,21 @@
   
       public PDFLink makeLinkCurrentPage(Rectangle rect, String dest) {
           PDFLink link = new PDFLink(++this.objectcount, rect);
  -        this.objects.addElement(link);
  +        this.objects.add(link);
           PendingLink pl = new PendingLink();
           pl.link = link;
           pl.dest = dest;
           if(pendingLinks == null) {
  -            pendingLinks = new Vector();
  +            pendingLinks = new ArrayList();
           }
  -        pendingLinks.addElement(pl);
  +        pendingLinks.add(pl);
   
           return link;
       }
   
       public PDFLink makeLink(Rectangle rect, String page, String dest) {
           PDFLink link = new PDFLink(++this.objectcount, rect);
  -        this.objects.addElement(link);
  +        this.objects.add(link);
   
           PDFGoTo gt = new PDFGoTo(++this.objectcount, page);
           gt.setDestination(dest);
  @@ -1085,7 +1085,7 @@
        */
       private void prepareLocations() {
           while(location.size() < objectcount)
  -            location.addElement(locationPlaceholder);
  +            location.add(locationPlaceholder);
       }
   
       /**
  @@ -1103,7 +1103,7 @@
           PDFStream obj = new PDFStream(++this.objectcount);
           obj.addDefaultFilters();
   
  -        this.objects.addElement(obj);
  +        this.objects.add(obj);
           return obj;
       }
   
  @@ -1120,7 +1120,7 @@
            * to the list of objects
            */
           PDFAnnotList obj = new PDFAnnotList(++this.objectcount);
  -        this.objects.addElement(obj);
  +        this.objects.add(obj);
           return obj;
       }
   
  @@ -1155,7 +1155,7 @@
           if (parent != null) {
               parent.addOutline(obj);
           }
  -        this.objects.addElement(obj);
  +        this.objects.add(obj);
           return obj;
   
       }
  @@ -1178,17 +1178,16 @@
   
           prepareLocations();
   
  -        Enumeration en = this.objects.elements();
  -        while (en.hasMoreElements()) {
  +        for (int count = 0; count < this.objects.size(); count++) {
               /* retrieve the object with the current number */
  -            PDFObject object = (PDFObject)en.nextElement();
  +            PDFObject object = (PDFObject)this.objects.get(count);
   
               /*
                * add the position of this object to the list of object
                * locations
                */
  -            location.setElementAt(
  -                new Integer(this.position),object.getNumber() - 1);
  +            location.set(object.getNumber() - 1, 
  +                         new Integer(this.position));
   
               /*
                * output the object and increment the character position
  @@ -1236,11 +1235,10 @@
       public void outputTrailer(OutputStream stream)
       throws IOException {
           output(stream);
  -        Enumeration e = trailerObjects.elements();
  -        while(e.hasMoreElements()) {
  -            PDFObject o = (PDFObject) e.nextElement();
  -            this.location.setElementAt(
  -                new Integer(this.position), o.getNumber() - 1);
  +        for(int count = 0; count < trailerObjects.size(); count++) {
  +            PDFObject o = (PDFObject) trailerObjects.get(count);
  +            this.location.set(o.getNumber() - 1, 
  +                              new Integer(this.position));
               this.position += o.output(stream);
           }
           /* output the xref table and increment the character position
  @@ -1279,9 +1277,8 @@
                                               + (this.objectcount + 1)
                                               + "\n0000000000 65535 f \n");
   
  -        Enumeration en = this.location.elements();
  -        while (en.hasMoreElements()) {
  -            String x = en.nextElement().toString();
  +        for (int count = 0; count < this.location.size(); count++) {
  +            String x = this.location.get(count).toString();
   
               /* contruct xref entry for object */
               String padding = "0000000000";
  
  
  
  1.4       +12 -12    xml-fop/src/org/apache/fop/pdf/PDFEncoding.java
  
  Index: PDFEncoding.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/pdf/PDFEncoding.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PDFEncoding.java	2001/07/30 20:29:29	1.3
  +++ PDFEncoding.java	2001/11/02 11:06:07	1.4
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PDFEncoding.java,v 1.3 2001/07/30 20:29:29 tore Exp $
  + * $Id: PDFEncoding.java,v 1.4 2001/11/02 11:06:07 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -8,9 +8,9 @@
   package org.apache.fop.pdf;
   
   // Java
  -import java.util.Enumeration;
  -import java.util.Hashtable;
  -import java.util.Vector;
  +import java.util.Iterator;
  +import java.util.HashMap;
  +import java.util.ArrayList;
   
   /**
    * class representing an /Encoding object.
  @@ -49,7 +49,7 @@
       /**
        * the differences from the base encoding
        */
  -    protected Hashtable differences;
  +    protected HashMap differences;
   
       /**
        * create the /Encoding object
  @@ -64,7 +64,7 @@
   
           /* set fields using paramaters */
           this.basename = basename;
  -        this.differences = new Hashtable();
  +        this.differences = new HashMap();
       }
   
       /**
  @@ -73,7 +73,7 @@
        * @param code the first index of the sequence to be changed
        * @param sequence the sequence of glyph names (as String)
        */
  -    public void addDifferences(int code, Vector sequence) {
  +    public void addDifferences(int code, ArrayList sequence) {
           differences.put(new Integer(code), sequence);
       }
   
  @@ -92,15 +92,15 @@
           if (!differences.isEmpty()) {
               p.append("\n/Differences [ ");
               Object code;
  -            Enumeration codes = differences.keys();
  -            while (codes.hasMoreElements()) {
  -                code = codes.nextElement();
  +            Iterator codes = differences.keySet().iterator();
  +            while (codes.hasNext()) {
  +                code = codes.next();
                   p.append(" ");
                   p.append(code);
  -                Vector sequence = (Vector)differences.get(code);
  +                ArrayList sequence = (ArrayList)differences.get(code);
                   for (int i = 0; i < sequence.size(); i++) {
                       p.append(" /");
  -                    p.append((String)sequence.elementAt(i));
  +                    p.append((String)sequence.get(i));
                   }
               }
               p.append(" ]");
  
  
  
  1.8       +54 -54    xml-fop/src/org/apache/fop/pdf/PDFFunction.java
  
  Index: PDFFunction.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/pdf/PDFFunction.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- PDFFunction.java	2001/07/30 20:29:29	1.7
  +++ PDFFunction.java	2001/11/02 11:06:07	1.8
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PDFFunction.java,v 1.7 2001/07/30 20:29:29 tore Exp $
  + * $Id: PDFFunction.java,v 1.8 2001/11/02 11:06:07 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -8,7 +8,7 @@
   package org.apache.fop.pdf;
   
   // Java...
  -import java.util.Vector;
  +import java.util.ArrayList;
   
   /**
    * class representing a PDF Function.
  @@ -31,12 +31,12 @@
       /**
        * Required: 2 * m Array of Double numbers which are possible inputs to the function
        */
  -    protected Vector domain = null;
  +    protected ArrayList domain = null;
   
       /**
        * Required: 2 * n Array of Double numbers which are possible outputs to the function
        */
  -    protected Vector range = null;
  +    protected ArrayList range = null;
   
       /* ********************TYPE 0***************************** */
       // FunctionType 0 specific function guts
  @@ -46,7 +46,7 @@
        * Note: This is really more like two seperate integers, sizeDomain, and sizeRange,
        * but since they're expressed as an array in PDF, my implementation reflects that.
        */
  -    protected Vector size = null;
  +    protected ArrayList size = null;
   
       /**
        * Required for Type 0: Number of Bits used to represent each sample value. Limited to 1,2,4,8,12,16,24, or 32
  @@ -64,12 +64,12 @@
        * Required for Type 3: A 2 * k array of Doubles that, taken in pairs, map each subset of the domain defined by Domain and the Bounds array to the domain of the corresponding function.
        * Should be two values per function, usually (0,1), as in [0 1 0 1] for 2 functions.
        */
  -    protected Vector encode = null;
  +    protected ArrayList encode = null;
   
       /**
        * Optinoal for Type 0: A 2 * n array of Doubles which provides a linear mapping of sample values to the range. Defaults to Range.
        */
  -    protected Vector decode = null;
  +    protected ArrayList decode = null;
   
       /**
        * Optional For Type 0: A stream of sample values
  @@ -84,18 +84,18 @@
        * Required (?) For Type 0: A vector of Strings for the various filters to be used to decode the stream.
        * These are how the string is compressed. Flate, LZW, etc.
        */
  -    protected Vector filter = null;
  +    protected ArrayList filter = null;
       /* *************************TYPE 2************************** */
   
       /**
        * Required For Type 2: An Array of n Doubles defining the function result when x=0. Default is [0].
        */
  -    protected Vector cZero = null;
  +    protected ArrayList cZero = null;
   
       /**
        * Required For Type 2: An Array of n Doubles defining the function result when x=1. Default is [1].
        */
  -    protected Vector cOne = null;
  +    protected ArrayList cOne = null;
   
       /**
        * Required for Type 2: The interpolation exponent.
  @@ -109,7 +109,7 @@
       /**
        * Required for Type 3: An vector of PDFFunctions which form an array of k single input functions making up the stitching function.
        */
  -    protected Vector functions = null;
  +    protected ArrayList functions = null;
   
       /**
        * Optional for Type 3: An array of (k-1) Doubles that, in combination with Domain, define the intervals to which each function from the Functions array apply. Bounds elements must be in order of increasing magnitude, and each value must be within the value of Domain.
  @@ -118,7 +118,7 @@
        * This makes each function responsible for an equal amount of the stitching function.
        * It makes the gradient even.
        */
  -    protected Vector bounds = null;
  +    protected ArrayList bounds = null;
       // See encode above, as it's also part of Type 3 Functions.
   
       /* *************************TYPE 4************************** */
  @@ -130,13 +130,13 @@
        * Use null for an optional object parameter if you choose not to use it.
        * For optional int parameters, pass the default.
        *
  -     * @param theDomain Vector objects of Double objects.
  +     * @param theDomain ArrayList objects of Double objects.
        * This is the domain of the function.
        * See page 264 of the PDF 1.3 Spec.
  -     * @param theRange Vector objects of Double objects.
  +     * @param theRange ArrayList objects of Double objects.
        * This is the Range of the function.
        * See page 264 of the PDF 1.3 Spec.
  -     * @param theSize A Vector object of Integer objects.
  +     * @param theSize A ArrayList object of Integer objects.
        * This is the number of samples in each input dimension.
        * I can't imagine there being more or less than two input dimensions,
        * so maybe this should be an array of length 2.
  @@ -151,14 +151,14 @@
        * This attribute is optional.
        *
        * See page 265 in the PDF 1.3 spec.
  -     * @param theEncode Vector objects of Double objects.
  +     * @param theEncode ArrayList objects of Double objects.
        * This is the linear mapping of input values intop the domain
        * of the function's sample table. Default is hard to represent in
        * ascii, but basically [0 (Size0 1) 0 (Size1 1)...].
        * This attribute is optional.
        *
        * See page 265 in the PDF 1.3 spec.
  -     * @param theDecode Vector objects of Double objects.
  +     * @param theDecode ArrayList objects of Double objects.
        * This is a linear mapping of sample values into the range.
        * The default is just the range.
        *
  @@ -180,10 +180,10 @@
        * @param theFunctionType This is the type of function (0,2,3, or 4).
        * It should be 0 as this is the constructor for sampled functions.
        */
  -    public PDFFunction(int theNumber, int theFunctionType, Vector theDomain,
  -                       Vector theRange, Vector theSize, int theBitsPerSample,
  -                       int theOrder, Vector theEncode, Vector theDecode,
  -                       StringBuffer theFunctionDataStream, Vector theFilter) {
  +    public PDFFunction(int theNumber, int theFunctionType, ArrayList theDomain,
  +                       ArrayList theRange, ArrayList theSize, int theBitsPerSample,
  +                       int theOrder, ArrayList theEncode, ArrayList theDecode,
  +                       StringBuffer theFunctionDataStream, ArrayList theFilter) {
           super(theNumber);
   
           this.functionType = 0;      // dang well better be 0;
  @@ -209,10 +209,10 @@
        * For optional int parameters, pass the default.
        *
        * @param theNumber the object's number
  -     * @param theDomain Vector objects of Double objects.
  +     * @param theDomain ArrayList objects of Double objects.
        * This is the domain of the function.
        * See page 264 of the PDF 1.3 Spec.
  -     * @param theRange Vector of Doubles that is the Range of the function.
  +     * @param theRange ArrayList of Doubles that is the Range of the function.
        * See page 264 of the PDF 1.3 Spec.
        * @param theCZero This is a vector of Double objects which defines the function result
        * when x=0.
  @@ -230,8 +230,8 @@
        * PDF Spec page 268
        * @param theFunctionType The type of the function, which should be 2.
        */
  -    public PDFFunction(int theNumber, int theFunctionType, Vector theDomain,
  -                       Vector theRange, Vector theCZero, Vector theCOne,
  +    public PDFFunction(int theNumber, int theFunctionType, ArrayList theDomain,
  +                       ArrayList theRange, ArrayList theCZero, ArrayList theCOne,
                          double theInterpolationExponentN) {
           super(theNumber);
   
  @@ -254,13 +254,13 @@
        * For optional int parameters, pass the default.
        *
        * @param theNumber the object's number
  -     * @param theDomain Vector objects of Double objects.
  +     * @param theDomain ArrayList objects of Double objects.
        * This is the domain of the function.
        * See page 264 of the PDF 1.3 Spec.
  -     * @param theRange Vector objects of Double objects.
  +     * @param theRange ArrayList objects of Double objects.
        * This is the Range of the function.
        * See page 264 of the PDF 1.3 Spec.
  -     * @param theFunctions A Vector of the PDFFunction objects that the stitching function stitches.
  +     * @param theFunctions A ArrayList of the PDFFunction objects that the stitching function stitches.
        *
        * This attributed is required.
        * It is described on page 269 of the PDF spec.
  @@ -273,7 +273,7 @@
        *
        * This attributed is required.
        * It's described on page 269 of the PDF 1.3 spec.
  -     * @param theEncode Vector objects of Double objects.
  +     * @param theEncode ArrayList objects of Double objects.
        * This is the linear mapping of input values intop the domain
        * of the function's sample table. Default is hard to represent in
        * ascii, but basically [0 (Size0 1) 0 (Size1 1)...].
  @@ -283,9 +283,9 @@
        * @param theFunctionType This is the function type. It should be 3,
        * for a stitching function.
        */
  -    public PDFFunction(int theNumber, int theFunctionType, Vector theDomain,
  -                       Vector theRange, Vector theFunctions,
  -                       Vector theBounds, Vector theEncode) {
  +    public PDFFunction(int theNumber, int theFunctionType, ArrayList theDomain,
  +                       ArrayList theRange, ArrayList theFunctions,
  +                       ArrayList theBounds, ArrayList theEncode) {
           super(theNumber);
   
           this.functionType = 3;    // dang well better be 3;
  @@ -304,10 +304,10 @@
        * Use null for an optional object parameter if you choose not to use it.
        * For optional int parameters, pass the default.
        *
  -     * @param theDomain Vector object of Double objects.
  +     * @param theDomain ArrayList object of Double objects.
        * This is the domain of the function.
        * See page 264 of the PDF 1.3 Spec.
  -     * @param theRange Vector object of Double objects.
  +     * @param theRange ArrayList object of Double objects.
        * This is the Range of the function.
        * See page 264 of the PDF 1.3 Spec.
        * @param theFunctionDataStream This is a stream of arithmetic, boolean, and stack operators and boolean constants.
  @@ -320,8 +320,8 @@
        * @param theFunctionType The type of function which should be 4, as this is
        * a Postscript calculator function
        */
  -    public PDFFunction(int theNumber, int theFunctionType, Vector theDomain,
  -                       Vector theRange, StringBuffer theFunctionDataStream) {
  +    public PDFFunction(int theNumber, int theFunctionType, ArrayList theDomain,
  +                       ArrayList theRange, StringBuffer theFunctionDataStream) {
           super(theNumber);
   
           this.functionType = 4;    // dang well better be 4;
  @@ -360,7 +360,7 @@
                   p.append("/Domain [ ");
                   vectorSize = this.domain.size();
                   for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                    p.append(PDFNumber.doubleOut((Double)this.domain.elementAt(tempInt))
  +                    p.append(PDFNumber.doubleOut((Double)this.domain.get(tempInt))
                                + " ");
                   }
   
  @@ -374,7 +374,7 @@
                   p.append("/Size [ ");
                   vectorSize = this.size.size();
                   for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                    p.append(PDFNumber.doubleOut((Double)this.size.elementAt(tempInt))
  +                    p.append(PDFNumber.doubleOut((Double)this.size.get(tempInt))
                                + " ");
                   }
                   p.append("] \n");
  @@ -384,7 +384,7 @@
                   p.append("/Encode [ ");
                   vectorSize = this.encode.size();
                   for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                    p.append(PDFNumber.doubleOut((Double)this.encode.elementAt(tempInt))
  +                    p.append(PDFNumber.doubleOut((Double)this.encode.get(tempInt))
                                + " ");
                   }
                   p.append("] \n");
  @@ -411,7 +411,7 @@
                   p.append("/Range [ ");
                   vectorSize = this.range.size();
                   for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                    p.append(PDFNumber.doubleOut((Double)this.range.elementAt(tempInt))
  +                    p.append(PDFNumber.doubleOut((Double)this.range.get(tempInt))
                                + " ");
                   }
   
  @@ -423,7 +423,7 @@
                   p.append("/Decode [ ");
                   vectorSize = this.decode.size();
                   for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                    p.append(PDFNumber.doubleOut((Double)this.decode.elementAt(tempInt))
  +                    p.append(PDFNumber.doubleOut((Double)this.decode.get(tempInt))
                                + " ");
                   }
   
  @@ -441,12 +441,12 @@
                   vectorSize = this.filter.size();
                   p.append("/Filter ");
                   if (vectorSize == 1) {
  -                    p.append("/" + ((String)this.filter.elementAt(0))
  +                    p.append("/" + ((String)this.filter.get(0))
                                + " \n");
                   } else {
                       p.append("[ ");
                       for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                        p.append("/" + ((String)this.filter.elementAt(0))
  +                        p.append("/" + ((String)this.filter.get(0))
                                    + " ");
                       }
                       p.append("] \n");
  @@ -469,7 +469,7 @@
                   p.append("/Domain [ ");
                   vectorSize = this.domain.size();
                   for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                    p.append(PDFNumber.doubleOut((Double)this.domain.elementAt(tempInt))
  +                    p.append(PDFNumber.doubleOut((Double)this.domain.get(tempInt))
                                + " ");
                   }
   
  @@ -484,7 +484,7 @@
                   p.append("/Range [ ");
                   vectorSize = this.range.size();
                   for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                    p.append(PDFNumber.doubleOut((Double)this.range.elementAt(tempInt))
  +                    p.append(PDFNumber.doubleOut((Double)this.range.get(tempInt))
                                + " ");
                   }
   
  @@ -498,7 +498,7 @@
                   p.append("/C0 [ ");
                   vectorSize = this.cZero.size();
                   for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                    p.append(PDFNumber.doubleOut((Double)this.cZero.elementAt(tempInt))
  +                    p.append(PDFNumber.doubleOut((Double)this.cZero.get(tempInt))
                                + " ");
                   }
                   p.append("] \n");
  @@ -509,7 +509,7 @@
                   p.append("/C1 [ ");
                   vectorSize = this.cOne.size();
                   for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                    p.append(PDFNumber.doubleOut((Double)this.cOne.elementAt(tempInt))
  +                    p.append(PDFNumber.doubleOut((Double)this.cOne.get(tempInt))
                                + " ");
                   }
                   p.append("] \n");
  @@ -529,7 +529,7 @@
                   p.append("/Domain [ ");
                   vectorSize = this.domain.size();
                   for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                    p.append(PDFNumber.doubleOut((Double)this.domain.elementAt(tempInt))
  +                    p.append(PDFNumber.doubleOut((Double)this.domain.get(tempInt))
                                + " ");
                   }
                   p.append("] \n");
  @@ -542,7 +542,7 @@
                   p.append("/Range [ ");
                   vectorSize = this.range.size();
                   for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                    p.append(PDFNumber.doubleOut((Double)this.range.elementAt(tempInt))
  +                    p.append(PDFNumber.doubleOut((Double)this.range.get(tempInt))
                                + " ");
                   }
   
  @@ -554,7 +554,7 @@
                   p.append("/Functions [ ");
                   numberOfFunctions = this.functions.size();
                   for (tempInt = 0; tempInt < numberOfFunctions; tempInt++) {
  -                    p.append(((PDFFunction)this.functions.elementAt(tempInt)).referencePDF()
  +                    p.append(((PDFFunction)this.functions.get(tempInt)).referencePDF()
                                + " ");
   
                   }
  @@ -567,7 +567,7 @@
                   p.append("/Encode [ ");
                   vectorSize = this.encode.size();
                   for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                    p.append(PDFNumber.doubleOut((Double)this.encode.elementAt(tempInt))
  +                    p.append(PDFNumber.doubleOut((Double)this.encode.get(tempInt))
                                + " ");
                   }
   
  @@ -589,7 +589,7 @@
   
                   vectorSize = this.bounds.size();
                   for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                    p.append(PDFNumber.doubleOut((Double)this.bounds.elementAt(tempInt))
  +                    p.append(PDFNumber.doubleOut((Double)this.bounds.get(tempInt))
                                + " ");
                   }
   
  @@ -624,7 +624,7 @@
                   p.append("/Domain [ ");
                   vectorSize = this.domain.size();
                   for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                    p.append(PDFNumber.doubleOut((Double)this.domain.elementAt(tempInt))
  +                    p.append(PDFNumber.doubleOut((Double)this.domain.get(tempInt))
                                + " ");
                   }
   
  @@ -638,7 +638,7 @@
                   p.append("/Range [ ");
                   vectorSize = this.range.size();
                   for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                    p.append(PDFNumber.doubleOut((Double)this.range.elementAt(tempInt))
  +                    p.append(PDFNumber.doubleOut((Double)this.range.get(tempInt))
                                + " ");
                   }
   
  
  
  
  1.9       +20 -20    xml-fop/src/org/apache/fop/pdf/PDFPattern.java
  
  Index: PDFPattern.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/pdf/PDFPattern.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- PDFPattern.java	2001/07/30 20:29:30	1.8
  +++ PDFPattern.java	2001/11/02 11:06:07	1.9
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PDFPattern.java,v 1.8 2001/07/30 20:29:30 tore Exp $
  + * $Id: PDFPattern.java,v 1.9 2001/11/02 11:06:07 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -8,7 +8,7 @@
   package org.apache.fop.pdf;
   
   // Java...
  -import java.util.Vector;
  +import java.util.ArrayList;
   
   // FOP...
   import org.apache.fop.datatypes.ColorSpace;
  @@ -53,9 +53,9 @@
       protected int tilingType = 1;
   
       /**
  -     * Vector of Doubles representing the Bounding box rectangle
  +     * ArrayList of Doubles representing the Bounding box rectangle
        */
  -    protected Vector bBox = null;
  +    protected ArrayList bBox = null;
   
       /**
        * Horizontal spacing
  @@ -73,9 +73,9 @@
       protected PDFShading shading = null;
   
       /**
  -     * Vector of Integers represetning the Extended unique Identifier
  +     * ArrayList of Integers represetning the Extended unique Identifier
        */
  -    protected Vector xUID = null;
  +    protected ArrayList xUID = null;
   
       /**
        * String representing the extended Graphics state.
  @@ -85,9 +85,9 @@
           null;                                                           // eventually, need a PDFExtGSState object... but not now.
   
       /**
  -     * Vector of Doubles representing the Transformation matrix.
  +     * ArrayList of Doubles representing the Transformation matrix.
        */
  -    protected Vector matrix = null;
  +    protected ArrayList matrix = null;
   
       /**
        * The stream of a pattern
  @@ -104,17 +104,17 @@
        * @param thePatternType the type of pattern, which is 1 for tiling.
        * @param thePaintType 1 or 2, colored or uncolored.
        * @param theTilingType 1, 2, or 3, constant spacing, no distortion, or faster tiling
  -     * @param theBBox Vector of Doubles: The pattern cell bounding box
  +     * @param theBBox ArrayList of Doubles: The pattern cell bounding box
        * @param theXStep horizontal spacing
        * @param theYStep vertical spacing
  -     * @param theMatrix Optional Vector of Doubles transformation matrix
  +     * @param theMatrix Optional ArrayList of Doubles transformation matrix
        * @param theXUID Optional vector of Integers that uniquely identify the pattern
        * @param thePatternDataStream The stream of pattern data to be tiled.
        */
       public PDFPattern(int theNumber, String thePatternName,
                         PDFResources theResources, int thePatternType,    // 1
  -    int thePaintType, int theTilingType, Vector theBBox, double theXStep,
  -    double theYStep, Vector theMatrix, Vector theXUID,
  +    int thePaintType, int theTilingType, ArrayList theBBox, double theXStep,
  +    double theYStep, ArrayList theMatrix, ArrayList theXUID,
       StringBuffer thePatternDataStream) {
           super(theNumber);
           this.patternName = thePatternName;
  @@ -143,12 +143,12 @@
        * @param theShading the PDF Shading object that comprises this pattern
        * @param theXUID optional:the extended unique Identifier if used.
        * @param theExtGState optional: the extended graphics state, if used.
  -     * @param theMatrix Optional:Vector of Doubles that specify the matrix.
  +     * @param theMatrix Optional:ArrayList of Doubles that specify the matrix.
        */
       public PDFPattern(int theNumber, String thePatternName,
                         int thePatternType, PDFShading theShading,
  -                      Vector theXUID, StringBuffer theExtGState,
  -                      Vector theMatrix) {
  +                      ArrayList theXUID, StringBuffer theExtGState,
  +                      ArrayList theMatrix) {
           super(theNumber);
   
           this.patternName = thePatternName;
  @@ -214,7 +214,7 @@
                   vectorSize = this.bBox.size();
                   p.append("/BBox [ ");
                   for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                    p.append(PDFNumber.doubleOut((Double)this.bBox.elementAt(tempInt)));
  +                    p.append(PDFNumber.doubleOut((Double)this.bBox.get(tempInt)));
                       p.append(" ");
                   }
                   p.append("] \n");
  @@ -228,7 +228,7 @@
                   vectorSize = this.matrix.size();
                   p.append("/Matrix [ ");
                   for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                    p.append(PDFNumber.doubleOut((Double)this.matrix.elementAt(tempInt)));
  +                    p.append(PDFNumber.doubleOut((Double)this.matrix.get(tempInt)));
                       p.append(" ");
                   }
                   p.append("] \n");
  @@ -238,7 +238,7 @@
                   vectorSize = this.xUID.size();
                   p.append("/XUID [ ");
                   for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                    p.append(((Integer)this.xUID.elementAt(tempInt)) + " ");
  +                    p.append(((Integer)this.xUID.get(tempInt)) + " ");
                   }
                   p.append("] \n");
               }
  @@ -258,7 +258,7 @@
                   vectorSize = this.xUID.size();
                   p.append("/XUID [ ");
                   for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                    p.append(((Integer)this.xUID.elementAt(tempInt)) + " ");
  +                    p.append(((Integer)this.xUID.get(tempInt)) + " ");
                   }
                   p.append("] \n");
               }
  @@ -272,7 +272,7 @@
                   vectorSize = this.matrix.size();
                   p.append("/Matrix [ ");
                   for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                    p.append(PDFNumber.doubleOut((Double)this.matrix.elementAt(tempInt)));
  +                    p.append(PDFNumber.doubleOut((Double)this.matrix.get(tempInt)));
                       p.append(" ");
                   }
                   p.append("] \n");
  
  
  
  1.11      +17 -17    xml-fop/src/org/apache/fop/pdf/PDFResources.java
  
  Index: PDFResources.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/pdf/PDFResources.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- PDFResources.java	2001/07/30 20:29:30	1.10
  +++ PDFResources.java	2001/11/02 11:06:07	1.11
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PDFResources.java,v 1.10 2001/07/30 20:29:30 tore Exp $
  + * $Id: PDFResources.java,v 1.11 2001/11/02 11:06:07 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -9,9 +9,9 @@
   
   // Java
   import java.io.PrintWriter;
  -import java.util.Enumeration;
  -import java.util.Vector;
  -import java.util.Hashtable;
  +import java.util.Iterator;
  +import java.util.ArrayList;
  +import java.util.HashMap;
   
   /**
    * class representing a /Resources object.
  @@ -24,11 +24,11 @@
       /**
        * /Font objects keyed by their internal name
        */
  -    protected Hashtable fonts = new Hashtable();
  +    protected HashMap fonts = new HashMap();
   
  -    protected Vector xObjects = null;
  -    protected Vector patterns = new Vector();
  -    protected Vector shadings = new Vector();
  +    protected ArrayList xObjects = null;
  +    protected ArrayList patterns = new ArrayList();
  +    protected ArrayList shadings = new ArrayList();
   
       /**
        * create a /Resources object.
  @@ -52,14 +52,14 @@
       }
   
       public void addShading(PDFShading theShading) {
  -        this.shadings.addElement(theShading);
  +        this.shadings.add(theShading);
       }
   
       public void addPattern(PDFPattern thePattern) {
  -        this.patterns.addElement(thePattern);
  +        this.patterns.add(thePattern);
       }
   
  -    public void setXObjects(Vector xObjects) {
  +    public void setXObjects(ArrayList xObjects) {
           this.xObjects = xObjects;
       }
   
  @@ -75,9 +75,9 @@
               p.append("/Font << ");
   
               /* construct PDF dictionary of font object references */
  -            Enumeration fontEnumeration = this.fonts.keys();
  -            while (fontEnumeration.hasMoreElements()) {
  -                String fontName = (String)fontEnumeration.nextElement();
  +            Iterator fontIterator = this.fonts.keySet().iterator();
  +            while (fontIterator.hasNext()) {
  +                String fontName = (String)fontIterator.next();
                   p.append("/" + fontName + " "
                            + ((PDFFont)this.fonts.get(fontName)).referencePDF()
                            + " ");
  @@ -94,7 +94,7 @@
                       currentShadingNumber < this.shadings.size();
                       currentShadingNumber++) {
                   currentShading =
  -                    ((PDFShading)this.shadings.elementAt(currentShadingNumber));
  +                    ((PDFShading)this.shadings.get(currentShadingNumber));
   
                   p.append("/" + currentShading.getName() + " "
                            + currentShading.referencePDF() + " ");    // \n ??????
  @@ -113,7 +113,7 @@
                       currentPatternNumber < this.patterns.size();
                       currentPatternNumber++) {
                   currentPattern =
  -                    ((PDFPattern)this.patterns.elementAt(currentPatternNumber));
  +                    ((PDFPattern)this.patterns.get(currentPatternNumber));
   
                   p.append("/" + currentPattern.getName() + " "
                            + currentPattern.referencePDF() + " ");
  @@ -130,7 +130,7 @@
               p = p.append("/XObject <<");
               for (int i = 1; i <= this.xObjects.size(); i++) {
                   p = p.append("/Im" + i + " "
  -                             + ((PDFXObject)this.xObjects.elementAt(i - 1)).referencePDF()
  +                             + ((PDFXObject)this.xObjects.get(i - 1)).referencePDF()
                                + " \n");
               }
               p = p.append(" >>\n");
  
  
  
  1.8       +40 -40    xml-fop/src/org/apache/fop/pdf/PDFShading.java
  
  Index: PDFShading.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/pdf/PDFShading.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- PDFShading.java	2001/07/30 20:29:30	1.7
  +++ PDFShading.java	2001/11/02 11:06:07	1.8
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PDFShading.java,v 1.7 2001/07/30 20:29:30 tore Exp $
  + * $Id: PDFShading.java,v 1.8 2001/11/02 11:06:07 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -8,7 +8,7 @@
   package org.apache.fop.pdf;
   
   // Java...
  -import java.util.Vector;
  +import java.util.ArrayList;
   
   // FOP
   import org.apache.fop.datatypes.ColorSpace;
  @@ -46,12 +46,12 @@
        * The background color. Since shading is opaque,
        * this is very rarely used.
        */
  -    protected Vector background = null;
  +    protected ArrayList background = null;
   
       /**
  -     * Optional: A Vector specifying the clipping rectangle
  +     * Optional: A ArrayList specifying the clipping rectangle
        */
  -    protected Vector bBox = null;
  +    protected ArrayList bBox = null;
   
       /**
        * Optional: A flag whether or not to filter the shading function
  @@ -65,12 +65,12 @@
        * Optional for Type 3: An array of two numbers between which the blend varies between start and end points. Default is 0, 1.
        */
   
  -    protected Vector domain = null;
  +    protected ArrayList domain = null;
   
       /**
        * Optional for Type 1: A transformation matrix
        */
  -    protected Vector matrix = null;
  +    protected ArrayList matrix = null;
   
       /**
        * Required for Type 1, 2, and 3:
  @@ -84,14 +84,14 @@
        * Required for Type 3: An Array of six numbers [x0,y0,r0,x1,y1,r1] specifying the centers and radii of
        * the starting and ending circles.
        */
  -    protected Vector coords = null;
  +    protected ArrayList coords = null;
   
       /**
        * Required for Type 2+3: An Array of two boolean values specifying whether to extend the
        * start and end colors past the start and end points,
        * respectively. Default is false, false.
        */
  -    protected Vector extend = null;
  +    protected ArrayList extend = null;
   
       /**
        * Required for Type 4,5,6, and 7: Specifies the number of bits used to represent each vertex coordinate.
  @@ -110,7 +110,7 @@
        * Each type has a differing number of decode array members, so check the spec.
        * Page 303 in PDF Spec 1.3
        */
  -    protected Vector decode = null;
  +    protected ArrayList decode = null;
   
       /**
        * Required for Type 4,5,6, and 7: Specifies the number of bits used to represent each color coordinate.
  @@ -135,13 +135,13 @@
        * @param theBackground An array of color components appropriate to the
        * colorspace key specifying a single color value.
        * This key is used by the f operator buy ignored by the sh operator.
  -     * @param theBBox Vector of double's representing a rectangle
  +     * @param theBBox ArrayList of double's representing a rectangle
        * in the coordinate space that is current at the
        * time of shading is imaged. Temporary clipping
        * boundary.
        * @param theAntiAlias Whether or not to anti-alias.
        * @param theDomain Optional vector of Doubles specifying the domain.
  -     * @param theMatrix Vector of Doubles specifying the matrix.
  +     * @param theMatrix ArrayList of Doubles specifying the matrix.
        * If it's a pattern, then the matrix maps it to pattern space.
        * If it's a shading, then it maps it to current user space.
        * It's optional, the default is the identity matrix
  @@ -149,9 +149,9 @@
        */
       public PDFShading(int theNumber, String theShadingName,
                         int theShadingType, ColorSpace theColorSpace,
  -                      Vector theBackground, Vector theBBox,
  -                      boolean theAntiAlias, Vector theDomain,
  -                      Vector theMatrix, PDFFunction theFunction) {
  +                      ArrayList theBackground, ArrayList theBBox,
  +                      boolean theAntiAlias, ArrayList theDomain,
  +                      ArrayList theMatrix, PDFFunction theFunction) {
           super(theNumber);
           this.shadingName = theShadingName;
           this.shadingType = theShadingType;    // 1
  @@ -177,23 +177,23 @@
        * @param theBackground theBackground An array of color components appropriate to the
        * colorspace key specifying a single color value.
        * This key is used by the f operator buy ignored by the sh operator.
  -     * @param theBBox Vector of double's representing a rectangle
  +     * @param theBBox ArrayList of double's representing a rectangle
        * in the coordinate space that is current at the
        * time of shading is imaged. Temporary clipping
        * boundary.
        * @param theAntiAlias Default is false
  -     * @param theCoords Vector of four (type 2) or 6 (type 3) Double
  -     * @param theDomain Vector of Doubles specifying the domain
  +     * @param theCoords ArrayList of four (type 2) or 6 (type 3) Double
  +     * @param theDomain ArrayList of Doubles specifying the domain
        * @param theFunction the Stitching (PDFfunction type 3) function, even if it's stitching a single function
  -     * @param theExtend Vector of Booleans of whether to extend teh start and end colors past the start and end points
  +     * @param theExtend ArrayList of Booleans of whether to extend teh start and end colors past the start and end points
        * The default is [false, false]
        */
       public PDFShading(int theNumber, String theShadingName,
                         int theShadingType, ColorSpace theColorSpace,
  -                      Vector theBackground, Vector theBBox,
  -                      boolean theAntiAlias, Vector theCoords,
  -                      Vector theDomain, PDFFunction theFunction,
  -                      Vector theExtend) {
  +                      ArrayList theBackground, ArrayList theBBox,
  +                      boolean theAntiAlias, ArrayList theCoords,
  +                      ArrayList theDomain, PDFFunction theFunction,
  +                      ArrayList theExtend) {
           super(theNumber);
           this.shadingName = theShadingName;
           this.shadingType = theShadingType;    // 2 or 3
  @@ -222,7 +222,7 @@
        * @param theBackground theBackground An array of color components appropriate to the
        * colorspace key specifying a single color value.
        * This key is used by the f operator buy ignored by the sh operator.
  -     * @param theBBox Vector of double's representing a rectangle
  +     * @param theBBox ArrayList of double's representing a rectangle
        * in the coordinate space that is current at the
        * time of shading is imaged. Temporary clipping
        * boundary.
  @@ -230,15 +230,15 @@
        * @param theBitsPerCoordinate 1,2,4,8,12,16,24 or 32.
        * @param theBitsPerComponent 1,2,4,8,12, and 16
        * @param theBitsPerFlag 2,4,8.
  -     * @param theDecode Vector of Doubles see PDF 1.3 spec pages 303 to 312.
  +     * @param theDecode ArrayList of Doubles see PDF 1.3 spec pages 303 to 312.
        * @param theFunction the PDFFunction
        */
       public PDFShading(int theNumber, String theShadingName,
                         int theShadingType, ColorSpace theColorSpace,
  -                      Vector theBackground, Vector theBBox,
  +                      ArrayList theBackground, ArrayList theBBox,
                         boolean theAntiAlias, int theBitsPerCoordinate,
                         int theBitsPerComponent, int theBitsPerFlag,
  -                      Vector theDecode, PDFFunction theFunction) {
  +                      ArrayList theDecode, PDFFunction theFunction) {
           super(theNumber);
   
           this.shadingType = theShadingType;    // 4,6 or 7
  @@ -264,23 +264,23 @@
        * @param theBackground theBackground An array of color components appropriate to the
        * colorspace key specifying a single color value.
        * This key is used by the f operator buy ignored by the sh operator.
  -     * @param theBBox Vector of double's representing a rectangle
  +     * @param theBBox ArrayList of double's representing a rectangle
        * in the coordinate space that is current at the
        * time of shading is imaged. Temporary clipping
        * boundary.
        * @param theAntiAlias Default is false
        * @param theBitsPerCoordinate 1,2,4,8,12,16, 24, or 32
        * @param theBitsPerComponent 1,2,4,8,12,24,32
  -     * @param theDecode Vector of Doubles. See page 305 in PDF 1.3 spec.
  +     * @param theDecode ArrayList of Doubles. See page 305 in PDF 1.3 spec.
        * @param theVerticesPerRow number of vertices in each "row" of the lattice.
        * @param theFunction The PDFFunction that's mapped on to this shape
        * @param theNumber the object number of this PDF object.
        */
       public PDFShading(int theNumber, String theShadingName,
                         int theShadingType, ColorSpace theColorSpace,
  -                      Vector theBackground, Vector theBBox,
  +                      ArrayList theBackground, ArrayList theBBox,
                         boolean theAntiAlias, int theBitsPerCoordinate,
  -                      int theBitsPerComponent, Vector theDecode,
  +                      int theBitsPerComponent, ArrayList theDecode,
                         int theVerticesPerRow, PDFFunction theFunction) {
           super(theNumber);
           this.shadingName = theShadingName;
  @@ -328,7 +328,7 @@
               p.append("/Background [ ");
               vectorSize = this.background.size();
               for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                p.append(PDFNumber.doubleOut((Double)this.background.elementAt(tempInt))
  +                p.append(PDFNumber.doubleOut((Double)this.background.get(tempInt))
                            + " ");
               }
               p.append("] \n");
  @@ -339,7 +339,7 @@
               p.append("/BBox [ ");
               vectorSize = this.bBox.size();
               for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                p.append(PDFNumber.doubleOut((Double)this.bBox.elementAt(tempInt))
  +                p.append(PDFNumber.doubleOut((Double)this.bBox.get(tempInt))
                            + " ");
               }
               p.append("] \n");
  @@ -355,7 +355,7 @@
                   p.append("/Domain [ ");
                   vectorSize = this.domain.size();
                   for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                    p.append(PDFNumber.doubleOut((Double)this.domain.elementAt(tempInt))
  +                    p.append(PDFNumber.doubleOut((Double)this.domain.get(tempInt))
                                + " ");
                   }
                   p.append("] \n");
  @@ -367,7 +367,7 @@
                   p.append("/Matrix [ ");
                   vectorSize = this.matrix.size();
                   for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                    p.append(PDFNumber.doubleOut((Double)this.matrix.elementAt(tempInt))
  +                    p.append(PDFNumber.doubleOut((Double)this.matrix.get(tempInt))
                                + " ");
                   }
                   p.append("] \n");
  @@ -385,7 +385,7 @@
                   p.append("/Coords [ ");
                   vectorSize = this.coords.size();
                   for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                    p.append(PDFNumber.doubleOut((Double)this.coords.elementAt(tempInt))
  +                    p.append(PDFNumber.doubleOut((Double)this.coords.get(tempInt))
                                + " ");
                   }
                   p.append("] \n");
  @@ -396,7 +396,7 @@
                   p.append("/Domain [ ");
                   vectorSize = this.domain.size();
                   for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                    p.append(PDFNumber.doubleOut((Double)this.domain.elementAt(tempInt))
  +                    p.append(PDFNumber.doubleOut((Double)this.domain.get(tempInt))
                                + " ");
                   }
                   p.append("] \n");
  @@ -408,7 +408,7 @@
                   p.append("/Extend [ ");
                   vectorSize = this.extend.size();
                   for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                    p.append(((Boolean)this.extend.elementAt(tempInt)) + " ");
  +                    p.append(((Boolean)this.extend.get(tempInt)) + " ");
                   }
   
                   p.append("] \n");
  @@ -452,7 +452,7 @@
                   p.append("/Decode [ ");
                   vectorSize = this.decode.size();
                   for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                    p.append(((Boolean)this.decode.elementAt(tempInt)) + " ");
  +                    p.append(((Boolean)this.decode.get(tempInt)) + " ");
                   }
   
                   p.append("] \n");
  @@ -484,7 +484,7 @@
                   p.append("/Decode [ ");
                   vectorSize = this.decode.size();
                   for (tempInt = 0; tempInt < vectorSize; tempInt++) {
  -                    p.append(((Boolean)this.decode.elementAt(tempInt)) + " ");
  +                    p.append(((Boolean)this.decode.get(tempInt)) + " ");
                   }
   
                   p.append("] \n");
  
  
  
  1.11      +19 -22    xml-fop/src/org/apache/fop/pdf/PDFStream.java
  
  Index: PDFStream.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/pdf/PDFStream.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- PDFStream.java	2001/07/30 20:29:30	1.10
  +++ PDFStream.java	2001/11/02 11:06:07	1.11
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PDFStream.java,v 1.10 2001/07/30 20:29:30 tore Exp $
  + * $Id: PDFStream.java,v 1.11 2001/11/02 11:06:07 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -10,7 +10,7 @@
   import java.io.ByteArrayOutputStream;
   import java.io.OutputStream;
   import java.io.IOException;
  -import java.util.Vector;
  +import java.util.ArrayList;
   import java.util.Enumeration;
   import org.apache.fop.configuration.Configuration;
   import org.apache.fop.messaging.MessageHandler;
  @@ -33,7 +33,7 @@
       /**
        * the filters that should be applied
        */
  -    private Vector _filters;
  +    private ArrayList _filters;
   
       /**
        * create an empty stream object
  @@ -43,7 +43,7 @@
       public PDFStream(int number) {
           super(number);
           _data = new ByteArrayOutputStream();
  -        _filters = new Vector();
  +        _filters = new ArrayList();
       }
   
       /**
  @@ -69,7 +69,7 @@
        */
       public void addFilter(PDFFilter filter) {
           if (filter != null) {
  -            _filters.addElement(filter);
  +            _filters.add(filter);
           }
   
       }
  @@ -94,7 +94,7 @@
   
   
       protected void addDefaultFilters() {
  -        Vector filters = Configuration.getListValue("stream-filter-list",
  +        ArrayList filters = Configuration.getListValue("stream-filter-list",
                                                       Configuration.PDF);
           if (filters == null) {
               // try getting it as a String
  @@ -108,7 +108,7 @@
               }
           } else {
               for (int i = 0; i < filters.size(); i++) {
  -                String v = (String)filters.elementAt(i);
  +                String v = (String)filters.get(i);
                   addFilter(v);
               }
           }
  @@ -236,13 +236,12 @@
        */
       protected String applyFilters() throws IOException {
           if (_filters.size() > 0) {
  -            Vector names = new Vector();
  -            Vector parms = new Vector();
  +            ArrayList names = new ArrayList();
  +            ArrayList parms = new ArrayList();
   
               // run the filters
  -            Enumeration e = _filters.elements();
  -            while (e.hasMoreElements()) {
  -                PDFFilter filter = (PDFFilter)e.nextElement();
  +            for (int count = 0; count < _filters.size(); count++) {
  +                PDFFilter filter = (PDFFilter)_filters.get(count);
                   // apply the filter encoding if neccessary
                   if (!filter.isApplied()) {
                       byte[] tmp = filter.encode(_data.toByteArray());
  @@ -251,8 +250,8 @@
                       filter.setApplied(true);
                   }
                   // place the names in our local vector in reverse order
  -                names.insertElementAt(filter.getName(), 0);
  -                parms.insertElementAt(filter.getDecodeParms(), 0);
  +                names.add(0, filter.getName());
  +                parms.add(0, filter.getDecodeParms());
               }
   
               // now build up the filter entries for the dictionary
  @@ -262,15 +261,14 @@
   
       }
   
  -    private String buildFilterEntries(Vector names) {
  +    private String buildFilterEntries(ArrayList names) {
           StringBuffer sb = new StringBuffer();
           sb.append("/Filter ");
           if (names.size() > 1) {
               sb.append("[ ");
           }
  -        Enumeration e = names.elements();
  -        while (e.hasMoreElements()) {
  -            sb.append((String)e.nextElement());
  +        for (int count = 0; count < names.size(); count++) {
  +            sb.append((String)names.get(count));
               sb.append(" ");
           }
           if (names.size() > 1) {
  @@ -280,7 +278,7 @@
           return sb.toString();
       }
   
  -    private String buildDecodeParms(Vector parms) {
  +    private String buildDecodeParms(ArrayList parms) {
           StringBuffer sb = new StringBuffer();
           boolean needParmsEntry = false;
           sb.append("/DecodeParms ");
  @@ -288,9 +286,8 @@
           if (parms.size() > 1) {
               sb.append("[ ");
           }
  -        Enumeration e = parms.elements();
  -        while (e.hasMoreElements()) {
  -            String s = (String)e.nextElement();
  +        for (int count = 0; count < parms.size(); count++) {
  +            String s = (String)parms.get(count);
               if (s != null) {
                   sb.append(s);
                   needParmsEntry = true;
  
  
  
  1.5       +8 -8      xml-fop/src/org/apache/fop/pdf/PDFWArray.java
  
  Index: PDFWArray.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/pdf/PDFWArray.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PDFWArray.java	2001/07/30 20:29:30	1.4
  +++ PDFWArray.java	2001/11/02 11:06:07	1.5
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PDFWArray.java,v 1.4 2001/07/30 20:29:30 tore Exp $
  + * $Id: PDFWArray.java,v 1.5 2001/11/02 11:06:07 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -7,7 +7,7 @@
   
   package org.apache.fop.pdf;
   
  -import java.util.Vector;
  +import java.util.ArrayList;
   
   /**
    * class representing a <b>W</b> array for CID fonts.
  @@ -17,10 +17,10 @@
       /**
        * the metrics
        */
  -    private Vector entries;
  +    private ArrayList entries;
   
       public PDFWArray() {
  -        entries = new Vector();
  +        entries = new ArrayList();
       }
   
       /**
  @@ -31,7 +31,7 @@
        * @param metrics the metrics array.
        */
       public void addEntry(int start, int[] metrics) {
  -        entries.addElement(new Entry(start, metrics));
  +        entries.add(new Entry(start, metrics));
       }
   
       /**
  @@ -42,7 +42,7 @@
        * @param width the width for all CIDs in the range
        */
       public void addEntry(int first, int last, int width) {
  -        entries.addElement(new int[] {
  +        entries.add(new int[] {
               first, last, width
           });
       }
  @@ -57,7 +57,7 @@
        * @param posY the y component for the vertical position vector
        */
       public void addEntry(int first, int last, int width, int posX, int posY) {
  -        entries.addElement(new int[] {
  +        entries.add(new int[] {
               first, last, width, posX, posY
           });
       }
  @@ -71,7 +71,7 @@
           p.append("[ ");
           int len = entries.size();
           for (int i = 0; i < len; i++) {
  -            Object entry = entries.elementAt(i);
  +            Object entry = entries.get(i);
               if (entry instanceof int[]) {
                   int[] line = (int[])entry;
                   for (int j = 0; j < line.length; j++) {
  
  
  
  1.4       +7 -7      xml-fop/src/org/apache/fop/render/mif/FontSetup.java
  
  Index: FontSetup.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/mif/FontSetup.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FontSetup.java	2001/07/30 20:29:32	1.3
  +++ FontSetup.java	2001/11/02 11:06:08	1.4
  @@ -1,5 +1,5 @@
   /*
  - * $Id: FontSetup.java,v 1.3 2001/07/30 20:29:32 tore Exp $
  + * $Id: FontSetup.java,v 1.4 2001/11/02 11:06:08 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -16,8 +16,8 @@
   // import org.apache.fop.pdf.PDFResources;
   
   // Java
  -import java.util.Enumeration;
  -import java.util.Hashtable;
  +import java.util.Iterator;
  +import java.util.HashMap;
   
   /**
    * sets up the PDF fonts.
  @@ -137,10 +137,10 @@
       public static void addToFontFormat(MIFDocument mifDoc,
                                          FontInfo fontInfo) {
   
  -        Hashtable fonts = fontInfo.getFonts();
  -        Enumeration e = fonts.keys();
  -        while (e.hasMoreElements()) {
  -            String f = (String)e.nextElement();
  +        HashMap fonts = fontInfo.getFonts();
  +        Iterator e = fonts.keySet().iterator();
  +        while (e.hasNext()) {
  +            String f = (String)e.next();
               Font font = (Font)fonts.get(f);
               FontDescriptor desc = null;
               if (font instanceof FontDescriptor) {
  
  
  
  1.5       +11 -14    xml-fop/src/org/apache/fop/render/pdf/FontReader.java
  
  Index: FontReader.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/pdf/FontReader.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FontReader.java	2001/07/30 20:29:33	1.4
  +++ FontReader.java	2001/11/02 11:06:08	1.5
  @@ -1,5 +1,5 @@
   /*
  - * $Id: FontReader.java,v 1.4 2001/07/30 20:29:33 tore Exp $
  + * $Id: FontReader.java,v 1.5 2001/11/02 11:06:08 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -15,7 +15,7 @@
   import org.xml.sax.Attributes;
   import java.io.IOException;
   import java.util.Enumeration;
  -import java.util.Vector;
  +import java.util.ArrayList;
   import java.util.Hashtable;
   import org.apache.fop.pdf.PDFWArray;
   import org.apache.fop.pdf.PDFCIDFont;
  @@ -41,12 +41,12 @@
       // private SingleByteFont singleFont = null;
       private String text = null;
   
  -    private Vector cidWidths = null;
  +    private ArrayList cidWidths = null;
       private int cidWidthIndex = 0;
   
       private Hashtable currentKerning = null;
   
  -    private Vector bfranges = null;
  +    private ArrayList bfranges = null;
   
       private void createFont(String path) throws FOPException {
           XMLReader parser = ConfigurationReader.createParser();
  @@ -145,7 +145,7 @@
               }
           } else if ("cid-widths".equals(localName)) {
               cidWidthIndex = getInt(attributes.getValue("start-index"));
  -            cidWidths = new Vector();
  +            cidWidths = new ArrayList();
           } else if ("kerning".equals(localName)) {
               currentKerning = new Hashtable();
               if (isCID)
  @@ -155,15 +155,15 @@
                   singleFont.kerning.put(new Integer(attributes.getValue("kpx1")),
                                          currentKerning);
           } else if ("bfranges".equals(localName)) {
  -            bfranges = new Vector();
  +            bfranges = new ArrayList();
           } else if ("bf".equals(localName)) {
               BFEntry entry = new BFEntry();
               entry.unicodeStart = getInt(attributes.getValue("us"));
               entry.unicodeEnd = getInt(attributes.getValue("ue"));
               entry.glyphStartIndex = getInt(attributes.getValue("gi"));
  -            bfranges.addElement(entry);
  +            bfranges.add(entry);
           } else if ("wx".equals(localName)) {
  -            cidWidths.addElement(new Integer(attributes.getValue("w")));
  +            cidWidths.add(new Integer(attributes.getValue("w")));
           } else if ("widths".equals(localName)) {
               singleFont.width = new int[256];
           } else if ("char".equals(localName)) {
  @@ -268,9 +268,8 @@
           } else if ("cid-widths".equals(localName)) {
               int[] wds = new int[cidWidths.size()];
               int j = 0;
  -            for (Enumeration e = cidWidths.elements();
  -                    e.hasMoreElements(); ) {
  -                Integer i = (Integer)e.nextElement();
  +            for (int count = 0; count < cidWidths.size(); count++) {
  +                Integer i = (Integer)cidWidths.get(count);
                   wds[j++] = i.intValue();
               }
   
  @@ -278,9 +277,7 @@
               multiFont.width = wds;
   
           } else if ("bfranges".equals(localName)) {
  -            BFEntry[] entries = new BFEntry[bfranges.size()];
  -            bfranges.copyInto(entries);
  -            multiFont.bfentries = entries;
  +            multiFont.bfentries = (BFEntry[])bfranges.toArray(new BFEntry[0]);
           }
   
       }
  
  
  
  1.14      +14 -15    xml-fop/src/org/apache/fop/render/pdf/FontSetup.java
  
  Index: FontSetup.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/pdf/FontSetup.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- FontSetup.java	2001/08/06 09:43:07	1.13
  +++ FontSetup.java	2001/11/02 11:06:08	1.14
  @@ -1,5 +1,5 @@
   /*
  - * $Id: FontSetup.java,v 1.13 2001/08/06 09:43:07 keiron Exp $
  + * $Id: FontSetup.java,v 1.14 2001/11/02 11:06:08 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -18,9 +18,9 @@
   import org.apache.fop.configuration.FontTriplet;
   
   // Java
  -import java.util.Enumeration;
  -import java.util.Hashtable;
  -import java.util.Vector;
  +import java.util.HashMap;
  +import java.util.Iterator;
  +import java.util.ArrayList;
   
   /**
    * sets up the PDF fonts.
  @@ -143,13 +143,13 @@
           String internalName = null;
           FontReader reader = null;
   
  -        Vector fontInfos = Configuration.getFonts();
  +        ArrayList fontInfos = Configuration.getFonts();
           if (fontInfos == null)
               return;
   
  -        for (Enumeration e = fontInfos.elements(); e.hasMoreElements(); ) {
  +        for (int count = 0; count < fontInfos.size(); count++) {
               org.apache.fop.configuration.FontInfo configFontInfo =
  -                (org.apache.fop.configuration.FontInfo)e.nextElement();
  +                (org.apache.fop.configuration.FontInfo)fontInfos.get(count);
   
               try {
                   String metricsFile = configFontInfo.getMetricsFile();
  @@ -167,10 +167,9 @@
                                                    configFontInfo.getKerning());
                       fontInfo.addMetrics(internalName, font);
                       
  -                    Vector triplets = configFontInfo.getFontTriplets();
  -                    for (Enumeration t = triplets.elements();
  -                            t.hasMoreElements(); ) {
  -                        FontTriplet triplet = (FontTriplet)t.nextElement();
  +                    ArrayList triplets = configFontInfo.getFontTriplets();
  +                    for (int c = 0; c < triplets.size(); c++) {
  +                        FontTriplet triplet = (FontTriplet)triplets.get(c);
   
                           fontInfo.addFontProperties(internalName,
                                                      triplet.getName(),
  @@ -193,11 +192,11 @@
        * @param fontInfo font info object to get font information from
        */
       public static void addToResources(PDFDocument doc, FontInfo fontInfo) {
  -        Hashtable fonts = fontInfo.getUsedFonts();
  -        Enumeration e = fonts.keys();
  +        HashMap fonts = fontInfo.getUsedFonts();
  +        Iterator e = fonts.keySet().iterator();
           PDFResources resources = doc.getResources();
  -        while (e.hasMoreElements()) {
  -            String f = (String)e.nextElement();
  +        while (e.hasNext()) {
  +            String f = (String)e.next();
               Font font = (Font)fonts.get(f);
               FontDescriptor desc = null;
               if (font instanceof FontDescriptor) {
  
  
  
  1.4       +30 -30    xml-fop/src/org/apache/fop/render/ps/PSGraphics2D.java
  
  Index: PSGraphics2D.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/ps/PSGraphics2D.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PSGraphics2D.java	2001/10/22 09:30:33	1.3
  +++ PSGraphics2D.java	2001/11/02 11:06:08	1.4
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PSGraphics2D.java,v 1.3 2001/10/22 09:30:33 keiron Exp $
  + * $Id: PSGraphics2D.java,v 1.4 2001/11/02 11:06:08 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -28,7 +28,7 @@
   import java.io.*;
   
   import java.util.Map;
  -import java.util.Vector;
  +import java.util.ArrayList;
   
   /**
    * This concrete implementation of <tt>AbstractGraphics2D</tt> is a
  @@ -39,7 +39,7 @@
    * implementing a <tt>Graphic2D</tt> piece-meal.
    *
    * @author <a href="mailto:keiron@aftexsw.com">Keiron Liddle</a>
  - * @version $Id: PSGraphics2D.java,v 1.3 2001/10/22 09:30:33 keiron Exp $
  + * @version $Id: PSGraphics2D.java,v 1.4 2001/11/02 11:06:08 keiron Exp $
    * @see org.apache.batik.ext.awt.g2d.AbstractGraphics2D
    */
   public class PSGraphics2D extends AbstractGraphics2D {
  @@ -515,40 +515,40 @@
               Point2D p2 = gp.getPoint2();
               boolean cyclic = gp.isCyclic();
   
  -            Vector theCoords = new Vector();
  -            theCoords.addElement(new Double(p1.getX()));
  -            theCoords.addElement(new Double(p1.getY()));
  -            theCoords.addElement(new Double(p2.getX()));
  -            theCoords.addElement(new Double(p2.getY()));
  -
  -            Vector theExtend = new Vector();
  -            theExtend.addElement(new Boolean(true));
  -            theExtend.addElement(new Boolean(true));
  -
  -            Vector theDomain = new Vector();
  -            theDomain.addElement(new Double(0));
  -            theDomain.addElement(new Double(1));
  -
  -            Vector theEncode = new Vector();
  -            theEncode.addElement(new Double(0));
  -            theEncode.addElement(new Double(1));
  -            theEncode.addElement(new Double(0));
  -            theEncode.addElement(new Double(1));
  -
  -            Vector theBounds = new Vector();
  -            theBounds.addElement(new Double(0));
  -            theBounds.addElement(new Double(1));
  +            ArrayList theCoords = new ArrayList();
  +            theCoords.add(new Double(p1.getX()));
  +            theCoords.add(new Double(p1.getY()));
  +            theCoords.add(new Double(p2.getX()));
  +            theCoords.add(new Double(p2.getY()));
  +
  +            ArrayList theExtend = new ArrayList();
  +            theExtend.add(new Boolean(true));
  +            theExtend.add(new Boolean(true));
  +
  +            ArrayList theDomain = new ArrayList();
  +            theDomain.add(new Double(0));
  +            theDomain.add(new Double(1));
  +
  +            ArrayList theEncode = new ArrayList();
  +            theEncode.add(new Double(0));
  +            theEncode.add(new Double(1));
  +            theEncode.add(new Double(0));
  +            theEncode.add(new Double(1));
  +
  +            ArrayList theBounds = new ArrayList();
  +            theBounds.add(new Double(0));
  +            theBounds.add(new Double(1));
   
  -            Vector theFunctions = new Vector();
  +            ArrayList theFunctions = new ArrayList();
   
  -            Vector someColors = new Vector();
  +            ArrayList someColors = new ArrayList();
   
               PDFColor color1 = new PDFColor(c1.getRed(), c1.getGreen(),
                                              c1.getBlue());
  -            someColors.addElement(color1);
  +            someColors.add(color1);
               PDFColor color2 = new PDFColor(c2.getRed(), c2.getGreen(),
                                              c2.getBlue());
  -            someColors.addElement(color2);
  +            someColors.add(color2);
   
               ColorSpace aColorSpace = new ColorSpace(ColorSpace.DEVICE_RGB);
           } else if (paint instanceof TexturePaint) {}
  
  
  
  1.17      +10 -11    xml-fop/src/org/apache/fop/render/ps/PSRenderer.java
  
  Index: PSRenderer.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/ps/PSRenderer.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- PSRenderer.java	2001/10/22 09:30:33	1.16
  +++ PSRenderer.java	2001/11/02 11:06:08	1.17
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PSRenderer.java,v 1.16 2001/10/22 09:30:33 keiron Exp $
  + * $Id: PSRenderer.java,v 1.17 2001/11/02 11:06:08 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -42,9 +42,8 @@
   import java.util.*;
   import java.io.IOException;
   import java.io.OutputStream;
  -import java.util.Enumeration;
  -import java.util.Vector;
  -import java.util.Hashtable;
  +import java.util.Iterator;
  +import java.util.HashMap;
   import java.awt.geom.AffineTransform;
   import java.awt.geom.Dimension2D;
   import java.awt.Point;
  @@ -204,18 +203,18 @@
   
           // write("/gfF1{/Helvetica findfont} bd");
           // write("/gfF3{/Helvetica-Bold findfont} bd");
  -        Hashtable fonts = fontInfo.getFonts();
  -        Enumeration enum = fonts.keys();
  -        while (enum.hasMoreElements()) {
  -            String key = (String)enum.nextElement();
  +        HashMap fonts = fontInfo.getFonts();
  +        Iterator enum = fonts.keySet().iterator();
  +        while (enum.hasNext()) {
  +            String key = (String)enum.next();
               Font fm = (Font)fonts.get(key);
               write("/" + key + " /" + fm.fontName() + " def");
           }
           write("end def");
           write("%%EndResource");
  -        enum = fonts.keys();
  -        while (enum.hasMoreElements()) {
  -            String key = (String)enum.nextElement();
  +        enum = fonts.keySet().iterator();
  +        while (enum.hasNext()) {
  +            String key = (String)enum.next();
               Font fm = (Font)fonts.get(key);
               write("/" + fm.fontName() + " findfont");
               write("dup length dict begin");
  
  
  
  1.14      +1 -4      xml-fop/src/org/apache/fop/render/txt/TXTRenderer.java
  
  Index: TXTRenderer.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/txt/TXTRenderer.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- TXTRenderer.java	2001/10/22 09:30:33	1.13
  +++ TXTRenderer.java	2001/11/02 11:06:08	1.14
  @@ -1,5 +1,5 @@
   /*
  - * $Id: TXTRenderer.java,v 1.13 2001/10/22 09:30:33 keiron Exp $
  + * $Id: TXTRenderer.java,v 1.14 2001/11/02 11:06:08 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -28,9 +28,6 @@
   // Java
   import java.io.IOException;
   import java.io.OutputStream;
  -import java.util.Enumeration;
  -import java.util.Vector;
  -import java.util.Hashtable;
   
   /**
    * Renderer that renders areas to plain text
  
  
  
  1.21      +30 -30    xml-fop/src/org/apache/fop/svg/PDFGraphics2D.java
  
  Index: PDFGraphics2D.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/PDFGraphics2D.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- PDFGraphics2D.java	2001/10/22 07:27:30	1.20
  +++ PDFGraphics2D.java	2001/11/02 11:06:08	1.21
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PDFGraphics2D.java,v 1.20 2001/10/22 07:27:30 keiron Exp $
  + * $Id: PDFGraphics2D.java,v 1.21 2001/11/02 11:06:08 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -31,7 +31,7 @@
   import java.io.*;
   
   import java.util.Map;
  -import java.util.Vector;
  +import java.util.ArrayList;
   import java.util.Hashtable;
   
   /**
  @@ -43,7 +43,7 @@
    * implementing a <tt>Graphic2D</tt> piece-meal.
    *
    * @author <a href="mailto:keiron@aftexsw.com">Keiron Liddle</a>
  - * @version $Id: PDFGraphics2D.java,v 1.20 2001/10/22 07:27:30 keiron Exp $
  + * @version $Id: PDFGraphics2D.java,v 1.21 2001/11/02 11:06:08 keiron Exp $
    * @see org.apache.batik.ext.awt.g2d.AbstractGraphics2D
    */
   public class PDFGraphics2D extends AbstractGraphics2D {
  @@ -645,40 +645,40 @@
               Point2D p2 = gp.getPoint2();
               boolean cyclic = gp.isCyclic();
   
  -            Vector theCoords = new Vector();
  -            theCoords.addElement(new Double(p1.getX()));
  -            theCoords.addElement(new Double(p1.getY()));
  -            theCoords.addElement(new Double(p2.getX()));
  -            theCoords.addElement(new Double(p2.getY()));
  -
  -            Vector theExtend = new Vector();
  -            theExtend.addElement(new Boolean(true));
  -            theExtend.addElement(new Boolean(true));
  -
  -            Vector theDomain = new Vector();
  -            theDomain.addElement(new Double(0));
  -            theDomain.addElement(new Double(1));
  -
  -            Vector theEncode = new Vector();
  -            theEncode.addElement(new Double(0));
  -            theEncode.addElement(new Double(1));
  -            theEncode.addElement(new Double(0));
  -            theEncode.addElement(new Double(1));
  -
  -            Vector theBounds = new Vector();
  -            theBounds.addElement(new Double(0));
  -            theBounds.addElement(new Double(1));
  +            ArrayList theCoords = new ArrayList();
  +            theCoords.add(new Double(p1.getX()));
  +            theCoords.add(new Double(p1.getY()));
  +            theCoords.add(new Double(p2.getX()));
  +            theCoords.add(new Double(p2.getY()));
  +
  +            ArrayList theExtend = new ArrayList();
  +            theExtend.add(new Boolean(true));
  +            theExtend.add(new Boolean(true));
  +
  +            ArrayList theDomain = new ArrayList();
  +            theDomain.add(new Double(0));
  +            theDomain.add(new Double(1));
  +
  +            ArrayList theEncode = new ArrayList();
  +            theEncode.add(new Double(0));
  +            theEncode.add(new Double(1));
  +            theEncode.add(new Double(0));
  +            theEncode.add(new Double(1));
  +
  +            ArrayList theBounds = new ArrayList();
  +            theBounds.add(new Double(0));
  +            theBounds.add(new Double(1));
   
  -            Vector theFunctions = new Vector();
  +            ArrayList theFunctions = new ArrayList();
   
  -            Vector someColors = new Vector();
  +            ArrayList someColors = new ArrayList();
   
               PDFColor color1 = new PDFColor(c1.getRed(), c1.getGreen(),
                                              c1.getBlue());
  -            someColors.addElement(color1);
  +            someColors.add(color1);
               PDFColor color2 = new PDFColor(c2.getRed(), c2.getGreen(),
                                              c2.getBlue());
  -            someColors.addElement(color2);
  +            someColors.add(color2);
   
               PDFFunction myfunc = this.pdfDoc.makeFunction(2, theDomain, null,
                       color1.getVector(), color2.getVector(), 1.0);
  
  
  
  1.4       +1 -4      xml-fop/src/org/apache/fop/svg/SVGUserAgent.java
  
  Index: SVGUserAgent.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/SVGUserAgent.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SVGUserAgent.java	2001/10/30 07:04:10	1.3
  +++ SVGUserAgent.java	2001/11/02 11:06:08	1.4
  @@ -1,5 +1,5 @@
   /*
  - * $Id: SVGUserAgent.java,v 1.3 2001/10/30 07:04:10 keiron Exp $
  + * $Id: SVGUserAgent.java,v 1.4 2001/11/02 11:06:08 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -25,9 +25,6 @@
   // Java
   import java.io.IOException;
   import java.io.OutputStream;
  -import java.util.Enumeration;
  -import java.util.Vector;
  -import java.util.Hashtable;
   import java.awt.geom.AffineTransform;
   import java.awt.geom.Dimension2D;
   import java.awt.Point;
  
  
  
  1.3       +4 -4      xml-fop/src/org/apache/fop/tools/anttasks/Compare.java
  
  Index: Compare.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/tools/anttasks/Compare.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Compare.java	2001/07/30 20:29:35	1.2
  +++ Compare.java	2001/11/02 11:06:08	1.3
  @@ -1,5 +1,5 @@
   /*
  - * $Id: Compare.java,v 1.2 2001/07/30 20:29:35 tore Exp $
  + * $Id: Compare.java,v 1.3 2001/11/02 11:06:08 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -48,12 +48,12 @@
   
       public void setFilenames(String filenames) {
           StringTokenizer tokens = new StringTokenizer(filenames, ",");
  -        Vector filenameListTmp = new Vector(20);
  +        ArrayList filenameListTmp = new ArrayList(20);
           while (tokens.hasMoreTokens()) {
  -            filenameListTmp.addElement(tokens.nextToken());
  +            filenameListTmp.add(tokens.nextToken());
           }
           filenameList = new String[filenameListTmp.size()];
  -        filenameListTmp.copyInto((String[])filenameList);
  +        filenameList = (String[])filenameListTmp.toArray(new String[0]);
       }
   
       private boolean compareBytes(File oldFile, File newFile) {
  
  
  
  1.3       +5 -6      xml-fop/src/org/apache/fop/tools/anttasks/CompileXMLFiles.java
  
  Index: CompileXMLFiles.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/tools/anttasks/CompileXMLFiles.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CompileXMLFiles.java	2001/07/30 20:29:35	1.2
  +++ CompileXMLFiles.java	2001/11/02 11:06:08	1.3
  @@ -1,5 +1,5 @@
   /*
  - * $Id: CompileXMLFiles.java,v 1.2 2001/07/30 20:29:35 tore Exp $
  + * $Id: CompileXMLFiles.java,v 1.3 2001/11/02 11:06:08 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -39,7 +39,7 @@
       private String configFile, outFile;
       private String[] filenameList;
       private String filenames;
  -    private Vector files = new Vector();
  +    private ArrayList files = new ArrayList();
   
       // sets name of configuration file, which must
       // be an xml file conforming to the book.dtd used by xml-site
  @@ -110,15 +110,14 @@
       public void endDocument() throws SAXException {
           String line, filename;
           BufferedReader in;
  -        Enumeration iterator = files.elements();
           try {
               BufferedWriter out =
                   new BufferedWriter(new FileWriter("compileXMLFiles-tmp.xml"));
               out.write("<?xml version=\"1.0\"?>\n"
                         + "<!DOCTYPE documentation [\n"
                         + "<!ENTITY nbsp \" \">\n" + "]>\n<documentation>");
  -            while (iterator.hasMoreElements()) {
  -                filename = (String)iterator.nextElement();
  +            for(int count = 0; count < files.size(); count++) {
  +                filename = (String)files.get(count);
                   in = new BufferedReader(new FileReader(filename));
                   while ((line = in.readLine()) != null) {
                       // kill the lines pointing to the sbk protocol and the xml declaration
  @@ -143,7 +142,7 @@
           String id, label, source;
           if (name.equals("document") || name.equals("entry")) {
               source = atts.getValue("source");
  -            files.addElement(source);
  +            files.add(source);
           }
       }
   
  
  
  
  1.16      +4 -4      xml-fop/src/org/apache/fop/tools/anttasks/Fop.java
  
  Index: Fop.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/tools/anttasks/Fop.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- Fop.java	2001/10/22 09:30:33	1.15
  +++ Fop.java	2001/11/02 11:06:08	1.16
  @@ -1,5 +1,5 @@
   /*
  - * $Id: Fop.java,v 1.15 2001/10/22 09:30:33 keiron Exp $
  + * $Id: Fop.java,v 1.16 2001/11/02 11:06:08 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -50,7 +50,7 @@
    */
   public class Fop extends Task {
       File foFile;
  -    Vector filesets = new Vector();
  +    ArrayList filesets = new ArrayList();
       File outFile;
       File outDir;
       String format; //MIME type
  @@ -85,7 +85,7 @@
        * Adds a set of fo files (nested fileset attribute).
        */
       public void addFileset(FileSet set) {
  -        filesets.addElement(set);
  +        filesets.add(set);
       }
   
       /**
  @@ -315,7 +315,7 @@
   
           // deal with the filesets
           for (int i = 0; i < task.filesets.size(); i++) {
  -            FileSet fs = (FileSet) task.filesets.elementAt(i);
  +            FileSet fs = (FileSet) task.filesets.get(i);
               DirectoryScanner ds = fs.getDirectoryScanner(task.getProject());
               String[] files = ds.getIncludedFiles();
   
  
  
  
  1.9       +4 -4      xml-fop/src/org/apache/fop/viewer/PreviewDialog.java
  
  Index: PreviewDialog.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/viewer/PreviewDialog.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- PreviewDialog.java	2001/10/22 09:30:33	1.8
  +++ PreviewDialog.java	2001/11/02 11:06:09	1.9
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PreviewDialog.java,v 1.8 2001/10/22 09:30:33 keiron Exp $
  + * $Id: PreviewDialog.java,v 1.9 2001/11/02 11:06:09 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -26,7 +26,7 @@
   import java.awt.event.*;
   import java.awt.image.BufferedImage;
   import java.util.StringTokenizer;
  -import java.util.Vector;
  +import java.util.ArrayList;
   
   import javax.swing.*;
   
  @@ -592,7 +592,7 @@
                   showIt = new showProgress(error, true);
               } else {
                   StringTokenizer tok = new StringTokenizer(error, " ");
  -                Vector labels = new Vector();
  +                ArrayList labels = new ArrayList();
                   StringBuffer buffer = new StringBuffer();
                   String tmp, list[];
   
  @@ -609,7 +609,7 @@
                   labels.add(buffer.toString());
                   list = new String[labels.size()];
                   for (int i = 0; i < labels.size(); i++) {
  -                    list[i] = labels.elementAt(i).toString();
  +                    list[i] = labels.get(i).toString();
                   }
                   showIt = new showProgress(list, true);
               }
  
  
  

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