import java.util.ArrayList;
import java.util.List;
import java.util.Map;
+import java.util.HashMap;
import java.awt.Rectangle;
import java.util.Iterator;
import java.awt.geom.Rectangle2D;
*/
private SimplePageMaster currentSimplePageMaster;
+ /**
+ * The collection of StaticContentLayoutManager objects that are associated
+ * with this Page Sequence, keyed by flow-name.
+ */
+ private HashMap staticContentLMs = new HashMap(4);
+
/**
* This is the top level layout manager.
* It is created by the PageSequence FO.
* @return a StaticContent layout manager
*/
public StaticContentLayoutManager getStaticContentLayoutManager(StaticContent sc) {
- StaticContentLayoutManager lm = new StaticContentLayoutManager();
+ StaticContentLayoutManager lm =
+ (StaticContentLayoutManager)staticContentLMs.get(sc.getFlowName());
+ if (lm != null) {
+ return lm;
+ }
+ lm = new StaticContentLayoutManager();
lm.setUserAgent(getUserAgent());
lm.setFObj(sc);
+ staticContentLMs.put(sc.getFlowName(), lm);
return lm;
}