aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/extensions
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2001-12-13 09:40:04 +0000
committerKeiron Liddle <keiron@apache.org>2001-12-13 09:40:04 +0000
commit0c1075bfe6de132c82ae58d1e8370f777c4995ef (patch)
tree4c3df4fecbd795326d895fe7c4af48b9bd0be825 /src/org/apache/fop/extensions
parent08a0cfd14dc86ad6c856821ee3cceb40d23b97ea (diff)
downloadxmlgraphics-fop-0c1075bfe6de132c82ae58d1e8370f777c4995ef.tar.gz
xmlgraphics-fop-0c1075bfe6de132c82ae58d1e8370f777c4995ef.zip
properly setup the element mappings
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194604 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/extensions')
-rw-r--r--src/org/apache/fop/extensions/ExtensionElementMapping.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/org/apache/fop/extensions/ExtensionElementMapping.java b/src/org/apache/fop/extensions/ExtensionElementMapping.java
index c14d0d353..479c4b3ca 100644
--- a/src/org/apache/fop/extensions/ExtensionElementMapping.java
+++ b/src/org/apache/fop/extensions/ExtensionElementMapping.java
@@ -19,22 +19,26 @@ public class ExtensionElementMapping implements ElementMapping {
private static HashMap foObjs = null;
- public synchronized void addToBuilder(FOTreeBuilder builder) {
+ private static synchronized void setupExt() {
if(foObjs == null) {
- foObjs = new HashMap();
+ foObjs = new HashMap();
foObjs.put("outline", new O());
foObjs.put("label", new L());
}
+ }
+
+ public void addToBuilder(FOTreeBuilder builder) {
+ setupExt();
builder.addMapping(URI, foObjs);
}
- class O extends ElementMapping.Maker {
+ static class O extends ElementMapping.Maker {
public FONode make(FONode parent) {
return new Outline(parent);
}
}
- class L extends ElementMapping.Maker {
+ static class L extends ElementMapping.Maker {
public FONode make(FONode parent) {
return new Label(parent);
}