diff options
Diffstat (limited to 'src/java/org/apache/fop/fo/flow')
28 files changed, 145 insertions, 60 deletions
diff --git a/src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java b/src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java index 0f4575c5b..7bc0ff00c 100644 --- a/src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java +++ b/src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java @@ -109,7 +109,9 @@ public abstract class AbstractPageNumberCitation extends FObj } /** {@inheritDoc} */ - public void processNode(String elementName, Locator locator, Attributes attlist, PropertyList pList) throws FOPException { + public void processNode + (String elementName, Locator locator, Attributes attlist, PropertyList pList) + throws FOPException { super.processNode(elementName, locator, attlist, pList); if (!inMarker() && (refId == null || "".equals(refId))) { missingPropertyError("ref-id"); diff --git a/src/java/org/apache/fop/fo/flow/Block.java b/src/java/org/apache/fop/fo/flow/Block.java index e3176464d..66e06db83 100644 --- a/src/java/org/apache/fop/fo/flow/Block.java +++ b/src/java/org/apache/fop/fo/flow/Block.java @@ -330,7 +330,8 @@ public class Block extends FObjMixed implements BreakPropertySet, StructurePoint /** * @return the "fox:disable-column-balancing" property, one of - * {@link Constants#EN_TRUE}, {@link Constants#EN_FALSE} + * {@link org.apache.fop.fo.Constants#EN_TRUE}, + * {@link org.apache.fop.fo.Constants#EN_FALSE} */ public int getDisableColumnBalancing() { return disableColumnBalancing; diff --git a/src/java/org/apache/fop/fo/flow/BlockContainer.java b/src/java/org/apache/fop/fo/flow/BlockContainer.java index 2a8d73002..57cb6e5c6 100644 --- a/src/java/org/apache/fop/fo/flow/BlockContainer.java +++ b/src/java/org/apache/fop/fo/flow/BlockContainer.java @@ -219,7 +219,8 @@ public class BlockContainer extends FObj implements BreakPropertySet { /** * @return the "fox:disable-column-balancing" property, one of - * {@link Constants#EN_TRUE}, {@link Constants#EN_FALSE} + * {@link org.apache.fop.fo.Constants#EN_TRUE}, + * {@link org.apache.fop.fo.Constants#EN_FALSE} */ public int getDisableColumnBalancing() { return disableColumnBalancing; diff --git a/src/java/org/apache/fop/fo/flow/Float.java b/src/java/org/apache/fop/fo/flow/Float.java index 815b30393..5d8fcdc2c 100644 --- a/src/java/org/apache/fop/fo/flow/Float.java +++ b/src/java/org/apache/fop/fo/flow/Float.java @@ -38,7 +38,7 @@ public class Float extends FObj { // private int clear; // End of property values - static boolean notImplementedWarningGiven = false; + private static boolean notImplementedWarningGiven = false; /** * Base constructor diff --git a/src/java/org/apache/fop/fo/flow/Footnote.java b/src/java/org/apache/fop/fo/flow/Footnote.java index e73701c3b..51d2581cd 100644 --- a/src/java/org/apache/fop/fo/flow/Footnote.java +++ b/src/java/org/apache/fop/fo/flow/Footnote.java @@ -76,9 +76,9 @@ public class Footnote extends FObj { /** * {@inheritDoc} * <br>XSL Content Model: (inline,footnote-body) - * @todo implement additional constraint: A fo:footnote is not permitted + * TODO implement additional constraint: A fo:footnote is not permitted * to have a fo:float, fo:footnote, or fo:marker as a descendant. - * @todo implement additional constraint: A fo:footnote is not + * TODO implement additional constraint: A fo:footnote is not * permitted to have as a descendant a fo:block-container that * generates an absolutely positioned area. */ diff --git a/src/java/org/apache/fop/fo/flow/Inline.java b/src/java/org/apache/fop/fo/flow/Inline.java index e6e8e9c01..d9ae63ec8 100644 --- a/src/java/org/apache/fop/fo/flow/Inline.java +++ b/src/java/org/apache/fop/fo/flow/Inline.java @@ -120,7 +120,8 @@ public class Inline extends InlineLevel implements StructurePointerPropertySet { } else if (!isBlockOrInlineItem(nsURI, localName)) { invalidChildError(loc, nsURI, localName); } else if (!canHaveBlockLevelChildren && isBlockItem(nsURI, localName)) { - invalidChildError(loc, getParent().getName(), nsURI, getName(), "rule.inlineContent"); + invalidChildError(loc, getParent().getName(), nsURI, getName(), + "rule.inlineContent"); } else { blockOrInlineItemFound = true; } diff --git a/src/java/org/apache/fop/fo/flow/Leader.java b/src/java/org/apache/fop/fo/flow/Leader.java index c25fc8cab..54027514c 100644 --- a/src/java/org/apache/fop/fo/flow/Leader.java +++ b/src/java/org/apache/fop/fo/flow/Leader.java @@ -30,7 +30,7 @@ import org.apache.fop.fo.properties.LengthRangeProperty; * <code>fo:leader</code></a> object. * The main property of <code>fo:leader</code> is leader-pattern. * The following patterns are treated: rule, space, dots and use-content. - * @todo implement validateChildNode() + * TODO implement validateChildNode() */ public class Leader extends InlineLevel { // The value of properties relevant for fo:leader. diff --git a/src/java/org/apache/fop/fo/flow/ListItem.java b/src/java/org/apache/fop/fo/flow/ListItem.java index f748bc15a..c4a2aa64b 100644 --- a/src/java/org/apache/fop/fo/flow/ListItem.java +++ b/src/java/org/apache/fop/fo/flow/ListItem.java @@ -119,7 +119,7 @@ public class ListItem extends FObj implements BreakPropertySet { /** * {@inheritDoc} - * @todo see if can/should rely on base class for this + * TODO see if can/should rely on base class for this * (i.e., add to childNodes instead) */ public void addChildNode(FONode child) { diff --git a/src/java/org/apache/fop/fo/flow/Marker.java b/src/java/org/apache/fop/fo/flow/Marker.java index 01863c0c7..4588a9df3 100644 --- a/src/java/org/apache/fop/fo/flow/Marker.java +++ b/src/java/org/apache/fop/fo/flow/Marker.java @@ -19,7 +19,6 @@ package org.apache.fop.fo.flow; -import java.util.Collections; import java.util.Map; import org.xml.sax.Attributes; @@ -111,7 +110,7 @@ public class Marker extends FObjMixed { * <br><i>Additionally: "An fo:marker may contain any formatting objects that * are permitted as a replacement of any fo:retrieve-marker that retrieves * the fo:marker's children."</i> - * @todo implement "additional" constraint, possibly within fo:retrieve-marker + * TODO implement "additional" constraint, possibly within fo:retrieve-marker */ protected void validateChildNode(Locator loc, String nsURI, String localName) throws ValidationException { @@ -199,17 +198,25 @@ public class Marker extends FObjMixed { name = attributes.getLocalName(i); value = attributes.getValue(i); - this.attribs[i] = - MarkerAttribute.getInstance(namespace, qname, name, value); + this.attribs[i] + = MarkerAttribute.getInstance(namespace, qname, name, value); } } - /** Null implementation; not used by this type of {@link PropertyList} */ + /** + * Null implementation; not used by this type of {@link PropertyList}. + * @param propId the propert id + * @param value the property value + */ public void putExplicit(int propId, Property value) { //nop } - /** Null implementation; not used by this type of {@link PropertyList} */ + /** + * Null implementation; not used by this type of {@link PropertyList}. + * @param propId the propert id + * @return the property id + */ public Property getExplicit(int propId) { return null; } @@ -259,7 +266,11 @@ public class Marker extends FObjMixed { } } - /** Default implementation; not used */ + /** + * Default implementation; not used. + * @param index a type index + * @return type string + */ public String getType(int index) { return "CDATA"; } @@ -305,12 +316,21 @@ public class Marker extends FObjMixed { return index; } - /** Default implementation; not used */ + /** + * Default implementation; not used + * @param name a type name + * @param namespace a type namespace + * @return type string + */ public String getType(String name, String namespace) { return "CDATA"; } - /** Default implementation; not used */ + /** + * Default implementation; not used + * @param qname a type name + * @return type string + */ public String getType(String qname) { return "CDATA"; } @@ -337,12 +357,16 @@ public class Marker extends FObjMixed { /** Convenience inner class */ public static final class MarkerAttribute { - private static PropertyCache attributeCache = - new PropertyCache(MarkerAttribute.class); + private static PropertyCache attributeCache + = new PropertyCache(MarkerAttribute.class); + /** namespace */ protected String namespace; + /** qualfied name */ protected String qname; + /** local name */ protected String name; + /** value */ protected String value; /** diff --git a/src/java/org/apache/fop/fo/flow/MultiCase.java b/src/java/org/apache/fop/fo/flow/MultiCase.java index b2d630ba7..ac965dffb 100644 --- a/src/java/org/apache/fop/fo/flow/MultiCase.java +++ b/src/java/org/apache/fop/fo/flow/MultiCase.java @@ -27,7 +27,7 @@ import org.apache.fop.fo.PropertyList; /** * Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_multi-case"> * <code>fo:multi-case</code></a> object. - * @todo implement validateChildNode() + * TODO implement validateChildNode() */ public class MultiCase extends FObj { // The value of properties relevant for fo:multi-case. @@ -38,7 +38,7 @@ public class MultiCase extends FObj { // private CommonAccessibility commonAccessibility; // End of property values - static boolean notImplementedWarningGiven = false; + private static boolean notImplementedWarningGiven = false; /** * Base constructor diff --git a/src/java/org/apache/fop/fo/flow/MultiProperties.java b/src/java/org/apache/fop/fo/flow/MultiProperties.java index 091934203..3e2e57d97 100644 --- a/src/java/org/apache/fop/fo/flow/MultiProperties.java +++ b/src/java/org/apache/fop/fo/flow/MultiProperties.java @@ -37,11 +37,11 @@ public class MultiProperties extends FObj { // private CommonAccessibility commonAccessibility; // End of property values - static boolean notImplementedWarningGiven = false; + private static boolean notImplementedWarningGiven = false; // used for input FO validation - boolean hasMultiPropertySet = false; - boolean hasWrapper = false; + private boolean hasMultiPropertySet = false; + private boolean hasWrapper = false; /** * Base constructor diff --git a/src/java/org/apache/fop/fo/flow/MultiPropertySet.java b/src/java/org/apache/fop/fo/flow/MultiPropertySet.java index 96e73ec97..6e7c6a3e0 100644 --- a/src/java/org/apache/fop/fo/flow/MultiPropertySet.java +++ b/src/java/org/apache/fop/fo/flow/MultiPropertySet.java @@ -37,7 +37,7 @@ public class MultiPropertySet extends FObj { // private ToBeImplementedProperty activeState; // End of property values - static boolean notImplementedWarningGiven = false; + private static boolean notImplementedWarningGiven = false; /** * Base constructor diff --git a/src/java/org/apache/fop/fo/flow/MultiSwitch.java b/src/java/org/apache/fop/fo/flow/MultiSwitch.java index 1db72159e..aa18d6cdf 100644 --- a/src/java/org/apache/fop/fo/flow/MultiSwitch.java +++ b/src/java/org/apache/fop/fo/flow/MultiSwitch.java @@ -39,7 +39,7 @@ public class MultiSwitch extends FObj { // private CommonAccessibility commonAccessibility; // End of property values - static boolean notImplementedWarningGiven = false; + private static boolean notImplementedWarningGiven = false; /** * Base constructor diff --git a/src/java/org/apache/fop/fo/flow/MultiToggle.java b/src/java/org/apache/fop/fo/flow/MultiToggle.java index aacfda8eb..10766680e 100644 --- a/src/java/org/apache/fop/fo/flow/MultiToggle.java +++ b/src/java/org/apache/fop/fo/flow/MultiToggle.java @@ -39,7 +39,7 @@ public class MultiToggle extends FObj { // public ToBeImplementedProperty prSwitchTo; // End of property values - static boolean notImplementedWarningGiven = false; + private static boolean notImplementedWarningGiven = false; /** * Base constructor diff --git a/src/java/org/apache/fop/fo/flow/RetrieveTableMarker.java b/src/java/org/apache/fop/fo/flow/RetrieveTableMarker.java index c58ecc628..3fe977b21 100644 --- a/src/java/org/apache/fop/fo/flow/RetrieveTableMarker.java +++ b/src/java/org/apache/fop/fo/flow/RetrieveTableMarker.java @@ -16,6 +16,7 @@ */ /* $Id$ */ + package org.apache.fop.fo.flow; import org.apache.fop.fo.FONode; @@ -50,7 +51,9 @@ public class RetrieveTableMarker extends AbstractRetrieveMarker { * <i>NOTE: An <code>fo:retrieve-table-marker</code> is only permitted as a descendant * of an <code>fo:table-header</code> or an <code>fo:table-footer</code>.</i> */ - public void processNode(String elementName, Locator locator, Attributes attlist, PropertyList pList) throws FOPException { + public void processNode + (String elementName, Locator locator, Attributes attlist, PropertyList pList) + throws FOPException { if (findAncestor(FO_TABLE_HEADER) < 0 && findAncestor(FO_TABLE_FOOTER) < 0) { invalidChildError(locator, getParent().getName(), FO_URI, getName(), diff --git a/src/java/org/apache/fop/fo/flow/Wrapper.java b/src/java/org/apache/fop/fo/flow/Wrapper.java index 74072da87..7fb412521 100644 --- a/src/java/org/apache/fop/fo/flow/Wrapper.java +++ b/src/java/org/apache/fop/fo/flow/Wrapper.java @@ -76,7 +76,8 @@ public class Wrapper extends FObjMixed { try { FONode.validateChildNode(this.parent, loc, nsURI, localName); } catch (ValidationException vex) { - invalidChildError(loc, getName(), FO_URI, localName, "rule.wrapperInvalidChildForParent"); + invalidChildError(loc, getName(), FO_URI, localName, + "rule.wrapperInvalidChildForParent"); } blockOrInlineItemFound = true; } else { diff --git a/src/java/org/apache/fop/fo/flow/table/ColumnNumberManager.java b/src/java/org/apache/fop/fo/flow/table/ColumnNumberManager.java index 1f73f5f10..9f3ed195d 100644 --- a/src/java/org/apache/fop/fo/flow/table/ColumnNumberManager.java +++ b/src/java/org/apache/fop/fo/flow/table/ColumnNumberManager.java @@ -77,8 +77,7 @@ public class ColumnNumberManager { for (int i = 0; i < pendingSpans.size(); i++) { pSpan = (PendingSpan) pendingSpans.get(i); if (pSpan != null) { - pSpan.rowsLeft--; - if (pSpan.rowsLeft == 0) { + if ( pSpan.decrRowsLeft() == 0 ) { pendingSpans.set(i, null); } else { usedColumnIndices.set(i); diff --git a/src/java/org/apache/fop/fo/flow/table/ConditionalBorder.java b/src/java/org/apache/fop/fo/flow/table/ConditionalBorder.java index 5ff01b7fa..b5cd56d47 100644 --- a/src/java/org/apache/fop/fo/flow/table/ConditionalBorder.java +++ b/src/java/org/apache/fop/fo/flow/table/ConditionalBorder.java @@ -36,20 +36,23 @@ import org.apache.fop.layoutmgr.table.CollapsingBorderModel; */ public class ConditionalBorder { + /** normal border */ public static final int NORMAL = 0; + /** leading and trailing border */ public static final int LEADING_TRAILING = 1; + /** all the rest */ public static final int REST = 2; /** Normal case, no break. */ - BorderSpecification normal; + BorderSpecification normal; // CSOK: VisibilityModifier /** Special case: the cell is at the top or the bottom of the page. */ - BorderSpecification leadingTrailing; + BorderSpecification leadingTrailing; // CSOK: VisibilityModifier /** Special case: break inside the cell. */ - BorderSpecification rest; + BorderSpecification rest; // CSOK: VisibilityModifier /** The model used to resolve borders. */ private CollapsingBorderModel collapsingBorderModel; diff --git a/src/java/org/apache/fop/fo/flow/table/GridUnit.java b/src/java/org/apache/fop/fo/flow/table/GridUnit.java index 229a7177f..37f3df37c 100644 --- a/src/java/org/apache/fop/fo/flow/table/GridUnit.java +++ b/src/java/org/apache/fop/fo/flow/table/GridUnit.java @@ -65,13 +65,13 @@ public class GridUnit { private byte flags = 0; /** the border-before specification */ - ConditionalBorder borderBefore; + ConditionalBorder borderBefore; // CSOK: VisibilityModifier /** the border-after specification */ - ConditionalBorder borderAfter; + ConditionalBorder borderAfter; // CSOK: VisibilityModifier /** the border-start specification */ - BorderSpecification borderStart; + BorderSpecification borderStart; // CSOK: VisibilityModifier /** the border-end specification */ - BorderSpecification borderEnd; + BorderSpecification borderEnd; // CSOK: VisibilityModifier /** The border model helper associated with the table */ protected CollapsingBorderModel collapsingBorderModel; diff --git a/src/java/org/apache/fop/fo/flow/table/PendingSpan.java b/src/java/org/apache/fop/fo/flow/table/PendingSpan.java index 321684fae..0a5a2b41a 100644 --- a/src/java/org/apache/fop/fo/flow/table/PendingSpan.java +++ b/src/java/org/apache/fop/fo/flow/table/PendingSpan.java @@ -27,7 +27,7 @@ class PendingSpan { /** * member variable holding the number of rows left */ - int rowsLeft; + private int rowsLeft; /** * Constructor @@ -37,4 +37,22 @@ class PendingSpan { public PendingSpan(int rows) { rowsLeft = rows; } + + /** @return number of rows spanned */ + public int getRowsLeft() { + return rowsLeft; + } + + /** + * Decrement rows spanned. + * @return number of rows spanned after decrementing + */ + public int decrRowsLeft() { + if ( rowsLeft > 0 ) { + return --rowsLeft; + } else { + return 0; + } + } + }
\ No newline at end of file diff --git a/src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java b/src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java index 9326d6cd4..529a6acc2 100644 --- a/src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java +++ b/src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java @@ -85,6 +85,10 @@ public class PrimaryGridUnit extends GridUnit { return (TablePart) node; } + /** + * Get cell's layout manager. + * @return the cell's layout manager + */ public TableCellLayoutManager getCellLM() { assert cellLM != null; return cellLM; @@ -109,6 +113,10 @@ public class PrimaryGridUnit extends GridUnit { this.elements = elements; } + /** + * Obtain the Knuth elements. + * @return a list of Knuth elements + */ public List getElements() { return this.elements; } @@ -247,6 +255,10 @@ public class PrimaryGridUnit extends GridUnit { return this.rows; } + /** + * Add a row. + * @param row the row to be added + */ public void addRow(GridUnit[] row) { if (rows == null) { rows = new java.util.ArrayList(); diff --git a/src/java/org/apache/fop/fo/flow/table/TableAndCaption.java b/src/java/org/apache/fop/fo/flow/table/TableAndCaption.java index 919e73bfb..634460ec4 100644 --- a/src/java/org/apache/fop/fo/flow/table/TableAndCaption.java +++ b/src/java/org/apache/fop/fo/flow/table/TableAndCaption.java @@ -30,7 +30,7 @@ import org.apache.fop.fo.ValidationException; /** * Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_table-and-caption"> * <code>fo:table-and-caption</code></a> property. - * @todo needs implementation + * TODO needs implementation */ public class TableAndCaption extends FObj /*implements BreakPropertySet*/ { // The value of properties relevant for fo:table-and-caption. @@ -50,7 +50,7 @@ public class TableAndCaption extends FObj /*implements BreakPropertySet*/ { // private int textAlign; // End of property values - static boolean notImplementedWarningGiven = false; + private static boolean notImplementedWarningGiven = false; /** used for FO validation */ private boolean tableCaptionFound = false; diff --git a/src/java/org/apache/fop/fo/flow/table/TableCaption.java b/src/java/org/apache/fop/fo/flow/table/TableCaption.java index bbc9b52bc..fc5d3d5b7 100644 --- a/src/java/org/apache/fop/fo/flow/table/TableCaption.java +++ b/src/java/org/apache/fop/fo/flow/table/TableCaption.java @@ -49,7 +49,7 @@ public class TableCaption extends FObj { /** used for FO validation */ private boolean blockItemFound = false; - static boolean notImplementedWarningGiven = false; + private static boolean notImplementedWarningGiven = false; /** * Create a TableCaption instance with the given {@link FONode} diff --git a/src/java/org/apache/fop/fo/flow/table/TableCellContainer.java b/src/java/org/apache/fop/fo/flow/table/TableCellContainer.java index 9b4fe755f..41eab578f 100644 --- a/src/java/org/apache/fop/fo/flow/table/TableCellContainer.java +++ b/src/java/org/apache/fop/fo/flow/table/TableCellContainer.java @@ -30,14 +30,26 @@ import org.apache.fop.fo.FONode; */ public abstract class TableCellContainer extends TableFObj implements ColumnNumberManagerHolder { + /** list of pending spans */ protected List pendingSpans; + /** column number manager */ protected ColumnNumberManager columnNumberManager; + /** + * Construct table cell container. + * @param parent the parent node of the cell container + */ public TableCellContainer(FONode parent) { super(parent); } + /** + * Add cell to current row. + * @param cell a table cell to add + * @param firstRow true is first row + * @throws FOPException if exception occurs + */ protected void addTableCellChild(TableCell cell, boolean firstRow) throws FOPException { int colNumber = cell.getColumnNumber(); int colSpan = cell.getNumberColumnsSpanned(); diff --git a/src/java/org/apache/fop/fo/flow/table/TableEventProducer.java b/src/java/org/apache/fop/fo/flow/table/TableEventProducer.java index d6abf609e..792151360 100644 --- a/src/java/org/apache/fop/fo/flow/table/TableEventProducer.java +++ b/src/java/org/apache/fop/fo/flow/table/TableEventProducer.java @@ -32,7 +32,10 @@ import org.apache.fop.fo.expr.PropertyException; public interface TableEventProducer extends EventProducer { /** Provider class for the event producer. */ - class Provider { + static final class Provider { + + private Provider() { + } /** * Returns an event producer. diff --git a/src/java/org/apache/fop/fo/flow/table/TableFObj.java b/src/java/org/apache/fop/fo/flow/table/TableFObj.java index ab8676cb3..fce82dcff 100644 --- a/src/java/org/apache/fop/fo/flow/table/TableFObj.java +++ b/src/java/org/apache/fop/fo/flow/table/TableFObj.java @@ -50,12 +50,12 @@ public abstract class TableFObj extends FObj implements StructurePointerProperty private Numeric borderStartPrecedence; private String ptr; - ConditionalBorder borderBefore; - ConditionalBorder borderAfter; - BorderSpecification borderStart; - BorderSpecification borderEnd; + ConditionalBorder borderBefore; // CSOK: VisibilityModifier + ConditionalBorder borderAfter; // CSOK: VisibilityModifier + BorderSpecification borderStart; // CSOK: VisibilityModifier + BorderSpecification borderEnd; // CSOK: VisibilityModifier - CollapsingBorderModel collapsingBorderModel; + CollapsingBorderModel collapsingBorderModel; // CSOK: VisibilityModifier /** * Create a TableFObj instance that is a child @@ -205,9 +205,10 @@ public abstract class TableFObj extends FObj implements StructurePointerProperty int foId = propertyList.getFObj().getNameId(); if (i <= 0) { if (foId == FO_TABLE_CELL || foId == FO_TABLE_COLUMN) { - ColumnNumberManagerHolder parent = - (ColumnNumberManagerHolder) propertyList.getParentFObj(); - ColumnNumberManager columnIndexManager = parent.getColumnNumberManager(); + ColumnNumberManagerHolder parent + = (ColumnNumberManagerHolder) propertyList.getParentFObj(); + ColumnNumberManager columnIndexManager + = parent.getColumnNumberManager(); i = columnIndexManager.getCurrentColumnNumber(); } else { /* very exceptional case: @@ -216,10 +217,10 @@ public abstract class TableFObj extends FObj implements StructurePointerProperty */ i = 1; } - TableEventProducer eventProducer = - TableEventProducer.Provider.get(fo.getUserAgent().getEventBroadcaster()); + TableEventProducer eventProducer = TableEventProducer.Provider.get( + fo.getUserAgent().getEventBroadcaster()); eventProducer.forceNextColumnNumber(this, propertyList.getFObj().getName(), - val, i, propertyList.getFObj().getLocator()); + val, i, propertyList.getFObj().getLocator()); } return NumberProperty.getInstance(i); } @@ -229,7 +230,8 @@ public abstract class TableFObj extends FObj implements StructurePointerProperty } /** {@inheritDoc} */ - public void processNode(String elementName, Locator locator, Attributes attlist, PropertyList pList) throws FOPException { + public void processNode(String elementName, Locator locator, Attributes attlist, + PropertyList pList) throws FOPException { super.processNode(elementName, locator, attlist, pList); Table table = getTable(); if (!inMarker() && !table.isSeparateBorderModel()) { diff --git a/src/java/org/apache/fop/fo/flow/table/TablePart.java b/src/java/org/apache/fop/fo/flow/table/TablePart.java index 5b04cddc7..3ab92cc94 100644 --- a/src/java/org/apache/fop/fo/flow/table/TablePart.java +++ b/src/java/org/apache/fop/fo/flow/table/TablePart.java @@ -46,10 +46,9 @@ public abstract class TablePart extends TableCellContainer { // private int visibility; // End of property values - /** - * used for validation - */ + /** table rows found */ protected boolean tableRowsFound = false; + /** table cells found */ protected boolean tableCellsFound = false; private boolean firstRow = true; @@ -124,6 +123,10 @@ public abstract class TablePart extends TableCellContainer { return this; } + /** + * Finish last row group. + * @throws ValidationException if content validation exception + */ protected void finishLastRowGroup() throws ValidationException { if (!inMarker()) { RowGroupBuilder rowGroupBuilder = getTable().getRowGroupBuilder(); @@ -214,6 +217,7 @@ public abstract class TablePart extends TableCellContainer { rowGroups.add(rowGroup); } + /** @return list of row groups */ public List getRowGroups() { return rowGroups; } diff --git a/src/java/org/apache/fop/fo/flow/table/TableRow.java b/src/java/org/apache/fop/fo/flow/table/TableRow.java index 2feb45d86..dd9f7c6d4 100644 --- a/src/java/org/apache/fop/fo/flow/table/TableRow.java +++ b/src/java/org/apache/fop/fo/flow/table/TableRow.java @@ -144,7 +144,6 @@ public class TableRow extends TableCellContainer implements BreakPropertySet { return (TablePart) parent; } - /** {@inheritDoc} */ boolean isTableRow() { return true; } |