aboutsummaryrefslogtreecommitdiffstats
path: root/examples/plan
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2008-07-24 09:35:34 +0000
committerVincent Hennebert <vhennebert@apache.org>2008-07-24 09:35:34 +0000
commit92df262a0778ee539c849454be2810621dac1b7e (patch)
treed5be9359cbacb91dffcab6f1a6ecfe61e9db2c6b /examples/plan
parent30e2ce5bee38cbc32758e0b65fa7f98f3db76baa (diff)
downloadxmlgraphics-fop-92df262a0778ee539c849454be2810621dac1b7e.tar.gz
xmlgraphics-fop-92df262a0778ee539c849454be2810621dac1b7e.zip
Fed up with all those trailing whitespaces. Let's remove them all (once... and for all?)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@679326 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'examples/plan')
-rw-r--r--examples/plan/src/org/apache/fop/plan/ActionInfo.java8
-rw-r--r--examples/plan/src/org/apache/fop/plan/EventList.java8
-rw-r--r--examples/plan/src/org/apache/fop/plan/GroupInfo.java8
-rw-r--r--examples/plan/src/org/apache/fop/plan/Main.java6
-rw-r--r--examples/plan/src/org/apache/fop/plan/PlanDrawer.java8
-rw-r--r--examples/plan/src/org/apache/fop/plan/PlanElement.java10
-rw-r--r--examples/plan/src/org/apache/fop/plan/PlanElementMapping.java8
-rw-r--r--examples/plan/src/org/apache/fop/plan/PlanHints.java8
-rw-r--r--examples/plan/src/org/apache/fop/plan/PlanObj.java6
-rw-r--r--examples/plan/src/org/apache/fop/plan/PlanRenderer.java10
-rw-r--r--examples/plan/src/org/apache/fop/plan/PreloaderPlan.java14
-rw-r--r--examples/plan/src/org/apache/fop/plan/SimplePlanDrawer.java26
12 files changed, 60 insertions, 60 deletions
diff --git a/examples/plan/src/org/apache/fop/plan/ActionInfo.java b/examples/plan/src/org/apache/fop/plan/ActionInfo.java
index 350ccce8f..1535ed5ec 100644
--- a/examples/plan/src/org/apache/fop/plan/ActionInfo.java
+++ b/examples/plan/src/org/apache/fop/plan/ActionInfo.java
@@ -5,9 +5,9 @@
* 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.
@@ -16,13 +16,13 @@
*/
/* $Id$ */
-
+
package org.apache.fop.plan;
import java.util.Date;
public class ActionInfo {
-
+
public static final int TASK = 1;
public static final int MILESTONE = 2;
public static final int GROUPING = 3;
diff --git a/examples/plan/src/org/apache/fop/plan/EventList.java b/examples/plan/src/org/apache/fop/plan/EventList.java
index 188c9975a..53b32f7c0 100644
--- a/examples/plan/src/org/apache/fop/plan/EventList.java
+++ b/examples/plan/src/org/apache/fop/plan/EventList.java
@@ -5,9 +5,9 @@
* 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.
@@ -16,13 +16,13 @@
*/
/* $Id$ */
-
+
package org.apache.fop.plan;
import java.util.List;
public class EventList {
-
+
private List data = new java.util.ArrayList();
public void addGroupInfo(GroupInfo set) {
diff --git a/examples/plan/src/org/apache/fop/plan/GroupInfo.java b/examples/plan/src/org/apache/fop/plan/GroupInfo.java
index e94170d76..a83228197 100644
--- a/examples/plan/src/org/apache/fop/plan/GroupInfo.java
+++ b/examples/plan/src/org/apache/fop/plan/GroupInfo.java
@@ -5,9 +5,9 @@
* 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.
@@ -16,13 +16,13 @@
*/
/* $Id$ */
-
+
package org.apache.fop.plan;
import java.util.List;
public class GroupInfo {
-
+
private String name;
private List actions = new java.util.ArrayList();
diff --git a/examples/plan/src/org/apache/fop/plan/Main.java b/examples/plan/src/org/apache/fop/plan/Main.java
index c2b1a5ad5..7b6f5a05e 100644
--- a/examples/plan/src/org/apache/fop/plan/Main.java
+++ b/examples/plan/src/org/apache/fop/plan/Main.java
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.plan;
import java.io.InputStream;
diff --git a/examples/plan/src/org/apache/fop/plan/PlanDrawer.java b/examples/plan/src/org/apache/fop/plan/PlanDrawer.java
index 8398659e0..7f79bb737 100644
--- a/examples/plan/src/org/apache/fop/plan/PlanDrawer.java
+++ b/examples/plan/src/org/apache/fop/plan/PlanDrawer.java
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.plan;
import java.util.HashMap;
@@ -27,7 +27,7 @@ import org.w3c.dom.Document;
* This interface defines how a plan drawer is converted.
*/
public interface PlanDrawer {
-
+
Document createDocument(EventList data, float w, float h,
HashMap hints);
}
diff --git a/examples/plan/src/org/apache/fop/plan/PlanElement.java b/examples/plan/src/org/apache/fop/plan/PlanElement.java
index d910076c6..e7fb8a1e7 100644
--- a/examples/plan/src/org/apache/fop/plan/PlanElement.java
+++ b/examples/plan/src/org/apache/fop/plan/PlanElement.java
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.plan;
import java.awt.geom.Point2D;
@@ -48,7 +48,7 @@ public class PlanElement extends PlanObj {
}
/** {@inheritDoc} */
- public void processNode(String elementName, Locator locator,
+ public void processNode(String elementName, Locator locator,
Attributes attlist, PropertyList propertyList)
throws FOPException {
super.processNode(elementName, locator, attlist, propertyList);
@@ -67,7 +67,7 @@ public class PlanElement extends PlanObj {
svgDoc = pr.createSVGDocument(doc);
width = pr.getWidth();
height = pr.getHeight();
-
+
doc = svgDoc;
}
} catch (Throwable t) {
diff --git a/examples/plan/src/org/apache/fop/plan/PlanElementMapping.java b/examples/plan/src/org/apache/fop/plan/PlanElementMapping.java
index c33c25edf..781fd8371 100644
--- a/examples/plan/src/org/apache/fop/plan/PlanElementMapping.java
+++ b/examples/plan/src/org/apache/fop/plan/PlanElementMapping.java
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.plan;
import org.w3c.dom.DOMImplementation;
@@ -30,7 +30,7 @@ import org.apache.fop.fo.FONode;
public class PlanElementMapping extends ElementMapping {
/** Plan Namespace */
- public static final String NAMESPACE = "http://xmlgraphics.apache.org/fop/plan";
+ public static final String NAMESPACE = "http://xmlgraphics.apache.org/fop/plan";
/** Main constructor. */
public PlanElementMapping() {
diff --git a/examples/plan/src/org/apache/fop/plan/PlanHints.java b/examples/plan/src/org/apache/fop/plan/PlanHints.java
index 0411262ab..2a2c1333a 100644
--- a/examples/plan/src/org/apache/fop/plan/PlanHints.java
+++ b/examples/plan/src/org/apache/fop/plan/PlanHints.java
@@ -5,9 +5,9 @@
* 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.
@@ -16,14 +16,14 @@
*/
/* $Id$ */
-
+
package org.apache.fop.plan;
/**
* This interface defines some constants for use in the plan package.
*/
public interface PlanHints {
-
+
/** Border attribute */
public static final String PLAN_BORDER = "border";
/** Legend attribute */
diff --git a/examples/plan/src/org/apache/fop/plan/PlanObj.java b/examples/plan/src/org/apache/fop/plan/PlanObj.java
index 36f3243a6..ca26a8039 100644
--- a/examples/plan/src/org/apache/fop/plan/PlanObj.java
+++ b/examples/plan/src/org/apache/fop/plan/PlanObj.java
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.plan;
// FOP
diff --git a/examples/plan/src/org/apache/fop/plan/PlanRenderer.java b/examples/plan/src/org/apache/fop/plan/PlanRenderer.java
index 0b592adc6..8b7978259 100644
--- a/examples/plan/src/org/apache/fop/plan/PlanRenderer.java
+++ b/examples/plan/src/org/apache/fop/plan/PlanRenderer.java
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.plan;
@@ -34,9 +34,9 @@ import org.w3c.dom.NodeList;
import org.apache.batik.dom.svg.SVGDOMImplementation;
public class PlanRenderer {
-
+
private static final String SVG_NAMESPACE = SVGDOMImplementation.SVG_NAMESPACE_URI;
-
+
private String fontFamily = "sansserif";
private float fontSize = 12;
private String type = "";
diff --git a/examples/plan/src/org/apache/fop/plan/PreloaderPlan.java b/examples/plan/src/org/apache/fop/plan/PreloaderPlan.java
index 58d5be477..b8a7a612c 100644
--- a/examples/plan/src/org/apache/fop/plan/PreloaderPlan.java
+++ b/examples/plan/src/org/apache/fop/plan/PreloaderPlan.java
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.plan;
import java.io.IOException;
@@ -52,7 +52,7 @@ public class PreloaderPlan extends AbstractImagePreloader {
/** Logger instance */
private static Log log = LogFactory.getLog(PreloaderPlan.class);
- /** {@inheritDoc} */
+ /** {@inheritDoc} */
public ImageInfo preloadImage(String uri, Source src, ImageContext context)
throws IOException {
if (!ImageUtil.hasInputStream(src)) {
@@ -75,13 +75,13 @@ public class PreloaderPlan extends AbstractImagePreloader {
Source source = new StreamSource(in);
DOMResult res = new DOMResult();
transformer.transform(source, res);
-
+
//Have to render the plan to know its size
PlanRenderer pr = new PlanRenderer();
Document svgDoc = pr.createSVGDocument((Document)res.getNode());
float width = pr.getWidth();
float height = pr.getHeight();
-
+
//Return converted SVG image
ImageInfo info = new ImageInfo(uri, "image/svg+xml");
final ImageSize size = new ImageSize();
@@ -97,7 +97,7 @@ public class PreloaderPlan extends AbstractImagePreloader {
Image image = new ImageXMLDOM(info, svgDoc,
svgDoc.getDocumentElement().getNamespaceURI());
info.getCustomObjects().put(ImageInfo.ORIGINAL_IMAGE, image);
-
+
return info;
} catch (TransformerException e) {
try {
diff --git a/examples/plan/src/org/apache/fop/plan/SimplePlanDrawer.java b/examples/plan/src/org/apache/fop/plan/SimplePlanDrawer.java
index 71025f15b..b49256a31 100644
--- a/examples/plan/src/org/apache/fop/plan/SimplePlanDrawer.java
+++ b/examples/plan/src/org/apache/fop/plan/SimplePlanDrawer.java
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.plan;
import java.text.DateFormat;
@@ -35,9 +35,9 @@ import org.apache.fop.svg.SVGUtilities;
* Simple plan drawer implementation.
*/
public class SimplePlanDrawer implements PlanDrawer {
-
+
private static final String SVG_NAMESPACE = SVGDOMImplementation.SVG_NAMESPACE_URI;
-
+
private float fontSize;
private HashMap hints;
private java.awt.Font font = null;
@@ -91,8 +91,8 @@ public class SimplePlanDrawer implements PlanDrawer {
svgRoot.setAttributeNS(null, "width", "" + width);
svgRoot.setAttributeNS(null, "height", "" + height);
svgRoot.setAttributeNS(null, "style",
- "font-size:" + 8
- + ";font-family:"
+ "font-size:" + 8
+ + ";font-family:"
+ hints.get(PlanHints.FONT_FAMILY));
font = new java.awt.Font((String)hints.get(PlanHints.FONT_FAMILY),
@@ -249,8 +249,8 @@ public class SimplePlanDrawer implements PlanDrawer {
taskGraphic = SVGUtilities.createRect(doc,
left + daysToStart * 300 / (totalDays - 2),
topEdge + 2, days * 300 / (totalDays - 2), 10);
- taskGraphic.setAttributeNS(null,
- "style",
+ taskGraphic.setAttributeNS(null,
+ "style",
"stroke:black;fill:blue;stroke-width:1;clip-path:url(#clip3)");
g.appendChild(taskGraphic);
break;
@@ -259,8 +259,8 @@ public class SimplePlanDrawer implements PlanDrawer {
"m " + (left
+ daysToStart * 300 / (totalDays - 2) - 6)
+ " " + (topEdge + 6) + "l6 6l6-6l-6-6z");
- taskGraphic.setAttributeNS(null,
- "style",
+ taskGraphic.setAttributeNS(null,
+ "style",
"stroke:black;fill:black;stroke-width:1;clip-path:url(#clip3)");
g.appendChild(taskGraphic);
text = SVGUtilities.createText(doc,
@@ -271,7 +271,7 @@ public class SimplePlanDrawer implements PlanDrawer {
break;
case ActionInfo.GROUPING:
taskGraphic = SVGUtilities.createPath(doc,
- "m " + (left
+ "m " + (left
+ daysToStart * 300 / (totalDays - 2) - 6)
+ " " + (topEdge + 6) + "l6 -6l"
+ (days * 300 / (totalDays - 2))
@@ -279,7 +279,7 @@ public class SimplePlanDrawer implements PlanDrawer {
+ -(days * 300 / (totalDays - 2) - 8)
+ " 0l-4 4l-6-6z");
taskGraphic.setAttributeNS(null,
- "style",
+ "style",
"stroke:black;fill:black;stroke-width:1;clip-path:url(#clip3)");
g.appendChild(taskGraphic);
break;