aboutsummaryrefslogtreecommitdiffstats
path: root/test/java/org/apache/fop/render/pcl/PCLRendererConfBuilder.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/java/org/apache/fop/render/pcl/PCLRendererConfBuilder.java')
-rw-r--r--test/java/org/apache/fop/render/pcl/PCLRendererConfBuilder.java60
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;
+ }
+
+}