From dcceb31d54b494024832a12d81da2e3b102c547c Mon Sep 17 00:00:00 2001 From: Keiron Liddle Date: Tue, 4 Mar 2003 03:50:54 +0000 Subject: [PATCH] updated for LayoutProcessor git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196011 13f79535-47bb-0310-9956-ffa450edef68 --- src/org/apache/fop/fo/flow/BasicLink.java | 10 ++++- src/org/apache/fop/fo/flow/BidiOverride.java | 13 +++--- .../fop/fo/flow/PageNumberCitation.java | 42 +++++++++++-------- 3 files changed, 37 insertions(+), 28 deletions(-) diff --git a/src/org/apache/fop/fo/flow/BasicLink.java b/src/org/apache/fop/fo/flow/BasicLink.java index 701c7b3de..95c13bf58 100644 --- a/src/org/apache/fop/fo/flow/BasicLink.java +++ b/src/org/apache/fop/fo/flow/BasicLink.java @@ -22,7 +22,7 @@ import org.apache.fop.area.PageViewport; import org.apache.fop.area.Area; import org.apache.fop.layoutmgr.InlineStackingLayoutManager; import org.apache.fop.layoutmgr.LMiter; -import org.apache.fop.layoutmgr.LayoutManager; +import org.apache.fop.layoutmgr.LayoutProcessor; // Java import java.util.List; @@ -58,7 +58,7 @@ public class BasicLink extends Inline { lms.add(lm); } - protected void setupLinkArea(LayoutManager parentLM, InlineParent area) { + protected void setupLinkArea(LayoutProcessor parentLM, InlineParent area) { if (link == null) { return; } @@ -137,6 +137,12 @@ public class BasicLink extends Inline { private String idRef; private Area area; + /** + * Create a new link resolver. + * + * @param id the id to resolve + * @param a the area that will have the link attribute + */ public LinkResolver(String id, Area a) { idRef = id; area = a; diff --git a/src/org/apache/fop/fo/flow/BidiOverride.java b/src/org/apache/fop/fo/flow/BidiOverride.java index 1a9d91af2..cab6fff20 100644 --- a/src/org/apache/fop/fo/flow/BidiOverride.java +++ b/src/org/apache/fop/fo/flow/BidiOverride.java @@ -8,17 +8,14 @@ package org.apache.fop.fo.flow; // FOP -import org.apache.fop.fo.*; +import org.apache.fop.fo.FONode; +import org.apache.fop.fo.FObjMixed; import org.apache.fop.layout.AuralProps; import org.apache.fop.layout.RelativePositionProps; -import org.apache.fop.fo.flow.*; -import org.apache.fop.fo.properties.*; -import org.apache.fop.apps.FOPException; import org.apache.fop.layoutmgr.LeafNodeLayoutManager; -import org.apache.fop.layoutmgr.LayoutManager; +import org.apache.fop.layoutmgr.LayoutProcessor; import org.apache.fop.area.inline.InlineArea; -import org.apache.fop.area.inline.Word; import java.util.List; import java.util.ArrayList; @@ -38,9 +35,9 @@ public class BidiOverride extends FObjMixed { ArrayList childList = new ArrayList(); super.addLayoutManager(childList); for (int count = childList.size() - 1; count >= 0; count--) { - LayoutManager lm = (LayoutManager) childList.get(count); + LayoutProcessor lm = (LayoutProcessor) childList.get(count); if (lm.generatesInlineAreas()) { - LayoutManager blm = new BidiLayoutManager((LeafNodeLayoutManager) lm); + LayoutProcessor blm = new BidiLayoutManager((LeafNodeLayoutManager) lm); blm.setFObj(this); list.add(blm); } else { diff --git a/src/org/apache/fop/fo/flow/PageNumberCitation.java b/src/org/apache/fop/fo/flow/PageNumberCitation.java index c66977d03..4e96dcce0 100644 --- a/src/org/apache/fop/fo/flow/PageNumberCitation.java +++ b/src/org/apache/fop/fo/flow/PageNumberCitation.java @@ -8,27 +8,33 @@ package org.apache.fop.fo.flow; // FOP -import org.apache.fop.fo.*; -import org.apache.fop.fo.pagination.*; -import org.apache.fop.datatypes.*; -import org.apache.fop.fo.properties.*; -import org.apache.fop.layout.*; -import org.apache.fop.apps.FOPException; -import org.apache.fop.layoutmgr.LeafNodeLayoutManager; -import org.apache.fop.area.inline.InlineArea; -import org.apache.fop.area.PageViewport; -import org.apache.fop.util.CharUtilities; +import java.util.List; + import org.apache.fop.apps.StructureHandler; +import org.apache.fop.area.PageViewport; +import org.apache.fop.area.Resolveable; +import org.apache.fop.area.Trait; +import org.apache.fop.area.inline.InlineArea; +import org.apache.fop.area.inline.UnresolvedPageNumber; +import org.apache.fop.area.inline.Word; +import org.apache.fop.datatypes.ColorType; +import org.apache.fop.fo.FONode; +import org.apache.fop.fo.FObj; +import org.apache.fop.layout.AccessibilityProps; +import org.apache.fop.layout.AuralProps; +import org.apache.fop.layout.BackgroundProps; +import org.apache.fop.layout.BorderAndPadding; +import org.apache.fop.layout.FontInfo; +import org.apache.fop.layout.FontState; +import org.apache.fop.layout.MarginInlineProps; +import org.apache.fop.layout.RelativePositionProps; +import org.apache.fop.layout.TextState; import org.apache.fop.layoutmgr.LayoutContext; import org.apache.fop.layoutmgr.LayoutManager; +import org.apache.fop.layoutmgr.LayoutProcessor; +import org.apache.fop.layoutmgr.LeafNodeLayoutManager; import org.apache.fop.layoutmgr.PositionIterator; -import org.apache.fop.area.inline.Word; -import org.apache.fop.area.inline.UnresolvedPageNumber; -import org.apache.fop.area.Resolveable; -import org.apache.fop.area.Trait; - -import java.util.List; -import java.util.ArrayList; +import org.apache.fop.util.CharUtilities; /** * Page number citation. @@ -88,7 +94,7 @@ public class PageNumberCitation extends FObj { // if id can be resolved then simply return a word, otherwise // return a resolveable area - private InlineArea getInlineArea(LayoutManager parentLM) { + private InlineArea getInlineArea(LayoutProcessor parentLM) { if (refId.equals("")) { getLogger().error("page-number-citation must contain \"ref-id\""); return null; -- 2.39.5