Revision: 7878
http://svn.sourceforge.net/foray/?rev=7878&view=rev
Author: victormote
Date: 2006-09-03 16:51:37 -0700 (Sun, 03 Sep 2006)
Log Message:
-----------
More cleanup of page selection method signatures.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java
Modified: trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java
===================================================================
--- trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java 2006-09-03 23:26:25 UTC (rev 7877)
+++ trunk/foray/foray-fotree/src/java/org/foray/fotree/fo/obj/PageMasterResolver.java 2006-09-03 23:51:37 UTC (rev 7878)
@@ -84,7 +84,7 @@
return null;
}
String pageMasterName = currentSubSequence.getNextPageMasterName(
- oddPage, firstPage, blankPage);
+ firstPage, false, oddPage, blankPage);
boolean canRecover = true;
while (pageMasterName == null) {
final SubSequenceWrapper nextSubSequence = getNextSubSequence(
@@ -104,8 +104,8 @@
} else {
currentSubSequence = nextSubSequence;
}
- pageMasterName = currentSubSequence.getNextPageMasterName(oddPage,
- firstPage, blankPage);
+ pageMasterName = currentSubSequence.getNextPageMasterName(firstPage,
+ false, oddPage, blankPage);
}
final org.foray.fotree.fo.obj.SimplePageMaster pageMaster =
psm.layoutMasterSet().getSimplePageMaster(pageMasterName);
@@ -154,8 +154,8 @@
* wrappers.
*/
private abstract class SubSequenceWrapper {
- abstract String getNextPageMasterName(boolean isOddPage,
- boolean isFirstPage, boolean isEmptyPage)
+ abstract String getNextPageMasterName(boolean isFirstPage,
+ boolean isLastPage, boolean isOddPage, boolean isEmptyPage)
throws FOTreeException;
}
@@ -175,8 +175,9 @@
this.wrapped = wrapped;
}
- public String getNextPageMasterName(final boolean isOddPage,
- final boolean isFirstPage, final boolean isEmptyPage) {
+ public String getNextPageMasterName(final boolean isFirstPage,
+ final boolean isLastPage, final boolean isOddPage,
+ final boolean isEmptyPage) {
if (! this.isDone) {
this.isDone = true;
return wrapped.traitMasterName();
@@ -200,8 +201,9 @@
this.wrapped = wrapped;
}
- public String getNextPageMasterName(final boolean isOddPage,
- final boolean isFirstPage, final boolean isEmptyPage) {
+ public String getNextPageMasterName(final boolean isFirstPage,
+ final boolean isLastPage, final boolean isOddPage,
+ final boolean isEmptyPage) {
if (numberConsumed < wrapped.traitMaximumRepeats()) {
numberConsumed++;
} else {
@@ -226,8 +228,9 @@
this.wrapped = wrapped;
}
- public String getNextPageMasterName(final boolean isOddPage,
- final boolean isFirstPage, final boolean isEmptyPage) {
+ public String getNextPageMasterName(final boolean isFirstPage,
+ final boolean isLastPage, final boolean isOddPage,
+ final boolean isEmptyPage) {
if (numberConsumed < wrapped.traitMaximumRepeats()) {
numberConsumed++;
} else {
@@ -237,7 +240,7 @@
for (int i = 0; i < wrapped.getChildCount(); i++) {
final ConditionalPageMasterReference cpmr =
(ConditionalPageMasterReference) wrapped.getChildAt(i);
- if (cpmr.matchesCriteria(isFirstPage, false, isOddPage,
+ if (cpmr.matchesCriteria(isFirstPage, isLastPage, isOddPage,
isEmptyPage)) {
return cpmr.traitMasterReference();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|