diff options
author | Glen Mazza <gmazza@apache.org> | 2004-08-20 09:38:21 +0000 |
---|---|---|
committer | Glen Mazza <gmazza@apache.org> | 2004-08-20 09:38:21 +0000 |
commit | 9729fe17d699d1d3816054dfb722369aba187d54 (patch) | |
tree | c03116d9337ae1570a988f26e64b0269647bb2be /src/java/org/apache/fop/fo/flow/TableColumn.java | |
parent | 74ca9b8223ae7f3168ffc75f3b85c1b692af09b4 (diff) | |
download | xmlgraphics-fop-9729fe17d699d1d3816054dfb722369aba187d54.tar.gz xmlgraphics-fop-9729fe17d699d1d3816054dfb722369aba187d54.zip |
1.) validateChildNode() added for fo:marker.
2.) new getPropString() convenience method added to FObj, will reduce
need for many individual methods on each FO.
3.) fo:float disconnected from ToBeImplementedElement in favor of a
class-specific warning.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197883 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/flow/TableColumn.java')
-rw-r--r-- | src/java/org/apache/fop/fo/flow/TableColumn.java | 42 |
1 files changed, 16 insertions, 26 deletions
diff --git a/src/java/org/apache/fop/fo/flow/TableColumn.java b/src/java/org/apache/fop/fo/flow/TableColumn.java index 31cc896c7..7cf6e813c 100644 --- a/src/java/org/apache/fop/fo/flow/TableColumn.java +++ b/src/java/org/apache/fop/fo/flow/TableColumn.java @@ -36,14 +36,11 @@ import org.apache.fop.fo.FObj; public class TableColumn extends FObj { private ColorType backgroundColor; - private Length columnWidth; private int columnOffset; private int numColumnsRepeated; private int iColumnNumber; - private boolean initialized = false; - /** * @param parent FONode that is the parent of this object */ @@ -61,15 +58,29 @@ public class TableColumn extends FObj { } /** - * @see org.apache.fop.fo.FObj#addProperties + * @see org.apache.fop.fo.FObj#addProperties(Attributes) */ protected void addProperties(Attributes attlist) throws SAXParseException { super.addProperties(attlist); - initialize(); // init some basic property values + + iColumnNumber = propertyList.get(PR_COLUMN_NUMBER).getNumber().intValue(); + numColumnsRepeated = + propertyList.get(PR_NUMBER_COLUMNS_REPEATED).getNumber().intValue(); + this.backgroundColor = + this.propertyList.get(PR_BACKGROUND_COLOR).getColorType(); + columnWidth = this.propertyList.get(PR_COLUMN_WIDTH).getLength(); + getFOInputHandler().startColumn(this); } /** + * @see org.apache.fop.fo.FONode#endOfNode + */ + protected void endOfNode() throws SAXParseException { + getFOInputHandler().endColumn(this); + } + + /** * @return Length object containing column width */ public Length getColumnWidth() { @@ -90,27 +101,6 @@ public class TableColumn extends FObj { return numColumnsRepeated; } - /** - * @todo convert to addProperties() - */ - public void initialize() { - iColumnNumber = propertyList.get(PR_COLUMN_NUMBER).getNumber().intValue(); - - numColumnsRepeated = - propertyList.get(PR_NUMBER_COLUMNS_REPEATED).getNumber().intValue(); - - this.backgroundColor = - this.propertyList.get(PR_BACKGROUND_COLOR).getColorType(); - - columnWidth = this.propertyList.get(PR_COLUMN_WIDTH).getLength(); - - initialized = true; - } - - protected void endOfNode() throws SAXParseException { - getFOInputHandler().endColumn(this); - } - public String getName() { return "fo:table-column"; } |