Class AbstractTableWriter
java.lang.Object
org.docx4j.convert.out.common.writer.AbstractSimpleWriter
org.docx4j.convert.out.common.writer.AbstractTableWriter
- All Implemented Interfaces:
Writer
- Direct Known Subclasses:
TableWriter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classNested classes/interfaces inherited from interface org.docx4j.convert.out.common.Writer
Writer.TransformState -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intstatic final StringFields inherited from class org.docx4j.convert.out.common.writer.AbstractSimpleWriter
writerId -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendNoneBordersAndShading(List<Property> tableProperties) protected abstract voidapplyAttributes(AbstractWmlConversionContext context, List<Property> properties, Element element) protected voidapplyColumnCustomAttributes(AbstractWmlConversionContext context, AbstractTableWriterModel table, Writer.TransformState transformState, Element column, int columnIndex, int columnWidth) protected voidapplyColumnGroupCustomAttributes(AbstractWmlConversionContext context, AbstractTableWriterModel table, Writer.TransformState transformState, Element columnGroup) protected voidapplyTableCellCustomAttributes(AbstractWmlConversionContext context, AbstractTableWriterModel table, Writer.TransformState transformState, TableModelCell tableCell, Element cellNode, boolean isHeader, boolean isDummyCell) protected voidapplyTableCustomAttributes(AbstractWmlConversionContext context, AbstractTableWriterModel table, Writer.TransformState transformState, Element tableRoot) protected voidapplyTableRowContainerCustomAttributes(AbstractWmlConversionContext context, AbstractTableWriterModel table, Writer.TransformState transformState, Element rowContainer, boolean isHeader) protected voidapplyTableRowCustomAttributes(AbstractWmlConversionContext context, AbstractTableWriterModel table, Writer.TransformState transformState, Element row, int rowIndex, boolean isHeader) protected voidapplyTableStyles(AbstractWmlConversionContext context, AbstractTableWriterModel table, Writer.TransformState transformState, Element tableRoot) protected StringcalcHexColor(int value) protected voidcreateCellProperties(List<Property> properties, CTTblPrBase tblPr) protected voidcreateCellProperties(List<Property> properties, CTTblPrEx tblPrEx) protected voidcreateCellProperties(List<Property> properties, TcPr tcPr) protected voidcreateCellProperties(List<Property> properties, TrPr trPr) protected voidcreateColumns(AbstractWmlConversionContext context, AbstractTableWriterModel table, Writer.TransformState transformState, Document doc, Element tableRoot) protected abstract ElementcreateNode(Document doc, int nodeType) protected ElementcreateNode(Document doc, Element parent, int nodeType) protected voidcreateRowProperties(List<Property> properties, TrPr trPr, boolean includeDefaultHeight) protected PropertycreateShading(int fgColor, int bgColor, int pctFg) Create a new instance of the TransformState it uses.
It may returnnull, then the passed value in toNode will benull.protected intextractColor(String value, int defaultColor) protected intextractPattern(String pattern) protected jakarta.xml.bind.JAXBElement<?>getElement(List<jakarta.xml.bind.JAXBElement<?>> cnfStyleOrDivIdOrGridBefore, String localName) protected ElementinterposeBlockContainer(Document doc, Element cellNode, TcPr tcPr) In the FO case, if we need to rotate the text, we do that by inserting a block-container.protected voidprocessAttributes(AbstractWmlConversionContext context, List<Property> properties, Element element) protected voidresetProperties(List<Property> properties, int size) toNode(AbstractWmlConversionContext context, Object unmarshalledNode, Node content, Writer.TransformState transformState, Document doc) Generate the corresponding document fragmentprotected NodetoNode(AbstractWmlConversionContext context, AbstractTableWriterModel table, Writer.TransformState transformState, Document doc) Methods inherited from class org.docx4j.convert.out.common.writer.AbstractSimpleWriter
getID
-
Field Details
-
WRITER_ID
- See Also:
-
NODE_TABLE
protected static final int NODE_TABLE- See Also:
-
NODE_TABLE_COLUMN_GROUP
protected static final int NODE_TABLE_COLUMN_GROUP- See Also:
-
NODE_TABLE_COLUMN
protected static final int NODE_TABLE_COLUMN- See Also:
-
NODE_TABLE_HEADER
protected static final int NODE_TABLE_HEADER- See Also:
-
NODE_TABLE_HEADER_ROW
protected static final int NODE_TABLE_HEADER_ROW- See Also:
-
NODE_TABLE_HEADER_CELL
protected static final int NODE_TABLE_HEADER_CELL- See Also:
-
NODE_TABLE_BODY
protected static final int NODE_TABLE_BODY- See Also:
-
NODE_TABLE_BODY_ROW
protected static final int NODE_TABLE_BODY_ROW- See Also:
-
NODE_TABLE_BODY_CELL
protected static final int NODE_TABLE_BODY_CELL- See Also:
-
PATTERN_PERCENTAGES
-
-
Constructor Details
-
AbstractTableWriter
protected AbstractTableWriter()
-
-
Method Details
-
createTransformState
Description copied from interface:WriterCreate a new instance of the TransformState it uses.
It may returnnull, then the passed value in toNode will benull.- Specified by:
createTransformStatein interfaceWriter- Overrides:
createTransformStatein classAbstractSimpleWriter- Returns:
-
toNode
public Node toNode(AbstractWmlConversionContext context, Object unmarshalledNode, Node content, Writer.TransformState transformState, Document doc) throws TransformerException Description copied from interface:WriterGenerate the corresponding document fragment- Returns:
- Throws:
TransformerException
-
toNode
protected Node toNode(AbstractWmlConversionContext context, AbstractTableWriterModel table, Writer.TransformState transformState, Document doc) throws TransformerException - Throws:
TransformerException
-
interposeBlockContainer
In the FO case, if we need to rotate the text, we do that by inserting a block-container.- Parameters:
cellNode-- Returns:
-
createNode
-
createColumns
protected void createColumns(AbstractWmlConversionContext context, AbstractTableWriterModel table, Writer.TransformState transformState, Document doc, Element tableRoot) throws DOMException - Throws:
DOMException
-
applyTableStyles
protected void applyTableStyles(AbstractWmlConversionContext context, AbstractTableWriterModel table, Writer.TransformState transformState, Element tableRoot) -
appendNoneBordersAndShading
-
createRowProperties
-
createCellProperties
-
createCellProperties
-
createCellProperties
-
createCellProperties
-
getElement
-
processAttributes
protected void processAttributes(AbstractWmlConversionContext context, List<Property> properties, Element element) -
extractPattern
-
extractColor
-
createShading
-
calcHexColor
-
resetProperties
-
createNode
-
applyAttributes
protected abstract void applyAttributes(AbstractWmlConversionContext context, List<Property> properties, Element element) -
applyTableCustomAttributes
protected void applyTableCustomAttributes(AbstractWmlConversionContext context, AbstractTableWriterModel table, Writer.TransformState transformState, Element tableRoot) -
applyColumnGroupCustomAttributes
protected void applyColumnGroupCustomAttributes(AbstractWmlConversionContext context, AbstractTableWriterModel table, Writer.TransformState transformState, Element columnGroup) -
applyColumnCustomAttributes
protected void applyColumnCustomAttributes(AbstractWmlConversionContext context, AbstractTableWriterModel table, Writer.TransformState transformState, Element column, int columnIndex, int columnWidth) -
applyTableRowContainerCustomAttributes
protected void applyTableRowContainerCustomAttributes(AbstractWmlConversionContext context, AbstractTableWriterModel table, Writer.TransformState transformState, Element rowContainer, boolean isHeader) -
applyTableRowCustomAttributes
protected void applyTableRowCustomAttributes(AbstractWmlConversionContext context, AbstractTableWriterModel table, Writer.TransformState transformState, Element row, int rowIndex, boolean isHeader) -
applyTableCellCustomAttributes
protected void applyTableCellCustomAttributes(AbstractWmlConversionContext context, AbstractTableWriterModel table, Writer.TransformState transformState, TableModelCell tableCell, Element cellNode, boolean isHeader, boolean isDummyCell)
-