diff options
author | Glen Mazza <gmazza@apache.org> | 2004-12-04 06:51:13 +0000 |
---|---|---|
committer | Glen Mazza <gmazza@apache.org> | 2004-12-04 06:51:13 +0000 |
commit | fd0a400a78ecab6d0200a3a969a723bc912aa289 (patch) | |
tree | 41e129e4117edec2420571ca9df580ac44e22767 /src/java/org/apache/fop/area/PageViewport.java | |
parent | 58b03f1aa52fe8b8b34d044dfab8934e6a4a24af (diff) | |
download | xmlgraphics-fop-fd0a400a78ecab6d0200a3a969a723bc912aa289.tar.gz xmlgraphics-fop-fd0a400a78ecab6d0200a3a969a723bc912aa289.zip |
PR:
Obtained from:
Submitted by:
Reviewed by:
More code commenting.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198184 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/area/PageViewport.java')
-rw-r--r-- | src/java/org/apache/fop/area/PageViewport.java | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/java/org/apache/fop/area/PageViewport.java b/src/java/org/apache/fop/area/PageViewport.java index a0c87a5c0..fdcbf26c2 100644 --- a/src/java/org/apache/fop/area/PageViewport.java +++ b/src/java/org/apache/fop/area/PageViewport.java @@ -48,8 +48,10 @@ public class PageViewport implements Resolvable, Cloneable { private Map idReferences = null; // this keeps a list of currently unresolved areas or extensions - // once the thing is resolved it is removed + // once an idref is resolved it is removed // when this is empty the page can be rendered + private Map unresolvedIDRefs = new HashMap(); + private Map unresolved = null; private Map pendingResolved = null; @@ -131,14 +133,14 @@ public class PageViewport implements Resolvable, Cloneable { * @param id the id of the reference * @param res the resolver of the reference */ - public void addUnresolvedIDRef(String id, Resolvable res) { - if (unresolved == null) { - unresolved = new HashMap(); + public void addUnresolvedIDRef(String idref, Resolvable res) { + if (unresolvedIDRefs == null) { + unresolvedIDRefs = new HashMap(); } - List list = (List)unresolved.get(id); + List list = (List)unresolvedIDRefs.get(idref); if (list == null) { list = new ArrayList(); - unresolved.put(id, list); + unresolvedIDRefs.put(idref, list); } list.add(res); } @@ -148,7 +150,7 @@ public class PageViewport implements Resolvable, Cloneable { * @return true if the page is resolved and can be rendered */ public boolean isResolved() { - return unresolved == null; + return unresolvedIDRefs == null; } /** @@ -169,8 +171,8 @@ public class PageViewport implements Resolvable, Cloneable { } pendingResolved.put(id, pages); } else { - if (unresolved != null) { - List todo = (List)unresolved.get(id); + if (unresolvedIDRefs != null) { + List todo = (List)unresolvedIDRefs.get(id); if (todo != null) { for (int count = 0; count < todo.size(); count++) { Resolvable res = (Resolvable)todo.get(count); @@ -179,10 +181,10 @@ public class PageViewport implements Resolvable, Cloneable { } } } - if (unresolved != null) { - unresolved.remove(id); - if (unresolved.isEmpty()) { - unresolved = null; + if (unresolvedIDRefs != null) { + unresolvedIDRefs.remove(id); + if (unresolvedIDRefs.isEmpty()) { + unresolvedIDRefs = null; } } } |