rows.add(effRow);
}
int columnIndex = cell.getColumnNumber() - 1;
- PrimaryGridUnit pgu = new PrimaryGridUnit(cell, currentTableRow,
- table.getColumn(columnIndex), columnIndex);
+ PrimaryGridUnit pgu = new PrimaryGridUnit(cell, currentTableRow, columnIndex);
List row = (List) rows.get(currentRowIndex);
row.set(columnIndex, pgu);
// TODO
GridUnit[] cellRow = new GridUnit[cell.getNumberColumnsSpanned()];
cellRow[0] = pgu;
for (int j = 1; j < cell.getNumberColumnsSpanned(); j++) {
- GridUnit gu = new GridUnit(pgu, currentTableRow, table.getColumn(columnIndex + j), j, 0);
+ GridUnit gu = new GridUnit(pgu, currentTableRow, j, 0);
row.set(columnIndex + j, gu);
cellRow[j] = gu;
}
row = (List) rows.get(currentRowIndex + i);
cellRow = new GridUnit[cell.getNumberColumnsSpanned()];
for (int j = 0; j < cell.getNumberColumnsSpanned(); j++) {
- GridUnit gu = new GridUnit(pgu, currentTableRow, table.getColumn(columnIndex + j),
- j, i);
+ GridUnit gu = new GridUnit(pgu, currentTableRow, j, i);
row.set(columnIndex + j, gu);
cellRow[j] = gu;
}
/** Table row occupied by this grid unit (may be null). */
private TableRow row;
- /** Table column that this grid unit belongs to */
- private TableColumn column;
-
/** index of grid unit within cell in column direction */
private int colSpanIndex;
*
* @param table the containing table
* @param row the table-row element this grid unit belongs to (if any)
- * @param column table column this grid unit belongs to
* @param colSpanIndex index of this grid unit in the span, in column direction
* @param rowSpanIndex index of this grid unit in the span, in row direction
*/
- protected GridUnit(Table table, TableRow row, TableColumn column, int colSpanIndex,
- int rowSpanIndex) {
- this(row, column, colSpanIndex, rowSpanIndex);
+ protected GridUnit(Table table, TableRow row, int colSpanIndex, int rowSpanIndex) {
+ this(row, colSpanIndex, rowSpanIndex);
setBorders(table);
}
*
* @param cell table cell which occupies this grid unit
* @param row the table-row element this grid unit belongs to (if any)
- * @param column table column this grid unit belongs to
* @param colSpanIndex index of this grid unit in the span, in column direction
* @param rowSpanIndex index of this grid unit in the span, in row direction
*/
- protected GridUnit(TableCell cell, TableRow row, TableColumn column, int colSpanIndex,
- int rowSpanIndex) {
- this(row, column, colSpanIndex, rowSpanIndex);
+ protected GridUnit(TableCell cell, TableRow row, int colSpanIndex, int rowSpanIndex) {
+ this(row, colSpanIndex, rowSpanIndex);
this.cell = cell;
setBorders(cell.getTable());
}
*
* @param primary the before-start grid unit of the cell containing this grid unit
* @param row the table-row element this grid unit belongs to (if any)
- * @param column table column this grid unit belongs to
* @param colSpanIndex index of this grid unit in the span, in column direction
* @param rowSpanIndex index of this grid unit in the span, in row direction
*/
- GridUnit(PrimaryGridUnit primary, TableRow row, TableColumn column, int colSpanIndex,
- int rowSpanIndex) {
- this(primary.getCell(), row, column, colSpanIndex, rowSpanIndex);
+ GridUnit(PrimaryGridUnit primary, TableRow row, int colSpanIndex, int rowSpanIndex) {
+ this(primary.getCell(), row, colSpanIndex, rowSpanIndex);
this.primary = primary;
}
- private GridUnit(TableRow row, TableColumn column, int colSpanIndex, int rowSpanIndex) {
+ private GridUnit(TableRow row, int colSpanIndex, int rowSpanIndex) {
this.row = row;
- this.column = column;
this.colSpanIndex = colSpanIndex;
this.rowSpanIndex = rowSpanIndex;
}
return cell;
}
- public TableColumn getColumn() {
- return column;
- }
-
/**
* Returns the fo:table-row element (if any) this grid unit belongs to.
*
*
* @param cell table cell which occupies this grid unit
* @param row the table-row element this grid unit belongs to (if any)
- * @param column table column this grid unit belongs to
* @param colIndex index of the column this grid unit belongs to, zero-based
*/
- PrimaryGridUnit(TableCell cell, TableRow row, TableColumn column, int colIndex) {
- super(cell, row, column, 0, 0);
+ PrimaryGridUnit(TableCell cell, TableRow row, int colIndex) {
+ super(cell, row, 0, 0);
this.colIndex = colIndex;
- this.isSeparateBorderModel = column.getTable().isSeparateBorderModel(); // TODO
- this.halfBorderSeparationBPD = column.getTable().getBorderSeparation().getBPD().getLength()
+ this.isSeparateBorderModel = cell.getTable().isSeparateBorderModel(); // TODO
+ this.halfBorderSeparationBPD = cell.getTable().getBorderSeparation().getBPD().getLength()
.getValue() / 2; // TODO
}