aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2010-08-14 19:28:26 +0000
committerJeremias Maerki <jeremias@apache.org>2010-08-14 19:28:26 +0000
commitaba436311c935f145aa984c855f88bfd3a9cb1c1 (patch)
treeeed5354cd32bc16c1c147325ee4b108a3d9016cb /examples
parent29e8badcec8bd40eca2ef4940133f08eeefdda11 (diff)
downloadxmlgraphics-fop-aba436311c935f145aa984c855f88bfd3a9cb1c1.tar.gz
xmlgraphics-fop-aba436311c935f145aa984c855f88bfd3a9cb1c1.zip
Removed many "// CSOK: ConstantName" instances for constants, by converting them to uppercase as they should really be.
Fixed some other non-Checkstyle issues on the way, imports mainly. Removed some "log" instances that were not used. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@985571 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'examples')
-rw-r--r--examples/plan/src/org/apache/fop/plan/PlanHints.java18
-rw-r--r--examples/plan/src/org/apache/fop/plan/PlanRenderer.java5
-rw-r--r--examples/plan/src/org/apache/fop/plan/SimplePlanDrawer.java8
3 files changed, 16 insertions, 15 deletions
diff --git a/examples/plan/src/org/apache/fop/plan/PlanHints.java b/examples/plan/src/org/apache/fop/plan/PlanHints.java
index 2a2c1333a..a50d91139 100644
--- a/examples/plan/src/org/apache/fop/plan/PlanHints.java
+++ b/examples/plan/src/org/apache/fop/plan/PlanHints.java
@@ -25,22 +25,22 @@ package org.apache.fop.plan;
public interface PlanHints {
/** Border attribute */
- public static final String PLAN_BORDER = "border";
+ String PLAN_BORDER = "border";
/** Legend attribute */
- public static final String PLAN_LEGEND = "legend";
+ String PLAN_LEGEND = "legend";
/** Font family attribute */
- public static final String FONT_FAMILY = "font-family";
+ String FONT_FAMILY = "font-family";
/** Font size attribute */
- public static final String FONT_SIZE = "font-size";
+ String FONT_SIZE = "font-size";
/** Legent type attribute */
- public static final String LEGEND_TYPE = "legendType";
+ String LEGEND_TYPE = "legendType";
/** Locale attribute */
- public static final String LOCALE = "locale";
+ String LOCALE = "locale";
/** Label type attribute */
- public static final String LABEL_TYPE = "labelType";
+ String LABEL_TYPE = "labelType";
/** Label font size attribute */
- public static final String LABEL_FONT_SIZE = "labelFontSize";
+ String LABEL_FONT_SIZE = "labelFontSize";
/** Label font attribute */
- public static final String LABEL_FONT = "labelFont";
+ String LABEL_FONT = "labelFont";
}
diff --git a/examples/plan/src/org/apache/fop/plan/PlanRenderer.java b/examples/plan/src/org/apache/fop/plan/PlanRenderer.java
index 8b7978259..7d41962fb 100644
--- a/examples/plan/src/org/apache/fop/plan/PlanRenderer.java
+++ b/examples/plan/src/org/apache/fop/plan/PlanRenderer.java
@@ -109,8 +109,8 @@ public class PlanRenderer {
hints.put(PlanHints.FONT_FAMILY, fontFamily);
hints.put(PlanHints.FONT_SIZE, new Float(fontSize));
hints.put(PlanHints.LOCALE, locale);
- Document doc =
- planDrawer.createDocument(data, width, height, hints);
+ Document doc
+ = planDrawer.createDocument(data, width, height, hints);
return doc;
}
@@ -152,6 +152,7 @@ public class PlanRenderer {
} else if (t.equals("grouping")) {
data.setType(ActionInfo.GROUPING);
} else {
+ throw new IllegalArgumentException("Unknown action type: " + t);
}
for (int i = 0; i < childs.getLength(); i++) {
diff --git a/examples/plan/src/org/apache/fop/plan/SimplePlanDrawer.java b/examples/plan/src/org/apache/fop/plan/SimplePlanDrawer.java
index 46b07601a..a8ba062ed 100644
--- a/examples/plan/src/org/apache/fop/plan/SimplePlanDrawer.java
+++ b/examples/plan/src/org/apache/fop/plan/SimplePlanDrawer.java
@@ -243,8 +243,8 @@ public class SimplePlanDrawer implements PlanDrawer {
- lastWeek.getTime() + 43200000) / 86400000);
int days = (int)((end.getTime() - start.getTime()
+ 43200000) / 86400000);
- int daysFromEnd =
- (int)((future.getTime() - end.getTime()
+ int daysFromEnd
+ = (int)((future.getTime() - end.getTime()
+ 43200000) / 86400000);
Element taskGraphic;
switch (type) {
@@ -299,8 +299,8 @@ public class SimplePlanDrawer implements PlanDrawer {
topEdge = lastTop;
}
}
- int currentDays =
- (int)((currentDate.getTime() - lastWeek.getTime()
+ int currentDays
+ = (int)((currentDate.getTime() - lastWeek.getTime()
+ 43200000) / 86400000);
text = SVGUtilities.createText(doc,