keiron 2003/02/18 21:43:25
Modified: src/org/apache/fop/area Page.java PageViewport.java
Log:
place markers on page viewport
Revision Changes Path
1.9 +1 -6 xml-fop/src/org/apache/fop/area/Page.java
Index: Page.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/area/Page.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Page.java 19 Dec 2002 00:35:31 -0000 1.8
+++ Page.java 19 Feb 2003 05:43:24 -0000 1.9
@@ -29,11 +29,6 @@
private RegionViewport regionEnd = null;
private RegionViewport regionAfter = null;
- // hashmap of markers for this page
- // start and end are added by the fo that contains the markers
- private Map markerStart = null;
- private Map markerEnd = null;
-
// temporary map of unresolved objects used when serializing the page
private Map unresolved = null;
1.13 +32 -1 xml-fop/src/org/apache/fop/area/PageViewport.java
Index: PageViewport.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/area/PageViewport.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- PageViewport.java 27 Jan 2003 09:24:24 -0000 1.12
+++ PageViewport.java 19 Feb 2003 05:43:24 -0000 1.13
@@ -41,6 +41,11 @@
private Map pendingResolved = null;
+ // hashmap of markers for this page
+ // start and end are added by the fo that contains the markers
+ private Map markerStart = null;
+ private Map markerEnd = null;
+
/**
* Create a page viewport.
* @param p the page reference area that holds the contents
@@ -168,6 +173,32 @@
unresolved = null;
}
}
+ }
+
+ /**
+ * Add the start markers for this page.
+ *
+ * @param marks the map of start markers to add
+ */
+ public void addMarkers(Map marks, boolean start) {
+ if (start) {
+ if (markerStart == null) {
+ markerStart = new HashMap();
+ }
+ markerStart.putAll(marks);
+ } else {
+ if (markerEnd == null) {
+ markerEnd = new HashMap();
+ }
+ markerEnd.putAll(marks);
+ }
+ }
+
+ public Object getMarker(String name, int pos) {
+ if (markerStart != null) {
+ return markerStart.get(name);
+ }
+ return null;
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]