diff options
author | Mehdi Houshmand <mehdi@apache.org> | 2012-05-31 08:33:36 +0000 |
---|---|---|
committer | Mehdi Houshmand <mehdi@apache.org> | 2012-05-31 08:33:36 +0000 |
commit | eccd73c523bdda6a0634e9849141492f7b14ad63 (patch) | |
tree | 72f06ec1481249bdd639083ee646b3c3fd4be7a4 /test/java/org/apache/fop/render/pcl/PCLRendererConfBuilder.java | |
parent | 05761b1df54ada8a762bfa879dc0e3455d33d828 (diff) | |
download | xmlgraphics-fop-eccd73c523bdda6a0634e9849141492f7b14ad63.tar.gz xmlgraphics-fop-eccd73c523bdda6a0634e9849141492f7b14ad63.zip |
Started unifying URI resolution mechanism, redesigned configuration system and created flexible config testing
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_URI_Unification@1344594 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/java/org/apache/fop/render/pcl/PCLRendererConfBuilder.java')
-rw-r--r-- | test/java/org/apache/fop/render/pcl/PCLRendererConfBuilder.java | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/test/java/org/apache/fop/render/pcl/PCLRendererConfBuilder.java b/test/java/org/apache/fop/render/pcl/PCLRendererConfBuilder.java new file mode 100644 index 000000000..bba656e78 --- /dev/null +++ b/test/java/org/apache/fop/render/pcl/PCLRendererConfBuilder.java @@ -0,0 +1,60 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* $Id$ */ + +package org.apache.fop.render.pcl; + + +import org.apache.fop.apps.FopConfBuilder.RendererConfBuilder; +import org.apache.fop.apps.MimeConstants; +import org.apache.fop.render.pcl.PCLRendererConfig.Options; + +import static org.apache.fop.render.pcl.PCLRendererConfig.Options.DISABLE_PJL; +import static org.apache.fop.render.pcl.PCLRendererConfig.Options.RENDERING_MODE; +import static org.apache.fop.render.pcl.PCLRendererConfig.Options.TEXT_RENDERING; +/** + * A config builder specific to a particular renderer for specific MIME type. + */ +public final class PCLRendererConfBuilder extends RendererConfBuilder { + + public PCLRendererConfBuilder() { + super(MimeConstants.MIME_PCL); + } + + public PCLRendererConfBuilder setRenderingMode(PCLRenderingMode mode) { + return setRenderingMode(mode.getName()); + } + + public PCLRendererConfBuilder setRenderingMode(String value) { + return createTextElement(RENDERING_MODE, value); + } + + public PCLRendererConfBuilder setTextRendering(String value) { + return createTextElement(TEXT_RENDERING, value); + } + + public PCLRendererConfBuilder setDisablePjl(boolean value) { + return createTextElement(DISABLE_PJL, String.valueOf(value)); + } + + private PCLRendererConfBuilder createTextElement(Options option, String value) { + createTextElement(option.getName(), value); + return this; + } + +} |