diff options
Diffstat (limited to 'test/java/org/apache/fop/apps')
6 files changed, 50 insertions, 44 deletions
diff --git a/test/java/org/apache/fop/apps/AFPRendererConfBuilder.java b/test/java/org/apache/fop/apps/AFPRendererConfBuilder.java index 5e7204f9e..4bb3b71dd 100644 --- a/test/java/org/apache/fop/apps/AFPRendererConfBuilder.java +++ b/test/java/org/apache/fop/apps/AFPRendererConfBuilder.java @@ -25,25 +25,25 @@ import org.w3c.dom.Element; import org.apache.fop.apps.FopConfBuilder.RendererConfBuilder; import org.apache.fop.render.afp.AFPRendererConfig; -import org.apache.fop.render.afp.AFPRendererConfigOption; +import org.apache.fop.render.afp.AFPRendererOption; import org.apache.fop.render.afp.AFPShadingMode; import static org.apache.fop.render.afp.AFPRendererConfig.ImagesModeOptions.MODE_GRAYSCALE; -import static org.apache.fop.render.afp.AFPRendererConfigOption.DEFAULT_RESOURCE_LEVELS; -import static org.apache.fop.render.afp.AFPRendererConfigOption.IMAGES; -import static org.apache.fop.render.afp.AFPRendererConfigOption.IMAGES_DITHERING_QUALITY; -import static org.apache.fop.render.afp.AFPRendererConfigOption.IMAGES_FS45; -import static org.apache.fop.render.afp.AFPRendererConfigOption.IMAGES_JPEG; -import static org.apache.fop.render.afp.AFPRendererConfigOption.IMAGES_MAPPING_OPTION; -import static org.apache.fop.render.afp.AFPRendererConfigOption.IMAGES_MODE; -import static org.apache.fop.render.afp.AFPRendererConfigOption.IMAGES_NATIVE; -import static org.apache.fop.render.afp.AFPRendererConfigOption.IMAGES_WRAP_PSEG; -import static org.apache.fop.render.afp.AFPRendererConfigOption.JPEG_ALLOW_JPEG_EMBEDDING; -import static org.apache.fop.render.afp.AFPRendererConfigOption.JPEG_BITMAP_ENCODING_QUALITY; -import static org.apache.fop.render.afp.AFPRendererConfigOption.LINE_WIDTH_CORRECTION; -import static org.apache.fop.render.afp.AFPRendererConfigOption.RENDERER_RESOLUTION; -import static org.apache.fop.render.afp.AFPRendererConfigOption.RESOURCE_GROUP_URI; -import static org.apache.fop.render.afp.AFPRendererConfigOption.SHADING; +import static org.apache.fop.render.afp.AFPRendererOption.DEFAULT_RESOURCE_LEVELS; +import static org.apache.fop.render.afp.AFPRendererOption.IMAGES; +import static org.apache.fop.render.afp.AFPRendererOption.IMAGES_DITHERING_QUALITY; +import static org.apache.fop.render.afp.AFPRendererOption.IMAGES_FS45; +import static org.apache.fop.render.afp.AFPRendererOption.IMAGES_JPEG; +import static org.apache.fop.render.afp.AFPRendererOption.IMAGES_MAPPING_OPTION; +import static org.apache.fop.render.afp.AFPRendererOption.IMAGES_MODE; +import static org.apache.fop.render.afp.AFPRendererOption.IMAGES_NATIVE; +import static org.apache.fop.render.afp.AFPRendererOption.IMAGES_WRAP_PSEG; +import static org.apache.fop.render.afp.AFPRendererOption.JPEG_ALLOW_JPEG_EMBEDDING; +import static org.apache.fop.render.afp.AFPRendererOption.JPEG_BITMAP_ENCODING_QUALITY; +import static org.apache.fop.render.afp.AFPRendererOption.LINE_WIDTH_CORRECTION; +import static org.apache.fop.render.afp.AFPRendererOption.RENDERER_RESOLUTION; +import static org.apache.fop.render.afp.AFPRendererOption.RESOURCE_GROUP_URI; +import static org.apache.fop.render.afp.AFPRendererOption.SHADING; /** * A config builder specific to a particular renderer for specific MIME type. @@ -56,7 +56,7 @@ public final class AFPRendererConfBuilder extends RendererConfBuilder { super(MimeConstants.MIME_AFP); } - private AFPRendererConfBuilder createTextElement(AFPRendererConfigOption option, String value) { + private AFPRendererConfBuilder createTextElement(AFPRendererOption option, String value) { createTextElement(option.getName(), value); return this; } @@ -153,7 +153,11 @@ public final class AFPRendererConfBuilder extends RendererConfBuilder { return AFPRendererConfBuilder.this.endImages(); } - private ImagesBuilder setAttribute(AFPRendererConfigOption options, Object value) { + private ImagesBuilder setAttribute(AFPRendererOption options, String value) { + return setAttribute(options.getName(), value); + } + + private ImagesBuilder setAttribute(AFPRendererOption options, Object value) { return setAttribute(options.getName(), value); } diff --git a/test/java/org/apache/fop/apps/BitmapRendererConfBuilder.java b/test/java/org/apache/fop/apps/BitmapRendererConfBuilder.java index b0e468be0..9ea2a4e9e 100644 --- a/test/java/org/apache/fop/apps/BitmapRendererConfBuilder.java +++ b/test/java/org/apache/fop/apps/BitmapRendererConfBuilder.java @@ -21,11 +21,11 @@ package org.apache.fop.apps; import org.apache.fop.apps.FopConfBuilder.RendererConfBuilder; -import static org.apache.fop.render.bitmap.BitmapRendererConfigOption.ANTI_ALIASING; -import static org.apache.fop.render.bitmap.BitmapRendererConfigOption.BACKGROUND_COLOR; -import static org.apache.fop.render.bitmap.BitmapRendererConfigOption.COLOR_MODE; -import static org.apache.fop.render.bitmap.BitmapRendererConfigOption.JAVA2D_TRANSPARENT_PAGE_BACKGROUND; -import static org.apache.fop.render.bitmap.BitmapRendererConfigOption.RENDERING_QUALITY_ELEMENT; +import static org.apache.fop.render.bitmap.BitmapRendererOption.ANTI_ALIASING; +import static org.apache.fop.render.bitmap.BitmapRendererOption.BACKGROUND_COLOR; +import static org.apache.fop.render.bitmap.BitmapRendererOption.COLOR_MODE; +import static org.apache.fop.render.bitmap.BitmapRendererOption.JAVA2D_TRANSPARENT_PAGE_BACKGROUND; +import static org.apache.fop.render.bitmap.BitmapRendererOption.RENDERING_QUALITY_ELEMENT; public class BitmapRendererConfBuilder extends RendererConfBuilder { diff --git a/test/java/org/apache/fop/apps/PDFRendererConfBuilder.java b/test/java/org/apache/fop/apps/PDFRendererConfBuilder.java index bf16c59ca..13ca3df6b 100644 --- a/test/java/org/apache/fop/apps/PDFRendererConfBuilder.java +++ b/test/java/org/apache/fop/apps/PDFRendererConfBuilder.java @@ -22,19 +22,21 @@ package org.apache.fop.apps; import org.w3c.dom.Element; import org.apache.fop.apps.FopConfBuilder.RendererConfBuilder; +import org.apache.fop.pdf.PDFEncryptionParams; import org.apache.fop.render.RendererConfigOption; -import org.apache.fop.render.pdf.PDFRendererConfigOption; - -import static org.apache.fop.render.pdf.PDFRendererConfigOption.DISABLE_SRGB_COLORSPACE; -import static org.apache.fop.render.pdf.PDFRendererConfigOption.ENCRYPTION_LENGTH; -import static org.apache.fop.render.pdf.PDFRendererConfigOption.ENCRYPTION_PARAMS; -import static org.apache.fop.render.pdf.PDFRendererConfigOption.FILTER_LIST; -import static org.apache.fop.render.pdf.PDFRendererConfigOption.OUTPUT_PROFILE; -import static org.apache.fop.render.pdf.PDFRendererConfigOption.OWNER_PASSWORD; -import static org.apache.fop.render.pdf.PDFRendererConfigOption.PDF_A_MODE; -import static org.apache.fop.render.pdf.PDFRendererConfigOption.PDF_X_MODE; -import static org.apache.fop.render.pdf.PDFRendererConfigOption.USER_PASSWORD; -import static org.apache.fop.render.pdf.PDFRendererConfigOption.VERSION; +import org.apache.fop.render.pdf.PDFEncryptionOption; +import org.apache.fop.render.pdf.PDFRendererOption; + +import static org.apache.fop.render.pdf.PDFEncryptionOption.ENCRYPTION_LENGTH; +import static org.apache.fop.render.pdf.PDFEncryptionOption.ENCRYPTION_PARAMS; +import static org.apache.fop.render.pdf.PDFEncryptionOption.OWNER_PASSWORD; +import static org.apache.fop.render.pdf.PDFEncryptionOption.USER_PASSWORD; +import static org.apache.fop.render.pdf.PDFRendererOption.DISABLE_SRGB_COLORSPACE; +import static org.apache.fop.render.pdf.PDFRendererOption.FILTER_LIST; +import static org.apache.fop.render.pdf.PDFRendererOption.OUTPUT_PROFILE; +import static org.apache.fop.render.pdf.PDFRendererOption.PDF_A_MODE; +import static org.apache.fop.render.pdf.PDFRendererOption.PDF_X_MODE; +import static org.apache.fop.render.pdf.PDFRendererOption.VERSION; /** * A config builder specific to a particular renderer for specific MIME type. @@ -97,7 +99,7 @@ public final class PDFRendererConfBuilder extends RendererConfBuilder { private final Element el; private EncryptionParamsBuilder() { - el = createElement(ENCRYPTION_PARAMS.getName()); + el = createElement(ENCRYPTION_PARAMS); } public EncryptionParamsBuilder setEncryptionLength(int length) { @@ -115,7 +117,7 @@ public final class PDFRendererConfBuilder extends RendererConfBuilder { return this; } - public EncryptionParamsBuilder setAllowParam(PDFRendererConfigOption option) { + public EncryptionParamsBuilder setAllowParam(PDFEncryptionOption option) { el.appendChild(createElement(option.getName())); return this; } diff --git a/test/java/org/apache/fop/apps/PSRendererConfBuilder.java b/test/java/org/apache/fop/apps/PSRendererConfBuilder.java index 2fec155ff..92d2ce45e 100644 --- a/test/java/org/apache/fop/apps/PSRendererConfBuilder.java +++ b/test/java/org/apache/fop/apps/PSRendererConfBuilder.java @@ -21,11 +21,11 @@ package org.apache.fop.apps; import org.apache.fop.apps.FopConfBuilder.RendererConfBuilder; -import static org.apache.fop.render.ps.PSRendererConfigurationOption.AUTO_ROTATE_LANDSCAPE; -import static org.apache.fop.render.ps.PSRendererConfigurationOption.DSC_COMPLIANT; -import static org.apache.fop.render.ps.PSRendererConfigurationOption.LANGUAGE_LEVEL; -import static org.apache.fop.render.ps.PSRendererConfigurationOption.OPTIMIZE_RESOURCES; -import static org.apache.fop.render.ps.PSRendererConfigurationOption.SAFE_SET_PAGE_DEVICE; +import static org.apache.fop.render.ps.PSRendererOption.AUTO_ROTATE_LANDSCAPE; +import static org.apache.fop.render.ps.PSRendererOption.DSC_COMPLIANT; +import static org.apache.fop.render.ps.PSRendererOption.LANGUAGE_LEVEL; +import static org.apache.fop.render.ps.PSRendererOption.OPTIMIZE_RESOURCES; +import static org.apache.fop.render.ps.PSRendererOption.SAFE_SET_PAGE_DEVICE; /** * A fop conf builder specific to a particular renderer for Postscript. diff --git a/test/java/org/apache/fop/apps/TIFFRendererConfBuilder.java b/test/java/org/apache/fop/apps/TIFFRendererConfBuilder.java index 0ae06e62f..8b72a558d 100644 --- a/test/java/org/apache/fop/apps/TIFFRendererConfBuilder.java +++ b/test/java/org/apache/fop/apps/TIFFRendererConfBuilder.java @@ -19,7 +19,7 @@ package org.apache.fop.apps; -import static org.apache.fop.render.bitmap.TIFFRendererConfig.TIFFRendererConfigOption.COMPRESSION; +import static org.apache.fop.render.bitmap.TIFFRendererConfig.TIFFRendererOption.COMPRESSION; public class TIFFRendererConfBuilder extends BitmapRendererConfBuilder { diff --git a/test/java/org/apache/fop/apps/TxtRendererConfBuilder.java b/test/java/org/apache/fop/apps/TxtRendererConfBuilder.java index 3e022762a..816b59b11 100644 --- a/test/java/org/apache/fop/apps/TxtRendererConfBuilder.java +++ b/test/java/org/apache/fop/apps/TxtRendererConfBuilder.java @@ -21,7 +21,7 @@ package org.apache.fop.apps; import org.apache.fop.apps.FopConfBuilder.RendererConfBuilder; -import static org.apache.fop.render.txt.TxtRendererConfig.TxtRendererConfigOption.ENCODING; +import static org.apache.fop.render.txt.TxtRendererConfig.TxtRendererOption.ENCODING; public class TxtRendererConfBuilder extends RendererConfBuilder { |