[FOray-commit] SF.net SVN: foray: [7492] trunk/foray/foray-pioneer/src/java/org/foray/pioneer
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2006-06-09 23:55:57
|
Revision: 7492 Author: victormote Date: 2006-06-09 16:55:48 -0700 (Fri, 09 Jun 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7492&view=rev Log Message: ----------- Remove unneeded class. There is no layout work to do on a column. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java Removed Paths: ------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableColumnPL.java Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2006-06-09 23:51:46 UTC (rev 7491) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/PioneerLS.java 2006-06-09 23:55:48 UTC (rev 7492) @@ -404,7 +404,7 @@ return new TableCellPL((TableCell) node, this); } case FONode.NODE_TABLE_COLUMN: { - return new TableColumnPL((TableColumn) node, this); + return new NoLayoutPL((TableColumn) node, this); } case FONode.NODE_TABLE_FOOTER: { return new TableFooterPL((TableFooter) node, this); Deleted: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableColumnPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableColumnPL.java 2006-06-09 23:51:46 UTC (rev 7491) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TableColumnPL.java 2006-06-09 23:55:48 UTC (rev 7492) @@ -1,78 +0,0 @@ -/* - * Copyright 2004 The FOray Project. - * http://www.foray.org - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This work is in part derived from the following work(s), used with the - * permission of the licensor: - * Apache FOP, licensed by the Apache Software Foundation - * - */ - -/* $Id$ */ - -package org.foray.pioneer; - -import org.axsl.areaW.Area; -import org.axsl.areaW.TableColumnArea; -import org.axsl.areaW.TableArea; - -import org.axsl.areaW.AreaWException; -import org.axsl.foR.fo.Table; -import org.axsl.foR.fo.TableColumn; - - -public class TableColumnPL extends FObjPL { - public TableColumnArea areaContainer; - - /** - * The offset, in millipoints, for this column, relative to the start - * of the table, in the column-progression-direction. - */ - public int columnOffset; - - public TableColumnPL(TableColumn parent, PioneerLS layout) { - super(parent, layout); - } - - public void setHeight(int height) { - if (areaContainer != null) { - areaContainer.setProgressionDimension(height); - } - } - - public TableColumn getFO() { - return (TableColumn) this.getFONode(); - } - - public int layout(Area area) throws AreaWException { - TableColumn node = getFO(); - TableArea tableArea = (TableArea) area; - Table table = node.getNearestTable(area); - if (getProgress() == FONodePL.BREAK_AFTER) { - return Status.OK; - } - int columnNumber = table.getTableColumnIndex(node); - if (tableArea.getResolvedColumnWidth(columnNumber) > 0) { - TableColumnArea areaContainer = tableArea.makeTableColumnArea(node); - areaContainer.setProgressionDimension(area.crBPD()); - } - return Status.OK; - } - - public void setColumnOffset(int columnOffset) { - this.columnOffset = columnOffset; - } - -} Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java 2006-06-09 23:51:46 UTC (rev 7491) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/TablePL.java 2006-06-09 23:55:48 UTC (rev 7492) @@ -35,7 +35,6 @@ import org.axsl.foR.fo.Marker; import org.axsl.foR.fo.Table; import org.axsl.foR.fo.TableBody; -import org.axsl.foR.fo.TableColumn; import org.axsl.foR.fo.TableFooter; import org.axsl.foR.fo.TableHeader; @@ -90,7 +89,6 @@ boolean addedHeader = false; boolean addedFooter = false; - layoutColumns(areaContainer); if (node.numberOfColumns() == 0) { layout.getLogger().warn("current implementation of tables " + "requires a table-column for each column, " @@ -249,17 +247,6 @@ return Status.OK; } - private void layoutColumns(Area tableArea) throws AreaWException { - Table node = getTableFO(); - for (int i = 0; i < node.getTableColumns().size(); i++) { - TableColumn c = (TableColumn) node.getTableColumns().get(i); - if (c != null) { - TableColumnPL tcPL = (TableColumnPL) getLayoutProxy(c); - tcPL.layout(tableArea); - } - } - } - // FIXME: this seems odd. public int getTableFooterYPosition(FOContext context, TableFooter tFooter) { TableFooterPL tfPL = (TableFooterPL) getLayoutProxy(tFooter); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |