aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/layoutmgr/table/PrimaryGridUnit.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/layoutmgr/table/PrimaryGridUnit.java')
-rw-r--r--src/java/org/apache/fop/layoutmgr/table/PrimaryGridUnit.java20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/table/PrimaryGridUnit.java b/src/java/org/apache/fop/layoutmgr/table/PrimaryGridUnit.java
index ece022556..34daf7d96 100644
--- a/src/java/org/apache/fop/layoutmgr/table/PrimaryGridUnit.java
+++ b/src/java/org/apache/fop/layoutmgr/table/PrimaryGridUnit.java
@@ -55,18 +55,22 @@ public class PrimaryGridUnit extends GridUnit {
* @param startRow index of the row this grid unit belongs to, zero-based
*/
public PrimaryGridUnit(TableCell cell, TableColumn column, int startCol, int startRow) {
- super(cell, column, startCol, 0);
+ super(cell, column, startCol, 0, 0);
this.startRow = startRow;
log.trace("PrimaryGridUnit created, row " + startRow + " col " + startCol);
- if (cell != null) {
- cellLM = new TableCellLayoutManager(cell, this);
- }
}
public TableCellLayoutManager getCellLM() {
+ assert cellLM != null;
return cellLM;
}
+ /** {@inheritDoc} */
+ public PrimaryGridUnit getPrimary() {
+ return this;
+ }
+
+ /** {@inheritDoc} */
public boolean isPrimary() {
return true;
}
@@ -225,4 +229,12 @@ public class PrimaryGridUnit extends GridUnit {
|| (getCell().getNumberRowsSpanned() > 1);
}
+ /**
+ * Creates a cellLM for the corresponding table-cell. A new one must be created
+ * for each new static-content (TODO).
+ */
+ public void createCellLM() {
+ cellLM = new TableCellLayoutManager(cell, this);
+ }
+
}