Browse Source

trigger event handling for start and end of table, cell, column, and row, primarily for the benefit of the structure handlers (mif/rtf) -- submitted by Peter Herweg, see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23103


git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196917 13f79535-47bb-0310-9956-ffa450edef68
tags/Root_Temp_KnuthStylePageBreaking
William Victor Mote 21 years ago
parent
commit
f5356cde3e

+ 19
- 1
src/java/org/apache/fop/fo/flow/Table.java View File

@@ -53,7 +53,11 @@ package org.apache.fop.fo.flow;
// Java
import java.util.ArrayList;

// XML
import org.xml.sax.Attributes;

// FOP
import org.apache.fop.apps.FOPException;
import org.apache.fop.datatypes.ColorType;
import org.apache.fop.datatypes.LengthRange;
import org.apache.fop.fo.FONode;
@@ -224,5 +228,19 @@ public class Table extends FObj {
fotv.serveTable(this);
}

}
/**
* @see org.apache.fop.fo.FObj#handleAttrs
*/
public void handleAttrs(Attributes attlist) throws FOPException {
super.handleAttrs(attlist);

setupID();

getFOTreeControl().getFOInputHandler().startTable(this);
}

protected void end() {
getFOTreeControl().getFOInputHandler().endTable(this);
}

}

+ 5
- 0
src/java/org/apache/fop/fo/flow/TableCell.java View File

@@ -159,6 +159,8 @@ public class TableCell extends FObj {
public void handleAttrs(Attributes attlist) throws FOPException {
super.handleAttrs(attlist);
doSetup(); // init some basic property values

getFOTreeControl().getFOInputHandler().startCell(this);
}

/**
@@ -386,4 +388,7 @@ public class TableCell extends FObj {
fotv.serveTableCell(this);
}

protected void end() {
getFOTreeControl().getFOInputHandler().endCell(this);
}
}

+ 19
- 0
src/java/org/apache/fop/fo/flow/TableColumn.java View File

@@ -50,7 +50,11 @@
*/
package org.apache.fop.fo.flow;

// XML
import org.xml.sax.Attributes;

// FOP
import org.apache.fop.apps.FOPException;
import org.apache.fop.datatypes.ColorType;
import org.apache.fop.datatypes.Length;
import org.apache.fop.fo.FONode;
@@ -168,5 +172,20 @@ public class TableColumn extends FObj {
fotv.serveTableColumn(this);
}

/**
* Overriden from FObj.
* @param attlist Collection of attributes passed to us from the parser.
* @throws FOPException for FO errors
*/
public void handleAttrs(Attributes attlist) throws FOPException {
super.handleAttrs(attlist);
doSetup(); // init some basic property values

getFOTreeControl().getFOInputHandler().startColumn(this);
}

protected void end() {
getFOTreeControl().getFOInputHandler().endColumn(this);
}
}


+ 19
- 1
src/java/org/apache/fop/fo/flow/TableRow.java View File

@@ -50,7 +50,11 @@
*/
package org.apache.fop.fo.flow;

// XML
import org.xml.sax.Attributes;

// FOP
import org.apache.fop.apps.FOPException;
import org.apache.fop.datatypes.ColorType;
import org.apache.fop.datatypes.KeepValue;
import org.apache.fop.fo.FONode;
@@ -162,5 +166,19 @@ public class TableRow extends FObj {
fotv.serveTableRow(this);
}

}
/**
* @see org.apache.fop.fo.FObj#handleAttrs
*/
public void handleAttrs(Attributes attlist) throws FOPException {
super.handleAttrs(attlist);

setupID();

getFOTreeControl().getFOInputHandler().startRow(this);
}

protected void end() {
getFOTreeControl().getFOInputHandler().endRow(this);
}

}

Loading…
Cancel
Save