Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java?rev=651866&r1=651865&r2=651866&view=diff ============================================================================== --- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java (original) +++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java Sat Apr 26 15:08:10 2008 @@ -32,7 +32,9 @@ import org.apache.fop.layoutmgr.BlockLevelEventProducer; /** - * The page-sequence-master formatting object. + * Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_page-sequence-master"> + * <code>fo:page-sequence-master</code></a> object. + * * This class handles a list of subsequence specifiers * which are simple or complex references to page-masters. */ @@ -54,17 +56,16 @@ // but the actual FO's are MasterReferences. /** - * Creates a new page-sequence-master element. - * @param parent the parent node - * @see org.apache.fop.fo.FONode#FONode(FONode) + * Create a PageSequenceMaster instance that is a child of the + * given [EMAIL PROTECTED] FONode}. + * + * @param parent [EMAIL PROTECTED] FONode} that is the parent of this object */ public PageSequenceMaster(FONode parent) { super(parent); } - /** - * [EMAIL PROTECTED] - */ + /** [EMAIL PROTECTED] */ public void bind(PropertyList pList) throws FOPException { masterName = pList.get(PR_MASTER_NAME).getString(); @@ -73,18 +74,14 @@ } } - /** - * [EMAIL PROTECTED] - */ + /** [EMAIL PROTECTED] */ protected void startOfNode() throws FOPException { subSequenceSpecifiers = new java.util.ArrayList(); layoutMasterSet = parent.getRoot().getLayoutMasterSet(); layoutMasterSet.addPageSequenceMaster(masterName, this); } - /** - * [EMAIL PROTECTED] - */ + /** [EMAIL PROTECTED] */ protected void endOfNode() throws FOPException { if (firstChild == null) { missingChildElementError("(single-page-master-reference|" @@ -94,22 +91,22 @@ /** * [EMAIL PROTECTED] - * XSL/FOP: (single-page-master-reference|repeatable-page-master-reference| + * <br>XSL/FOP: (single-page-master-reference|repeatable-page-master-reference| * repeatable-page-master-alternatives)+ */ protected void validateChildNode(Locator loc, String nsURI, String localName) - throws ValidationException { + throws ValidationException { if (FO_URI.equals(nsURI)) { - if (!localName.equals("single-page-master-reference") - && !localName.equals("repeatable-page-master-reference") - && !localName.equals("repeatable-page-master-alternatives")) { + if (!"single-page-master-reference".equals(localName) + && !"repeatable-page-master-reference".equals(localName) + && !"repeatable-page-master-alternatives".equals(localName)) { invalidChildError(loc, nsURI, localName); } } } /** - * Adds a new subsequence specifier to the page sequence master. + * Adds a new suqsequence specifier to the page sequence master. * @param pageMasterReference the subsequence to add */ protected void addSubsequenceSpecifier(SubSequenceSpecifier pageMasterReference) { @@ -165,20 +162,14 @@ /** @return true if the page-sequence-master has a page-master with page-position="last" */ public boolean hasPagePositionLast() { - if (currentSubSequence != null) { - return currentSubSequence.hasPagePositionLast(); - } else { - return false; - } + return (currentSubSequence != null + && currentSubSequence.hasPagePositionLast()); } /** @return true if the page-sequence-master has a page-master with page-position="only" */ public boolean hasPagePositionOnly() { - if (currentSubSequence != null) { - return currentSubSequence.hasPagePositionOnly(); - } else { - return false; - } + return (currentSubSequence != null + && currentSubSequence.hasPagePositionOnly()); } /** @@ -240,7 +231,10 @@ return "page-sequence-master"; } - /** [EMAIL PROTECTED] */ + /** + * [EMAIL PROTECTED] + * @return [EMAIL PROTECTED] org.apache.fop.fo.Constants#FO_PAGE_SEQUENCE_MASTER} + */ public int getNameId() { return FO_PAGE_SEQUENCE_MASTER; }
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/PageSequenceWrapper.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/PageSequenceWrapper.java?rev=651866&r1=651865&r2=651866&view=diff ============================================================================== --- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/PageSequenceWrapper.java (original) +++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/PageSequenceWrapper.java Sat Apr 26 15:08:10 2008 @@ -22,15 +22,15 @@ import org.xml.sax.Locator; import org.apache.fop.apps.FOPException; -import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; +import org.apache.fop.fo.FONode; import org.apache.fop.fo.PropertyList; import org.apache.fop.fo.ValidationException; /** - * The fo:page-sequence-wrapper formatting object, first introduced - * in the XSL 1.1 WD. Prototype version only, subject to change as - * XSL 1.1 WD evolves. + * Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_page-sequence-wrapper"> + * <code>fo:page-sequence-wrapper</code></a> object, first introduced + * in the XSL 1.1 WD. */ public class PageSequenceWrapper extends FObj { // The value of properties relevant for this FO @@ -39,8 +39,10 @@ // End of property values /** - * Creates a new page-sequence-wrapper element. - * @param parent FONode that is the parent of this object + * Create a PageSequenceWrapper instance that is a child of + * the given parent [EMAIL PROTECTED] FONode}. + * + * @param parent [EMAIL PROTECTED] FONode} that is the parent of this object */ public PageSequenceWrapper(FONode parent) { super(parent); @@ -55,7 +57,7 @@ /** * [EMAIL PROTECTED] - XSL/FOP: (bookmark+) + * <br>XSL/FOP: (bookmark+) */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { @@ -67,12 +69,18 @@ } } - /** @return the "index-class" property. */ + /** + * Get the value of the <code>index-class</code> property. + * @return the "index-class" property + */ public String getIndexClass() { return indexClass; } - /** @return the "index-key" property. */ + /** + * Get the value of the <code>index-key</code> property. + * @return the "index-key" property + */ public String getIndexKey() { return indexKey; } @@ -82,7 +90,10 @@ return "page-sequence-wrapper"; } - /** [EMAIL PROTECTED] */ + /** + * [EMAIL PROTECTED] + * @return [EMAIL PROTECTED] org.apache.fop.fo.Constants#FO_PAGE_SEQUENCE_WRAPPER} + */ public int getNameId() { return FO_PAGE_SEQUENCE_WRAPPER; } Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/Region.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/Region.java?rev=651866&r1=651865&r2=651866&view=diff ============================================================================== --- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/Region.java (original) +++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/Region.java Sat Apr 26 15:08:10 2008 @@ -30,10 +30,11 @@ import org.apache.fop.fo.FObj; import org.apache.fop.fo.PropertyList; import org.apache.fop.fo.ValidationException; +import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.fo.properties.CommonBorderPaddingBackground; /** - * This is an abstract base class for pagination regions + * This is an abstract base class for pagination regions. */ public abstract class Region extends FObj { // The value of properties relevant for fo:region @@ -49,9 +50,9 @@ private SimplePageMaster layoutMaster; /** - * Creates a new Region. - * @param parent the parent node - * @see org.apache.fop.fo.FONode#FONode(FONode) + * Base constructor + * + * @param parent [EMAIL PROTECTED] FONode} that is the parent of this object */ protected Region(FONode parent) { super(parent); @@ -81,7 +82,7 @@ } //TODO do we need context for getBPPaddingAndBorder() and getIPPaddingAndBorder()? - if ((getCommonBorderPaddingBackground().getBPPaddingAndBorder(false, null) != 0 + if ((getCommonBorderPaddingBackground().getBPPaddingAndBorder(false, null) != 0 || getCommonBorderPaddingBackground().getIPPaddingAndBorder(false, null) != 0)) { getFOValidationEventProducer().nonZeroBorderPaddingOnRegion(this, getName(), regionName, true, getLocator()); @@ -90,7 +91,7 @@ /** * [EMAIL PROTECTED] String, String) - * XSL Content Model: empty + * <br>XSL Content Model: empty */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RegionAfter.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RegionAfter.java?rev=651866&r1=651865&r2=651866&view=diff ============================================================================== --- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RegionAfter.java (original) +++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RegionAfter.java Sat Apr 26 15:08:10 2008 @@ -29,14 +29,15 @@ import org.apache.fop.datatypes.SimplePercentBaseContext; /** - * The fo:region-after element. + * Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_region-after"> + * <code>fo:region-after</code></a> object. */ public class RegionAfter extends RegionBA { /** - * Creates a new region-after element. - * @param parent the parent node - * @see org.apache.fop.fo.FONode#FONode(FONode) + * Create a RegionAfter instance that is a child of the + * given parent [EMAIL PROTECTED] FONode}. + * @param parent the [EMAIL PROTECTED] FONode} that is to be the parent */ public RegionAfter(FONode parent) { super(parent); @@ -92,7 +93,10 @@ return "region-after"; } - /** [EMAIL PROTECTED] */ + /** + * [EMAIL PROTECTED] + * @return [EMAIL PROTECTED] org.apache.fop.fo.Constants#FO_REGION_AFTER} + */ public int getNameId() { return FO_REGION_AFTER; } Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RegionBA.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RegionBA.java?rev=651866&r1=651865&r2=651866&view=diff ============================================================================== --- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RegionBA.java (original) +++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RegionBA.java Sat Apr 26 15:08:10 2008 @@ -28,7 +28,9 @@ import org.apache.fop.fo.PropertyList; /** - * Abstract base class for fo:region-before and fo:region-after. + * Abstract base class for <a href="http://www.w3.org/TR/xsl/#fo_region-before"> + * <code>fo:region-before</code></a> and <a href="http://www.w3.org/TR/xsl/#fo_region-after"> + * <code>fo:region-after</code></a>. */ public abstract class RegionBA extends SideRegion { // The value of properties relevant for fo:region-[before|after]. @@ -36,9 +38,9 @@ // End of property values /** - * Creates a new region (before or after). - * @param parent the parent node - * @see org.apache.fop.fo.FONode#FONode(FONode) + * Create a RegionBA instance that is a child of the + * given parent [EMAIL PROTECTED] FONode}. + * @param parent the [EMAIL PROTECTED] FONode} that is to be the parent */ protected RegionBA(FONode parent) { super(parent); @@ -51,7 +53,8 @@ } /** - * @return the "precedence" property. + * Get the value of the <code>precedence</code> property. + * @return the "precedence" property */ public int getPrecedence() { return precedence; Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RegionBefore.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RegionBefore.java?rev=651866&r1=651865&r2=651866&view=diff ============================================================================== --- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RegionBefore.java (original) +++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RegionBefore.java Sat Apr 26 15:08:10 2008 @@ -29,14 +29,15 @@ import org.apache.fop.fo.FONode; /** - * The fo:region-before element. + * Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_region-before"> + * <code>fo:region-before</code></a> object. */ public class RegionBefore extends RegionBA { /** - * Creates a new region-before element. - * @param parent the parent element - * @see org.apache.fop.fo.FONode#FONode(FONode) + * Create a RegionBefore instance that is a child of the + * given parent [EMAIL PROTECTED] FONode}. + * @param parent the [EMAIL PROTECTED] FONode} that is to be the parent */ public RegionBefore(FONode parent) { super(parent); @@ -90,7 +91,10 @@ return "region-before"; } - /** [EMAIL PROTECTED] */ + /** + * [EMAIL PROTECTED] + * @return [EMAIL PROTECTED] org.apache.fop.fo.Constants#FO_REGION_BEFORE} + */ public int getNameId() { return FO_REGION_BEFORE; } Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RegionBody.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RegionBody.java?rev=651866&r1=651865&r2=651866&view=diff ============================================================================== --- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RegionBody.java (original) +++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RegionBody.java Sat Apr 26 15:08:10 2008 @@ -33,7 +33,8 @@ import org.apache.fop.fo.properties.CommonMarginBlock; /** - * The fo:region-body element. + * Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_region-body"> + * <code>fo:region-body</code></a> object. */ public class RegionBody extends Region { // The value of properties relevant for fo:region-body. @@ -43,9 +44,9 @@ // End of property values /** - * Creates a new region-body element. - * @param parent the parent node - * @see org.apache.fop.fo.FONode#FONode(FONode) + * Create a RegionBody instance that is a child of the + * given parent [EMAIL PROTECTED] FONode}. + * @param parent the [EMAIL PROTECTED] FONode} that is to be the parent */ public RegionBody(FONode parent) { super(parent); @@ -58,27 +59,28 @@ columnCount = pList.get(PR_COLUMN_COUNT).getNumeric(); columnGap = pList.get(PR_COLUMN_GAP).getLength(); - if ((getColumnCount() != 1) && (getOverflow() == EN_SCROLL)) { + if ((getColumnCount() > 1) && (getOverflow() == EN_SCROLL)) { /* This is an error (See XSL Rec, fo:region-body description). * The Rec allows for acting as if "1" is chosen in * these cases, but we will need to be able to change Numeric * values in order to do this. */ - getFOValidationEventProducer().columnCountErrorOnRegionBodyOverflowScroll(this, - getName(), getLocator()); + attributeError("If overflow property is set to \"scroll\"," + + " a column-count other than \"1\" may not be specified."); } } /** - * Return the Common Margin Properties-Block. - * @return the Common Margin Properties-Block. + * Return the [EMAIL PROTECTED] CommonMarginBlock} instance attached to + * this instance. + * @return the [EMAIL PROTECTED] CommonMarginBlock} instance */ public CommonMarginBlock getCommonMarginBlock() { return commonMarginBlock; } /** - * Return the "column-count" property. + * Return the value of the <code>column-count<code> property. * @return the "column-count" property. */ public int getColumnCount() { @@ -86,7 +88,7 @@ } /** - * Return the "column-gap" property. + * Return the value of the <code>column-gap</code> property. * @return the "column-gap" property. */ public int getColumnGap() { @@ -151,7 +153,10 @@ return "region-body"; } - /** [EMAIL PROTECTED] */ + /** + * [EMAIL PROTECTED] + * @return [EMAIL PROTECTED] org.apache.fop.fo.Constants#FO_REGION_BODY} + */ public int getNameId() { return FO_REGION_BODY; } Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RegionEnd.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RegionEnd.java?rev=651866&r1=651865&r2=651866&view=diff ============================================================================== --- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RegionEnd.java (original) +++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RegionEnd.java Sat Apr 26 15:08:10 2008 @@ -22,20 +22,22 @@ // Java import java.awt.Rectangle; +// FOP +import org.apache.fop.fo.FONode; import org.apache.fop.datatypes.FODimension; import org.apache.fop.datatypes.LengthBase; import org.apache.fop.datatypes.SimplePercentBaseContext; -import org.apache.fop.fo.FONode; /** - * The fo:region-end element. + * Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_region-end"> + * <code>fo:region-end</code></a> object. */ public class RegionEnd extends RegionSE { /** - * Creates a new region-end element. - * @param parent the parent node - * @see org.apache.fop.fo.FONode#FONode(FONode) + * Create a RegionEnd instance that is a child of the + * given parent [EMAIL PROTECTED] FONode}. + * @param parent the [EMAIL PROTECTED] FONode} that is to be the parent */ public RegionEnd(FONode parent) { super(parent); @@ -90,7 +92,10 @@ return "region-end"; } - /** [EMAIL PROTECTED] */ + /** + * [EMAIL PROTECTED] + * @return [EMAIL PROTECTED] org.apache.fop.fo.Constants#FO_REGION_END} + */ public int getNameId() { return FO_REGION_END; } Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RegionSE.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RegionSE.java?rev=651866&r1=651865&r2=651866&view=diff ============================================================================== --- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RegionSE.java (original) +++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RegionSE.java Sat Apr 26 15:08:10 2008 @@ -28,16 +28,18 @@ import org.apache.fop.fo.PropertyList; /** - * Abstract base class for fo:region-start and fo:region-end. + * Abstract base class for <a href="http://www.w3.org/TR/xsl/#fo_region-start"> + * <code>fo:region-start</code></a> and <a href="http://www.w3.org/TR/xsl/#fo_region-end"> + * <code>fo:region-end</code></a>. */ public abstract class RegionSE extends SideRegion { // The value of properties relevant for fo:region-[start|end]. // End of property values /** - * Creates a new region (start or end). - * @param parent the parent node - * @see org.apache.fop.fo.FONode#FONode(FONode) + * Create a RegionSE instance that is a child of the + * given parent [EMAIL PROTECTED] FONode}. + * @param parent the [EMAIL PROTECTED] FONode} that is to be the parent */ protected RegionSE(FONode parent) { super(parent); Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RegionStart.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RegionStart.java?rev=651866&r1=651865&r2=651866&view=diff ============================================================================== --- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RegionStart.java (original) +++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RegionStart.java Sat Apr 26 15:08:10 2008 @@ -29,14 +29,15 @@ import org.apache.fop.datatypes.SimplePercentBaseContext; /** - * The fo:region-start element. + * Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_region-start"> + * <code>fo:region-start</code></a> object. */ public class RegionStart extends RegionSE { /** - * Creates a new region-start element. - * @param parent the parent node - * @see org.apache.fop.fo.FONode#FONode(FONode) + * Create a RegionStart instance that is a child of the + * given parent [EMAIL PROTECTED] FONode}. + * @param parent the [EMAIL PROTECTED] FONode} that is to be the parent */ public RegionStart(FONode parent) { super(parent); @@ -88,7 +89,10 @@ return "region-start"; } - /** [EMAIL PROTECTED] */ + /** + * [EMAIL PROTECTED] + * @return [EMAIL PROTECTED] org.apache.fop.fo.Constants#FO_REGION_START} + */ public int getNameId() { return FO_REGION_START; } Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java?rev=651866&r1=651865&r2=651866&view=diff ============================================================================== --- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java (original) +++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java Sat Apr 26 15:08:10 2008 @@ -32,7 +32,8 @@ import org.apache.fop.fo.properties.Property; /** - * A repeatable-page-master-alternatives formatting object. + * Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_repeatable-page-master-alternatives"> + * <code>fo:repeatable-page-master-alternatives</code></a> object. * This contains a list of conditional-page-master-reference * and the page master is found from the reference that * matches the page number and emptyness. @@ -52,9 +53,9 @@ private boolean hasPagePositionOnly = false; /** - * Creates a new repeatable-page-master-alternatives element. - * @param parent the parent node - * @see org.apache.fop.fo.FONode#FONode(FONode) + * Base constructor + * + * @param parent [EMAIL PROTECTED] FONode} that is the parent of this object */ public RepeatablePageMasterAlternatives(FONode parent) { super(parent); @@ -69,7 +70,7 @@ protected void startOfNode() throws FOPException { conditionalPageMasterRefs = new java.util.ArrayList(); - assert parent.getName().equals("fo:page-sequence-master"); //Validation by the parent + assert parent.getName().equals("fo:page-sequence-master"); //Validation by the parent PageSequenceMaster pageSequenceMaster = (PageSequenceMaster)parent; pageSequenceMaster.addSubsequenceSpecifier(this); } @@ -83,7 +84,7 @@ /** * [EMAIL PROTECTED] - XSL/FOP: (conditional-page-master-reference+) + * <br>XSL/FOP: (conditional-page-master-reference+) */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { @@ -94,7 +95,10 @@ } } - /** @return the "maximum-repeats" property. */ + /** + * Get the value of the <code>maximum-repeats</code> property? + * @return the "maximum-repeats" property + */ public int getMaximumRepeats() { if (maximumRepeats.getEnum() == EN_NO_LIMIT) { return INFINITE; @@ -180,7 +184,10 @@ return "repeatable-page-master-alternatives"; } - /** [EMAIL PROTECTED] */ + /** + * [EMAIL PROTECTED] + * @return [EMAIL PROTECTED] org.apache.fop.fo.Constants#FO_REPEATABLE_PAGE_MASTER_ALTERNATIVES} + */ public int getNameId() { return FO_REPEATABLE_PAGE_MASTER_ALTERNATIVES; } Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java?rev=651866&r1=651865&r2=651866&view=diff ============================================================================== --- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java (original) +++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java Sat Apr 26 15:08:10 2008 @@ -30,7 +30,8 @@ import org.apache.fop.fo.properties.Property; /** - * A repeatable-page-master-reference formatting object. + * Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_repeatable-page-master-reference"> + * <code>fo:repeatable-page-master-reference</code></a> object. * This handles a reference with a specified number of repeating * instances of the referenced page master (may have no limit). */ @@ -47,9 +48,9 @@ private int numberConsumed = 0; /** - * Creates a new repeatable-page-master-reference element. - * @param parent the parent node - * @see org.apache.fop.fo.FONode#FONode(FONode) + * Base constructor + * + * @param parent [EMAIL PROTECTED] FONode} that is the parent of this object */ public RepeatablePageMasterReference(FONode parent) { super(parent); @@ -78,13 +79,11 @@ /** * [EMAIL PROTECTED] - * XSL Content Model: empty + * <br>XSL Content Model: empty */ protected void validateChildNode(Locator loc, String nsURI, String localName) - throws ValidationException { - if (FO_URI.equals(nsURI)) { - invalidChildError(loc, nsURI, localName); - } + throws ValidationException { + invalidChildError(loc, nsURI, localName); } /** [EMAIL PROTECTED] */ @@ -103,7 +102,10 @@ return masterReference; } - /** @return the "maximum-repeats" property. */ + /** + * Get the value of the <code>maximum-repeats</code> property. + * @return the "maximum-repeats" property + */ public int getMaximumRepeats() { if (maximumRepeats.getEnum() == EN_NO_LIMIT) { return INFINITE; @@ -149,7 +151,10 @@ return "repeatable-page-master-reference"; } - /** [EMAIL PROTECTED] */ + /** + * [EMAIL PROTECTED] + * @return [EMAIL PROTECTED] org.apache.fop.fo.Constants#FO_REPEATABLE_PAGE_MASTER_REFERENCE} + */ public int getNameId() { return FO_REPEATABLE_PAGE_MASTER_REFERENCE; } Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/Root.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/Root.java?rev=651866&r1=651865&r2=651866&view=diff ============================================================================== --- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/Root.java (original) +++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/Root.java Sat Apr 26 15:08:10 2008 @@ -34,7 +34,9 @@ import org.apache.fop.fo.pagination.bookmarks.BookmarkTree; /** - * The fo:root formatting object. Contains page masters, page-sequences. + * Class modeling the <a href="http://www.w3.org/TR/xsl/#fo_root"> + * <code>fo:root</code></a> formatting object. + * Contains page masters, page-sequences. */ public class Root extends FObj { // The value of properties relevant for fo:root. @@ -62,16 +64,14 @@ private FOEventHandler foEventHandler = null; /** - * Creates a new root element. - * @param parent the parent node (must be null) - * @see org.apache.fop.fo.FONode#FONode(FONode) + * Base constructor + * + * @param parent [EMAIL PROTECTED] FONode} that is the parent of this object + * Note: parent should be null for the fo:root. */ public Root(FONode parent) { super(parent); pageSequences = new java.util.ArrayList(); - if (parent != null) { - //throw new FOPException("root must be root element"); - } } /** [EMAIL PROTECTED] */ @@ -89,8 +89,8 @@ /** * [EMAIL PROTECTED] - XSL 1.0 Spec: (layout-master-set,declarations?,page-sequence+) - FOP: (layout-master-set, declarations?, fox:bookmarks?, page-sequence+) + * <br>XSL 1.0 Spec: (layout-master-set,declarations?,page-sequence+) + * <br>FOP: (layout-master-set, declarations?, fox:bookmarks?, page-sequence+) */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { @@ -138,6 +138,13 @@ } + /** @inheritDoc */ + protected void validateChildNode(Locator loc, FONode child) throws ValidationException { + if (child instanceof AbstractPageSequence) { + pageSequenceFound = true; + } + } + /** * Sets the FOEventHandler object that this Root is attached to * @param foEventHandler the FOEventHandler object @@ -295,7 +302,10 @@ return "root"; } - /** [EMAIL PROTECTED] */ + /** + * [EMAIL PROTECTED] + * @return [EMAIL PROTECTED] org.apache.fop.fo.Constants#FO_ROOT} + */ public int getNameId() { return FO_ROOT; } Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java?rev=651866&r1=651865&r2=651866&view=diff ============================================================================== --- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java (original) +++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java Sat Apr 26 15:08:10 2008 @@ -36,7 +36,8 @@ import org.apache.fop.fo.properties.CommonMarginBlock; /** - * A simple-page-master formatting object. + * Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_simple-page-master"> + * <code>fo:simple-page-master</code></a> object. * This creates a simple page from the specified regions * and attributes. */ @@ -63,9 +64,9 @@ private boolean hasRegionEnd = false; /** - * Creates a new simple-page-master element. - * @param parent the parent node - * @see org.apache.fop.fo.FONode#FONode(FONode) + * Base constructor + * + * @param parent [EMAIL PROTECTED] FONode} that is the parent of this object */ public SimplePageMaster(FONode parent) { super(parent); @@ -109,7 +110,7 @@ /** * [EMAIL PROTECTED] - * XSL Content Model: (region-body,region-before?,region-after?,region-start?,region-end?) + * <br>XSL Content Model: (region-body,region-before?,region-after?,region-start?,region-end?) */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { @@ -262,7 +263,10 @@ return "simple-page-master"; } - /** [EMAIL PROTECTED] */ + /** + * [EMAIL PROTECTED] + * @return [EMAIL PROTECTED] org.apache.fop.fo.Constants#FO_SIMPLE_PAGE_MASTER} + */ public int getNameId() { return FO_SIMPLE_PAGE_MASTER; } Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/SinglePageMasterReference.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/SinglePageMasterReference.java?rev=651866&r1=651865&r2=651866&view=diff ============================================================================== --- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/SinglePageMasterReference.java (original) +++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/SinglePageMasterReference.java Sat Apr 26 15:08:10 2008 @@ -29,7 +29,8 @@ import org.apache.fop.fo.ValidationException; /** - * A single-page-master-reference formatting object. + * Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_single-page-master-reference"> + * <code>fo:single-page-master-reference</code></a> object. * This is a reference for a single page. It returns the * master name only once until reset. */ @@ -46,9 +47,9 @@ private int state; /** - * Creates a new single-page-master-reference element. - * @param parent the parent node - * @see org.apache.fop.fo.FONode#FONode(FONode) + * Creates a new SinglePageMasterReference instance that is + * a child of the given [EMAIL PROTECTED] FONode}. + * @param parent [EMAIL PROTECTED] FONode} that is the parent of this object */ public SinglePageMasterReference(FONode parent) { super(parent); @@ -72,7 +73,7 @@ /** * [EMAIL PROTECTED] - * XSL Content Model: empty + * <br>XSL Content Model: empty */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { @@ -127,7 +128,10 @@ return "single-page-master-reference"; } - /** [EMAIL PROTECTED] */ + /** + * [EMAIL PROTECTED] + * @return [EMAIL PROTECTED] org.apache.fop.fo.Constants#FO_SINGLE_PAGE_MASTER_REFERENCE} + */ public int getNameId() { return FO_SINGLE_PAGE_MASTER_REFERENCE; } Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/StaticContent.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/StaticContent.java?rev=651866&r1=651865&r2=651866&view=diff ============================================================================== --- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/StaticContent.java (original) +++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/StaticContent.java Sat Apr 26 15:08:10 2008 @@ -27,12 +27,12 @@ import org.apache.fop.fo.ValidationException; /** - * Class modeling the fo:static-content object. + * Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_static-content"> + * <code>fo:static-content</code></a> object. */ public class StaticContent extends Flow { /** - * Creates a new static-content element. * @param parent FONode that is the parent of this object */ public StaticContent(FONode parent) { @@ -61,7 +61,7 @@ /** * [EMAIL PROTECTED] - * XSL Content Model: (%block;)+ + * <br>XSL Content Model: (%block;)+ */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { @@ -77,7 +77,10 @@ return "static-content"; } - /** [EMAIL PROTECTED] */ + /** + * [EMAIL PROTECTED] + * @return [EMAIL PROTECTED] org.apache.fop.fo.Constants#FO_STATIC_CONTENT} + */ public int getNameId() { return FO_STATIC_CONTENT; } Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/SubSequenceSpecifier.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/SubSequenceSpecifier.java?rev=651866&r1=651865&r2=651866&view=diff ============================================================================== --- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/SubSequenceSpecifier.java (original) +++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/SubSequenceSpecifier.java Sat Apr 26 15:08:10 2008 @@ -21,8 +21,8 @@ /** - * Classes that implement this interface can be added to a PageSequenceMaster, - * and are capable of looking up an appropriate PageMaster. + * Classes that implement this interface can be added to a [EMAIL PROTECTED] PageSequenceMaster}, + * and are capable of looking up an appropriate [EMAIL PROTECTED] SimplePageMaster}. */ public interface SubSequenceSpecifier { Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/Title.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/Title.java?rev=651866&r1=651865&r2=651866&view=diff ============================================================================== --- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/Title.java (original) +++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/Title.java Sat Apr 26 15:08:10 2008 @@ -27,7 +27,8 @@ import org.apache.fop.fo.flow.InlineLevel; /** - * Class modeling the fo:title object. + * Class modeling the <a href="http://www.w3.org/TR/xsl/#fo_title"> + * <code>fo:title</code></a> object. */ public class Title extends InlineLevel { // The value of properties relevant for fo:title. @@ -35,7 +36,6 @@ // End of property values /** - * Creates a new title element. * @param parent FONode that is the parent of this object */ public Title(FONode parent) { @@ -44,10 +44,10 @@ /** * [EMAIL PROTECTED] String, String) - XSL/FOP: (#PCDATA|%inline;)* + * <br>XSL/FOP: (#PCDATA|%inline;)* */ protected void validateChildNode(Locator loc, String nsURI, String localName) - throws ValidationException { + throws ValidationException { if (FO_URI.equals(nsURI)) { if (!isInlineItem(nsURI, localName)) { invalidChildError(loc, nsURI, localName); @@ -60,7 +60,10 @@ return "title"; } - /** [EMAIL PROTECTED] */ + /** + * [EMAIL PROTECTED] + * @return [EMAIL PROTECTED] org.apache.fop.fo.Constants#FO_TITLE} + */ public int getNameId() { return FO_TITLE; } Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/bookmarks/Bookmark.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/bookmarks/Bookmark.java?rev=651866&r1=651865&r2=651866&view=diff ============================================================================== --- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/bookmarks/Bookmark.java (original) +++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/bookmarks/Bookmark.java Sat Apr 26 15:08:10 2008 @@ -20,21 +20,19 @@ package org.apache.fop.fo.pagination.bookmarks; import java.util.ArrayList; -import java.util.List; import org.xml.sax.Locator; - import org.apache.fop.apps.FOPException; -import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; +import org.apache.fop.fo.FONode; import org.apache.fop.fo.PropertyList; import org.apache.fop.fo.ValidationException; /** - * The fo:bookmark formatting object, first introduced in the - * XSL 1.1 WD. Prototype version only, subject to change as - * XSL 1.1 WD evolves. + * Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_bookmark"> + * <code>fo:bookmark</code></a> object, first introduced in the + * XSL 1.1 WD. */ public class Bookmark extends FObj { private BookmarkTitle bookmarkTitle; @@ -50,7 +48,8 @@ /** - * Create a new bookmark object. + * Create a new Bookmark object that is a child of the + * given [EMAIL PROTECTED] FONode}. * * @param parent the parent fo node */ @@ -58,9 +57,7 @@ super(parent); } - /** - * [EMAIL PROTECTED] - */ + /** [EMAIL PROTECTED] */ public void bind(PropertyList pList) throws FOPException { externalDestination = pList.get(PR_EXTERNAL_DESTINATION).getString(); internalDestination = pList.get(PR_INTERNAL_DESTINATION).getString(); @@ -80,7 +77,7 @@ /** * [EMAIL PROTECTED] - XSL/FOP: (bookmark-title, bookmark*) + * <br>XSL/FOP: (bookmark-title, bookmark*) */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { @@ -99,18 +96,14 @@ } } - /** - * [EMAIL PROTECTED] - */ + /** [EMAIL PROTECTED] */ protected void endOfNode() throws FOPException { if (bookmarkTitle == null) { missingChildElementError("(bookmark-title, bookmark*)"); } } - /** - * [EMAIL PROTECTED] - */ + /** [EMAIL PROTECTED] */ protected void addChildNode(FONode obj) { if (obj instanceof BookmarkTitle) { bookmarkTitle = (BookmarkTitle)obj; @@ -155,10 +148,10 @@ } /** - * Returns a list of child bookmarks. - * @return the list of child bookmarks + * Get the child <code>Bookmark</code>s in an <code>java.util.ArrayList</code>. + * @return an <code>ArrayList</code> containing the child Bookmarks */ - public List getChildBookmarks() { + public ArrayList getChildBookmarks() { return childBookmarks; } @@ -167,7 +160,10 @@ return "bookmark"; } - /** [EMAIL PROTECTED] */ + /** + * [EMAIL PROTECTED] + * @return [EMAIL PROTECTED] org.apache.fop.fo.Constants#FO_BOOKMARK} + */ public int getNameId() { return FO_BOOKMARK; } Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/bookmarks/BookmarkTitle.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/bookmarks/BookmarkTitle.java?rev=651866&r1=651865&r2=651866&view=diff ============================================================================== --- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/bookmarks/BookmarkTitle.java (original) +++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/bookmarks/BookmarkTitle.java Sat Apr 26 15:08:10 2008 @@ -21,23 +21,24 @@ import org.xml.sax.Locator; -import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; +import org.apache.fop.fo.FONode; import org.apache.fop.fo.PropertyList; import org.apache.fop.fo.ValidationException; /** - * The fo:bookmark-title formatting object, first introduced in the - * XSL 1.1 WD. Prototype version only, subject to change as XSL 1.1 WD - * evolves. + * Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_bookmark-title"> + * <code>fo:bookmark-title</code></a> object, first introduced in the + * XSL 1.1 WD. */ public class BookmarkTitle extends FObj { private String title = ""; /** - * Create a new BookmarkTitle object. + * Create a new BookmarkTitle object that is a child + * of the given [EMAIL PROTECTED] FONode}. * - * @param parent the fo node parent + * @param parent the [EMAIL PROTECTED] FONode} parent */ public BookmarkTitle(FONode parent) { super(parent); @@ -45,14 +46,13 @@ /** * Add the characters to this BookmarkTitle. - * The text data inside the BookmarkTitle XML element + * The text data inside the BookmarkTitle xml element * is used for the BookmarkTitle string. * * @param data the character data * @param start the start position in the data array * @param end the end position in the character array - * @param pList the currently valid property list - * @param locator location in FO source file. + * @param locator location in fo source file. */ protected void addCharacters(char[] data, int start, int end, PropertyList pList, @@ -62,10 +62,10 @@ /** * [EMAIL PROTECTED] - XSL/FOP: empty + * <br>XSL/FOP: empty */ protected void validateChildNode(Locator loc, String nsURI, String localName) - throws ValidationException { + throws ValidationException { if (FO_URI.equals(nsURI)) { invalidChildError(loc, nsURI, localName); } @@ -85,7 +85,10 @@ return "bookmark-title"; } - /** [EMAIL PROTECTED] */ + /** + * [EMAIL PROTECTED] + * @return [EMAIL PROTECTED] org.apache.fop.fo.Constants#FO_BOOKMARK_TITLE} + */ public int getNameId() { return FO_BOOKMARK_TITLE; } Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/bookmarks/BookmarkTree.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/bookmarks/BookmarkTree.java?rev=651866&r1=651865&r2=651866&view=diff ============================================================================== --- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/bookmarks/BookmarkTree.java (original) +++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/pagination/bookmarks/BookmarkTree.java Sat Apr 26 15:08:10 2008 @@ -21,7 +21,6 @@ // Java import java.util.ArrayList; -import java.util.List; import org.xml.sax.Locator; @@ -32,17 +31,18 @@ import org.apache.fop.fo.pagination.Root; /** - * The fo:bookmark-tree formatting object, first introduced in the - * XSL 1.1 WD. Prototype version only, subject to change as XSL 1.1 WD - * evolves. + * Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_bookmark-tree"> + * <code>fo:bookmark-tree</code></a> object, first introduced in the + * XSL 1.1 WD. */ public class BookmarkTree extends FObj { private ArrayList bookmarks = new ArrayList(); /** - * Creates a new bookmark-tree element. - * @param parent the parent node - * @see org.apache.fop.fo.FONode#FONode(FONode) + * Create a new BookmarkTree object that is a child + * of the given [EMAIL PROTECTED] FONode}. + * + * @param parent the [EMAIL PROTECTED] FONode} parent */ public BookmarkTree(FONode parent) { super(parent); @@ -55,10 +55,8 @@ } } - /** - * [EMAIL PROTECTED] - */ - protected void endOfNode() throws FOPException { + /** [EMAIL PROTECTED] */ + protected void endOfNode() throws FOPException { if (bookmarks == null) { missingChildElementError("(fo:bookmark+)"); } @@ -67,7 +65,7 @@ /** * [EMAIL PROTECTED] - XSL/FOP: (bookmark+) + * <br>XSL/FOP: (bookmark+) */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { @@ -79,10 +77,10 @@ } /** - * Returns the root bookmarks. - * @return the root bookmarks + * Get the descendant [EMAIL PROTECTED] Bookmark}s. + * @return an <code>ArrayList</code> containing the [EMAIL PROTECTED] Bookmark} objects. */ - public List getBookmarks() { + public ArrayList getBookmarks() { return bookmarks; } @@ -91,7 +89,10 @@ return "bookmark-tree"; } - /** [EMAIL PROTECTED] */ + /** + * [EMAIL PROTECTED] + * @return [EMAIL PROTECTED] org.apache.fop.fo.Constants#FO_BOOKMARK_TREE} + */ public int getNameId() { return FO_BOOKMARK_TREE; } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
