aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/pagination
diff options
context:
space:
mode:
authorAdrian Cumiskey <acumiskey@apache.org>2008-04-25 10:56:53 +0000
committerAdrian Cumiskey <acumiskey@apache.org>2008-04-25 10:56:53 +0000
commit25a8131ea662070fddd811a77c9de352dea3b050 (patch)
treed3317f5b3000750558059e3b88b3edbfac39e66b /src/java/org/apache/fop/fo/pagination
parent7c637cc8f0a1f0ff305f6a2fa68018d50ee52170 (diff)
downloadxmlgraphics-fop-25a8131ea662070fddd811a77c9de352dea3b050.tar.gz
xmlgraphics-fop-25a8131ea662070fddd811a77c9de352dea3b050.zip
Merged revisions 651323,651333,651538,651540,651543-651544,651551,651558 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk ........ r651323 | spepping | 2008-04-24 18:46:31 +0100 (Thu, 24 Apr 2008) | 3 lines Improve table-unit computation if proportional-column-width() is used as a subexpression. Fixes bug 44658. ........ r651333 | spepping | 2008-04-24 19:19:06 +0100 (Thu, 24 Apr 2008) | 4 lines Make the eventResourceGenerator task for the test files a separate task. Now one can do: ant codegen, compile outside of ant, ant compile-copy-resources, ant junit-compile-copy-resources. ........ r651538 | jeremias | 2008-04-25 09:42:02 +0100 (Fri, 25 Apr 2008) | 1 line Javadocs ........ r651540 | jeremias | 2008-04-25 09:44:39 +0100 (Fri, 25 Apr 2008) | 1 line Cleanup ........ r651543 | adelmelle | 2008-04-25 09:59:56 +0100 (Fri, 25 Apr 2008) | 3 lines Removed TODO: New validation event to generate an error in case an fo:marker appears as a child of an fo:block-container with absolutely positioned areas. Additionally: some javadoc updates in BlockContainer.java ........ r651544 | acumiskey | 2008-04-25 10:04:06 +0100 (Fri, 25 Apr 2008) | 1 line Removed the tab characters that were causing a big moan from eclipse ........ r651551 | adelmelle | 2008-04-25 10:30:09 +0100 (Fri, 25 Apr 2008) | 3 lines Cleanup: removal of commented block/methods + some javadoc updates ........ r651558 | jeremias | 2008-04-25 11:07:58 +0100 (Fri, 25 Apr 2008) | 1 line Second part of the implementation of stage 1 for advanced keeps (see Wiki): Integer values are treated differently from "always" values in keep-with-next/previous.within-column for all block-level FOs. ........ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@651570 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/pagination')
-rw-r--r--src/java/org/apache/fop/fo/pagination/PageSequence.java160
1 files changed, 25 insertions, 135 deletions
diff --git a/src/java/org/apache/fop/fo/pagination/PageSequence.java b/src/java/org/apache/fop/fo/pagination/PageSequence.java
index 3c7cfb197..c8f7c66d7 100644
--- a/src/java/org/apache/fop/fo/pagination/PageSequence.java
+++ b/src/java/org/apache/fop/fo/pagination/PageSequence.java
@@ -30,7 +30,8 @@ import org.apache.fop.fo.PropertyList;
import org.apache.fop.fo.ValidationException;
/**
- * Abstract base implementation for page sequences.
+ * Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_page-sequence">
+ * <code>fo:page-sequence</code></a> object.
*/
public class PageSequence extends AbstractPageSequence {
@@ -70,9 +71,10 @@ public class PageSequence extends AbstractPageSequence {
private Flow mainFlow = null;
/**
- * Create a page sequence FO node.
+ * Create a PageSequence instance that is a child of the
+ * given {@link FONode}.
*
- * @param parent the parent FO node
+ * @param parent the parent {@link FONode}
*/
public PageSequence(FONode parent) {
super(parent);
@@ -172,6 +174,9 @@ public class PageSequence extends AbstractPageSequence {
* The flow-name is used to associate the flow with a region on a page,
* based on the region-names given to the regions in the page-master
* used to generate that page.
+ * @param flow the {@link Flow} instance to be added
+ * @throws org.apache.fop.fo.ValidationException if the fo:flow maps
+ * to an invalid page-region
*/
private void addFlow(Flow flow) throws ValidationException {
String flowName = flow.getFlowName();
@@ -189,133 +194,6 @@ public class PageSequence extends AbstractPageSequence {
}
}
-// /**
-// * Returns true when there is more flow elements left to lay out.
-// */
-// private boolean flowsAreIncomplete() {
-// boolean isIncomplete = false;
-
-// for (Iterator e = flowMap.values().iterator(); e.hasNext(); ) {
-// Flow flow = (Flow)e.next();
-// if (flow instanceof StaticContent) {
-// continue;
-// }
-
-// Status status = flow.getStatus();
-// isIncomplete |= status.isIncomplete();
-// }
-// return isIncomplete;
-// }
-
-// /**
-// * Returns the flow that maps to the given region class for the current
-// * page master.
-// */
-// private Flow getCurrentFlow(String regionClass) {
-// Region region = getCurrentSimplePageMaster().getRegion(regionClass);
-// if (region != null) {
-// Flow flow = (Flow)flowMap.get(region.getRegionName());
-// return flow;
-
-// } else {
-
-// getLogger().error("flow is null. regionClass = '" + regionClass
-// + "' currentSPM = "
-// + getCurrentSimplePageMaster());
-
-// return null;
-// }
-
-// }
-
-// private boolean isFlowForMasterNameDone(String masterName) {
-// // parameter is master-name of PMR; we need to locate PM
-// // referenced by this, and determine whether flow(s) are OK
-// if (isForcing)
-// return false;
-// if (masterName != null) {
-
-// SimplePageMaster spm =
-// root.getLayoutMasterSet().getSimplePageMaster(masterName);
-// Region region = spm.getRegion(FO_REGION_BODY);
-
-
-// Flow flow = (Flow)flowMap.get(region.getRegionName());
-// /*if ((null == flow) || flow.getStatus().isIncomplete())
-// return false;
-// else
-// return true;*/
-// }
-// return false;
-// }
-
-// private void forcePage(AreaTree areaTree, int firstAvailPageNumber) {
-// boolean makePage = false;
-// if (this.forcePageCount == ForcePageCount.AUTO) {
-// PageSequence nextSequence =
-// this.root.getSucceedingPageSequence(this);
-// if (nextSequence != null) {
-// if (nextSequence.getIpnValue().equals("auto")) {
-// // do nothing special
-// }
-// else if (nextSequence.getIpnValue().equals("auto-odd")) {
-// if (firstAvailPageNumber % 2 == 0) {
-// makePage = true;
-// }
-// } else if (nextSequence.getIpnValue().equals("auto-even")) {
-// if (firstAvailPageNumber % 2 != 0) {
-// makePage = true;
-// }
-// } else {
-// int nextSequenceStartPageNumber =
-// nextSequence.getCurrentPageNumber();
-// if ((nextSequenceStartPageNumber % 2 == 0)
-// && (firstAvailPageNumber % 2 == 0)) {
-// makePage = true;
-// } else if ((nextSequenceStartPageNumber % 2 != 0)
-// && (firstAvailPageNumber % 2 != 0)) {
-// makePage = true;
-// }
-// }
-// }
-// } else if ((this.forcePageCount == ForcePageCount.EVEN)
-// && (this.pageCount % 2 != 0)) {
-// makePage = true;
-// } else if ((this.forcePageCount == ForcePageCount.ODD)
-// && (this.pageCount % 2 == 0)) {
-// makePage = true;
-// } else if ((this.forcePageCount == ForcePageCount.END_ON_EVEN)
-// && (firstAvailPageNumber % 2 == 0)) {
-// makePage = true;
-// } else if ((this.forcePageCount == ForcePageCount.END_ON_ODD)
-// && (firstAvailPageNumber % 2 != 0)) {
-// makePage = true;
-// } else if (this.forcePageCount == ForcePageCount.NO_FORCE) {
-// // do nothing
-// }
-
-// if (makePage) {
-// try {
-// this.isForcing = true;
-// this.currentPageNumber++;
-// firstAvailPageNumber = this.currentPageNumber;
-// currentPage = makePage(areaTree, firstAvailPageNumber, false,
-// true);
-// String formattedPageNumber =
-// pageNumberGenerator.makeFormattedPageNumber(this.currentPageNumber);
-// currentPage.setFormattedNumber(formattedPageNumber);
-// currentPage.setPageSequence(this);
-// formatStaticContent(areaTree);
-// log.debug("[forced-" + firstAvailPageNumber + "]");
-// areaTree.addPage(currentPage);
-// this.root.setRunningPageNumberCounter(this.currentPageNumber);
-// this.isForcing = false;
-// } catch (FOPException fopex) {
-// log.debug("'force-page-count' failure");
-// }
-// }
-// }
-
/**
* Get the static content FO node from the flow map.
* This gets the static content flow for the given flow name.
@@ -328,7 +206,7 @@ public class PageSequence extends AbstractPageSequence {
}
/**
- * Accessor method for titleFO
+ * Accessor method for the fo:title associated with this fo:page-sequence
* @return titleFO for this object
*/
public Title getTitleFO() {
@@ -425,7 +303,10 @@ public class PageSequence extends AbstractPageSequence {
}
}
- /** @return the "master-reference" property. */
+ /**
+ * Get the value of the <code>master-reference</code> property.
+ * @return the "master-reference" property
+ */
public String getMasterReference() {
return masterReference;
}
@@ -435,17 +316,26 @@ public class PageSequence extends AbstractPageSequence {
return "page-sequence";
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ * @return {@link org.apache.fop.fo.Constants#FO_PAGE_SEQUENCE}
+ */
public int getNameId() {
return FO_PAGE_SEQUENCE;
}
- /** @return the country property value */
+ /**
+ * Get the value of the <code>country</code> property.
+ * @return the country property value
+ */
public String getCountry() {
return this.country;
}
- /** @return the language property value */
+ /**
+ * Get the value of the <code>language</code> property.
+ * @return the language property value
+ */
public String getLanguage() {
return this.language;
}