diff options
author | Jeremias Maerki <jeremias@apache.org> | 2004-08-15 09:57:07 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2004-08-15 09:57:07 +0000 |
commit | 965c0835b0c83b404582e05d8dac5366dde1aa14 (patch) | |
tree | 25584cd19355a98acd5440f5836c11c344330001 | |
parent | 573ad6b538bbb7c44b5cf43c90525ca95ba14bb5 (diff) | |
download | xmlgraphics-fop-965c0835b0c83b404582e05d8dac5366dde1aa14.tar.gz xmlgraphics-fop-965c0835b0c83b404582e05d8dac5366dde1aa14.zip |
JDK 1.5 compile-time compatibility (still doesn't compile under 1.5, yet)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197875 13f79535-47bb-0310-9956-ffa450edef68
5 files changed, 40 insertions, 25 deletions
diff --git a/src/java-1.4/org/apache/fop/svg/GraphicsConfiguration.java b/src/java-1.4/org/apache/fop/svg/GraphicsConfiguration.java index 06967860f..ae2b4c8e5 100644 --- a/src/java-1.4/org/apache/fop/svg/GraphicsConfiguration.java +++ b/src/java-1.4/org/apache/fop/svg/GraphicsConfiguration.java @@ -18,6 +18,9 @@ package org.apache.fop.svg; + +import java.awt.image.VolatileImage; + /** * Adapter to allow subclassing java.awt.GraphicsConfiguration without * compilation errors. @@ -28,7 +31,19 @@ package org.apache.fop.svg; */ abstract public class GraphicsConfiguration extends java.awt.GraphicsConfiguration { - public java.awt.image.VolatileImage createCompatibleVolatileImage(int width, int height) { + /** + * @see java.awt.GraphicsConfiguration#createCompatibleVolatileImage(int, int) + * @since JDK 1.4 + */ + public VolatileImage createCompatibleVolatileImage(int width, int height) { + return null; + } + + /** + * @see java.awt.GraphicsConfiguration#createCompatibleVolatileImage(int, int, int) + * @since JDK 1.5 + */ + public VolatileImage createCompatibleVolatileImage(int width, int height, int transparency) { return null; } diff --git a/src/java/org/apache/fop/fo/FOPropertyMapping.java b/src/java/org/apache/fop/fo/FOPropertyMapping.java index 418a73720..54d89b247 100644 --- a/src/java/org/apache/fop/fo/FOPropertyMapping.java +++ b/src/java/org/apache/fop/fo/FOPropertyMapping.java @@ -384,14 +384,14 @@ public class FOPropertyMapping implements Constants { * @param enum A enum value from Constants.java. * @return An EnumProperty instance. */ - private Property makeEnumProperty(int enum) { + private Property makeEnumProperty(int enumValue) { if (enums == null) { enums = new Property[200]; } - if (enums[enum] == null) { - enums[enum] = new EnumProperty(enum); + if (enums[enumValue] == null) { + enums[enumValue] = new EnumProperty(enumValue); } - return enums[enum]; + return enums[enumValue]; } /** diff --git a/src/java/org/apache/fop/fonts/apps/PFMReader.java b/src/java/org/apache/fop/fonts/apps/PFMReader.java index 822945a03..38d652ab2 100644 --- a/src/java/org/apache/fop/fonts/apps/PFMReader.java +++ b/src/java/org/apache/fop/fonts/apps/PFMReader.java @@ -371,9 +371,9 @@ public class PFMReader { // Get kerning - Iterator enum = pfm.getKerning().keySet().iterator(); - while (enum.hasNext()) { - Integer kpx1 = (Integer)enum.next(); + Iterator iter = pfm.getKerning().keySet().iterator(); + while (iter.hasNext()) { + Integer kpx1 = (Integer)iter.next(); el = doc.createElement("kerning"); el.setAttribute("kpx1", kpx1.toString()); root.appendChild(el); diff --git a/src/java/org/apache/fop/fonts/apps/TTFReader.java b/src/java/org/apache/fop/fonts/apps/TTFReader.java index 940eb4c08..3cc7f4871 100644 --- a/src/java/org/apache/fop/fonts/apps/TTFReader.java +++ b/src/java/org/apache/fop/fonts/apps/TTFReader.java @@ -404,9 +404,9 @@ public class TTFReader { el = doc.createElement("bfranges"); mel.appendChild(el); - Iterator e = ttf.getCMaps().listIterator(); - while (e.hasNext()) { - TTFCmapEntry ce = (TTFCmapEntry)e.next(); + Iterator iter = ttf.getCMaps().listIterator(); + while (iter.hasNext()) { + TTFCmapEntry ce = (TTFCmapEntry)iter.next(); Element el2 = doc.createElement("bf"); el.appendChild(el2); el2.setAttribute("us", String.valueOf(ce.getUnicodeStart())); @@ -461,15 +461,15 @@ public class TTFReader { Document doc = parent.getOwnerDocument(); // Get kerning - Iterator enum; + Iterator iter; if (isCid) { - enum = ttf.getKerning().keySet().iterator(); + iter = ttf.getKerning().keySet().iterator(); } else { - enum = ttf.getAnsiKerning().keySet().iterator(); + iter = ttf.getAnsiKerning().keySet().iterator(); } - while (enum.hasNext()) { - Integer kpx1 = (Integer)enum.next(); + while (iter.hasNext()) { + Integer kpx1 = (Integer)iter.next(); el = doc.createElement("kerning"); el.setAttribute("kpx1", kpx1.toString()); @@ -483,9 +483,9 @@ public class TTFReader { h2 = (Map)ttf.getAnsiKerning().get(kpx1); } - Iterator enum2 = h2.keySet().iterator(); - while (enum2.hasNext()) { - Integer kpx2 = (Integer)enum2.next(); + Iterator iter2 = h2.keySet().iterator(); + while (iter2.hasNext()) { + Integer kpx2 = (Integer)iter2.next(); if (isCid || kpx2.intValue() < 256) { el2 = doc.createElement("pair"); el2.setAttribute("kpx2", kpx2.toString()); diff --git a/src/java/org/apache/fop/render/ps/PSProcSets.java b/src/java/org/apache/fop/render/ps/PSProcSets.java index 604239da1..abd019252 100644 --- a/src/java/org/apache/fop/render/ps/PSProcSets.java +++ b/src/java/org/apache/fop/render/ps/PSProcSets.java @@ -194,9 +194,9 @@ public final class PSProcSets { // write("/gfF1{/Helvetica findfont} bd"); // write("/gfF3{/Helvetica-Bold findfont} bd"); Map fonts = fontInfo.getFonts(); - Iterator enum = fonts.keySet().iterator(); - while (enum.hasNext()) { - String key = (String)enum.next(); + Iterator iter = fonts.keySet().iterator(); + while (iter.hasNext()) { + String key = (String)iter.next(); Typeface fm = (Typeface)fonts.get(key); gen.writeln("/" + key + " /" + fm.getFontName() + " def"); } @@ -205,9 +205,9 @@ public final class PSProcSets { defineWinAnsiEncoding(gen); //Rewrite font encodings - enum = fonts.keySet().iterator(); - while (enum.hasNext()) { - String key = (String)enum.next(); + iter = fonts.keySet().iterator(); + while (iter.hasNext()) { + String key = (String)iter.next(); Typeface fm = (Typeface)fonts.get(key); if (null == fm.getEncoding()) { //ignore (ZapfDingbats and Symbol run through here |