aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop
diff options
context:
space:
mode:
authorWilliam Victor Mote <vmote@apache.org>2003-08-28 18:03:13 +0000
committerWilliam Victor Mote <vmote@apache.org>2003-08-28 18:03:13 +0000
commitab7494d58f7700b379bff55a9ad1b832295004a2 (patch)
tree5c4dc161589438181c34e500503b99d16309159f /src/java/org/apache/fop
parentbe54e3f36b8b03b02c1c274e578dc12509f686c3 (diff)
downloadxmlgraphics-fop-ab7494d58f7700b379bff55a9ad1b832295004a2.tar.gz
xmlgraphics-fop-ab7494d58f7700b379bff55a9ad1b832295004a2.zip
move fo/pagination/StaticContent.getLayoutManager() to layoutmgr/PageLayoutManager.getStaticContentLayoutManager()
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196869 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop')
-rw-r--r--src/java/org/apache/fop/fo/pagination/StaticContent.java15
-rw-r--r--src/java/org/apache/fop/layoutmgr/PageLayoutManager.java12
2 files changed, 11 insertions, 16 deletions
diff --git a/src/java/org/apache/fop/fo/pagination/StaticContent.java b/src/java/org/apache/fop/fo/pagination/StaticContent.java
index 39c5d3117..a996e2e5d 100644
--- a/src/java/org/apache/fop/fo/pagination/StaticContent.java
+++ b/src/java/org/apache/fop/fo/pagination/StaticContent.java
@@ -54,7 +54,6 @@ package org.apache.fop.fo.pagination;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FOTreeVisitor;
import org.apache.fop.apps.FOPException;
-import org.apache.fop.layoutmgr.StaticContentLayoutManager;
/**
* Class modelling the fo:static-content object. See Sec. 6.4.19 of the XSL-FO
@@ -87,20 +86,6 @@ public class StaticContent extends Flow {
}
- private StaticContentLayoutManager lm;
-
- /**
- * @return this object's layout manager
- */
- public StaticContentLayoutManager getLayoutManager() {
- if (lm == null) {
- lm = new StaticContentLayoutManager();
- lm.setUserAgent(getUserAgent());
- lm.setFObj(this);
- }
- return lm;
- }
-
/**
* This is a hook for an FOTreeVisitor subclass to be able to access
* this object.
diff --git a/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java b/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java
index b9b4ae602..d37f24fd8 100644
--- a/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java
@@ -479,7 +479,7 @@ public class PageLayoutManager extends AbstractLayoutManager implements Runnable
if (reg == null) {
getLogger().error("no region viewport: shouldn't happen");
}
- StaticContentLayoutManager lm = flow.getLayoutManager();
+ StaticContentLayoutManager lm = getStaticContentLayoutManager(flow);
lm.setUserAgent(getUserAgent());
lm.init();
lm.setRegionReference(reg.getRegion());
@@ -891,4 +891,14 @@ public class PageLayoutManager extends AbstractLayoutManager implements Runnable
r.getPropertyManager().getWritingMode(), absRegVPRect, reldims));
}
+ /**
+ * @return a StaticContent layout manager
+ */
+ public StaticContentLayoutManager getStaticContentLayoutManager(StaticContent sc) {
+ StaticContentLayoutManager lm = new StaticContentLayoutManager();
+ lm.setUserAgent(getUserAgent());
+ lm.setFObj(sc);
+ return lm;
+ }
+
}