aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2007-12-27 10:34:15 +0000
committerJeremias Maerki <jeremias@apache.org>2007-12-27 10:34:15 +0000
commit0c87214d3a98d0836083d191b36aa7abf944d0dc (patch)
tree4a0c8a4abd081996088ad1b3f711ed61aa6ff2f6 /src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java
parented61f771c493e86046f3d13e3d6a553d825dd8f3 (diff)
downloadxmlgraphics-fop-0c87214d3a98d0836083d191b36aa7abf944d0dc.tar.gz
xmlgraphics-fop-0c87214d3a98d0836083d191b36aa7abf944d0dc.zip
Added new extension element: fox:external-document. It allows to add whole documents such as multi-page TIFF images to be inserted as peers to a page-sequence. Each image will make up an entire page. See the documentation for details. ATM, only single pages are possible. Multi-page images will be supported with the new image package.
Some preparations for page-position="only" but the implementation is incomplete and "only" has no effect, yet. (Just uploaded some stuff I once started) Some javadoc cleanups. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@607032 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java')
-rw-r--r--src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java b/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java
index 012abd11a..9d2fe652c 100644
--- a/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java
+++ b/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java
@@ -49,6 +49,7 @@ public class RepeatablePageMasterAlternatives extends FObj
private List conditionalPageMasterRefs;
private boolean hasPagePositionLast = false;
+ private boolean hasPagePositionOnly = false;
/**
* @see org.apache.fop.fo.FONode#FONode(FONode)
@@ -124,6 +125,7 @@ public class RepeatablePageMasterAlternatives extends FObj
public String getNextPageMasterName(boolean isOddPage,
boolean isFirstPage,
boolean isLastPage,
+ boolean isOnlyPage,
boolean isBlankPage) {
if (getMaximumRepeats() != INFINITE) {
if (numberConsumed < getMaximumRepeats()) {
@@ -138,7 +140,7 @@ public class RepeatablePageMasterAlternatives extends FObj
for (int i = 0; i < conditionalPageMasterRefs.size(); i++) {
ConditionalPageMasterReference cpmr
= (ConditionalPageMasterReference)conditionalPageMasterRefs.get(i);
- if (cpmr.isValid(isOddPage, isFirstPage, isLastPage, isBlankPage)) {
+ if (cpmr.isValid(isOddPage, isFirstPage, isLastPage, isOnlyPage, isBlankPage)) {
return cpmr.getMasterReference();
}
}
@@ -155,6 +157,9 @@ public class RepeatablePageMasterAlternatives extends FObj
if (cpmr.getPagePosition() == EN_LAST) {
this.hasPagePositionLast = true;
}
+ if (cpmr.getPagePosition() == EN_ONLY) {
+ this.hasPagePositionOnly = true;
+ }
}
/** {@inheritDoc} */
@@ -178,6 +183,12 @@ public class RepeatablePageMasterAlternatives extends FObj
}
/** {@inheritDoc} */
+ /** @see org.apache.fop.fo.pagination.SubSequenceSpecifier#hasPagePositionOnly() */
+ public boolean hasPagePositionOnly() {
+ return this.hasPagePositionOnly;
+ }
+
+ /** @see org.apache.fop.fo.FONode#getLocalName() */
public String getLocalName() {
return "repeatable-page-master-alternatives";
}