<xsl:template match="encoding-set">
package org.apache.fop.render.pdf;
-import java.util.Hashtable;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Collections;
public class CodePointMapping {
private char[] latin1Map;
}
}
- private static Hashtable mappings;
+ private static Map mappings;
static {
- mappings = new Hashtable();
+ mappings = Collections.synchronizedMap(new HashMap());
}
public static CodePointMapping getMapping(String encoding) {
CodePointMapping mapping = (CodePointMapping) mappings.get(encoding);
<value const="AUTO">auto</value>
<value const="FIXED">fixed</value>
<value const="ABSOLUTE">absolute</value>
- <value const="INHERIT">inherit</value>
</enumeration>
<default>auto</default>
</property>
<property>
<name>caption-side</name>
<inherited>true</inherited>
- <datatype>ToBeImplemented</datatype>
+ <datatype>Enum</datatype>
+ <enumeration>
+ <value const="BEFORE">before</value>
+ <value const="AFTER">after</value>
+ <value const="START">start</value>
+ <value const="END">end</value>
+ <value const="TOP">top</value>
+ <value const="BOTTOM">bottom</value>
+ <value const="LEFT">left</value>
+ <value const="RIGHT">right</value>
+ </enumeration>
<default>before</default>
</property>
<property>
<!-- Look for keyword equivalents. Value is the new expression -->
<xsl:template match="keyword-equiv[1]">
// Initialize hashtable of keywords
- static Hashtable s_htKeywords;
+ static HashMap s_htKeywords;
static {
- s_htKeywords = new Hashtable(<xsl:value-of select="count(../keyword-equiv)"/>);
+ s_htKeywords = new HashMap(<xsl:value-of select="count(../keyword-equiv)"/>);
<xsl:for-each select="../keyword-equiv">
s_htKeywords.put("<xsl:value-of select="@match"/>", "<xsl:value-of select="."/>");
</xsl:for-each>
<redirect:write select="concat($classname, '.java')">
package org.apache.fop.fo.properties;
-import java.util.Hashtable;
+import java.util.HashMap;
import org.apache.fop.datatypes.*;
import org.apache.fop.fo.*;
import org.apache.fop.apps.FOPException;
import java.io.InputStream;
import java.io.FileInputStream;
import java.io.BufferedInputStream;
-import java.util.Hashtable;
+import java.util.HashMap;
public class <xsl:value-of select="class-name"/> extends Font implements FontDescriptor {
private final static String fontName = "<xsl:value-of select="font-name"/>";
private final static int firstChar = <xsl:value-of select="first-char"/>;
private final static int lastChar = <xsl:value-of select="last-char"/>;
private final static int[] width;
- private final static Hashtable kerning=new Hashtable();
+ private final static HashMap kerning=new HashMap();
static {
width = new int[256];
<xsl:for-each select="widths/char"><xsl:variable name="char-name" select="@name"/><xsl:variable name="char-num" select="document('charlist.xml')/font-mappings/map[@adobe-name=$char-name]/@win-ansi"/><xsl:if test="$char-num!='-1'"> width[<xsl:value-of select="$char-num"/>] = <xsl:value-of select="@width"/>;
</xsl:if></xsl:for-each>
- Hashtable tmptable;
+ HashMap tmptable;
<xsl:for-each select="kerning">
<xsl:variable name="kpx1-name" select="@kpx1"/>
- tmptable=new Hashtable();<xsl:for-each select="pair"><xsl:variable name="kpx2-name" select="@kpx2"/><xsl:variable name="kern-name" select="@kern"/>
+ tmptable=new HashMap();<xsl:for-each select="pair"><xsl:variable name="kpx2-name" select="@kpx2"/><xsl:variable name="kern-name" select="@kern"/>
tmptable.put(Glyphs.glyphToString("<xsl:value-of select="$kpx2-name"/>"), new Integer(<xsl:value-of select="$kern-name"/>));</xsl:for-each>
kerning.put(Glyphs.glyphToString("<xsl:value-of select="$kpx1-name"/>"), tmptable);
</xsl:for-each>
}
public final boolean hasKerningInfo() {return kerning.isEmpty();}
- public final java.util.Hashtable getKerningInfo() {return kerning;}
+ public final java.util.HashMap getKerningInfo() {return kerning;}
public byte getSubType() {return org.apache.fop.pdf.PDFFont.TYPE1;}
public boolean isEmbeddable() {
import java.io.InputStream;
import java.io.FileInputStream;
import java.io.BufferedInputStream;
-import java.util.Hashtable;
+import java.util.HashMap;
public class <xsl:value-of select="class-name"/> extends Font implements FontDescriptor {
private final static String fontName = "<xsl:value-of select="font-name"/>";
private final static int firstChar = <xsl:value-of select="first-char"/>;
private final static int lastChar = <xsl:value-of select="last-char"/>;
private final static int[] width;
- private final static Hashtable kerning=new Hashtable();
+ private final static HashMap kerning=new HashMap();
static {
width = new int[256];
<!--<xsl:for-each select="widths/char"><xsl:variable name="char-name" select="@name"/><xsl:variable name="char-num" select="document('charlist.xml')/font-mappings/map[@adobe-name=$char-name]/@win-ansi"/><xsl:if test="$char-num!='-1'"> width[<xsl:value-of select="$char-num"/>] = <xsl:value-of select="@width"/>;</xsl:if>-->
<xsl:for-each select="widths/char"><xsl:variable name="char-name" select="@name"/> width[<xsl:value-of select="$char-name"/>] = <xsl:value-of select="@width"/>;
</xsl:for-each>
- Hashtable tmptable;
+ HashMap tmptable;
<xsl:for-each select="kerning">
<xsl:variable name="kpx1-name" select="@kpx1"/>
- tmptable=new Hashtable();<xsl:for-each select="pair"><xsl:variable name="kpx2-name" select="@kpx2"/><xsl:variable name="kern-name" select="@kern"/>
+ tmptable=new HashMap();<xsl:for-each select="pair"><xsl:variable name="kpx2-name" select="@kpx2"/><xsl:variable name="kern-name" select="@kern"/>
tmptable.put(Glyphs.glyphToString("<xsl:value-of select="$kpx2-name"/>"), new Integer(<xsl:value-of select="$kern-name"/>));</xsl:for-each>
kerning.put(Glyphs.glyphToString("<xsl:value-of select="$kpx1-name"/>"), tmptable);
</xsl:for-each>
}
public final boolean hasKerningInfo() {return kerning.isEmpty();}
- public final java.util.Hashtable getKerningInfo() {return kerning;}
+ public final java.util.HashMap getKerningInfo() {return kerning;}
public byte getSubType() {return org.apache.fop.pdf.PDFFont.TRUETYPE;}
public boolean isEmbeddable() {