public abstract class AbstractTableWriter extends AbstractSimpleWriter
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractTableWriter.TableModelTransformState |
Writer.TransformState
Modifier and Type | Field and Description |
---|---|
protected static int |
NODE_TABLE |
protected static int |
NODE_TABLE_BODY |
protected static int |
NODE_TABLE_BODY_CELL |
protected static int |
NODE_TABLE_BODY_ROW |
protected static int |
NODE_TABLE_COLUMN |
protected static int |
NODE_TABLE_COLUMN_GROUP |
protected static int |
NODE_TABLE_HEADER |
protected static int |
NODE_TABLE_HEADER_CELL |
protected static int |
NODE_TABLE_HEADER_ROW |
protected static Map<String,Integer> |
PATTERN_PERCENTAGES |
static String |
WRITER_ID |
writerId
Modifier | Constructor and Description |
---|---|
protected |
AbstractTableWriter() |
Modifier and Type | Method and Description |
---|---|
protected void |
appendNoneBordersAndShading(List<Property> tableProperties) |
protected abstract void |
applyAttributes(AbstractWmlConversionContext context,
List<Property> properties,
Element element) |
protected void |
applyColumnCustomAttributes(AbstractWmlConversionContext context,
AbstractTableWriterModel table,
Writer.TransformState transformState,
Element column,
int columnIndex,
int columnWidth) |
protected void |
applyColumnGroupCustomAttributes(AbstractWmlConversionContext context,
AbstractTableWriterModel table,
Writer.TransformState transformState,
Element columnGroup) |
protected void |
applyTableCellCustomAttributes(AbstractWmlConversionContext context,
AbstractTableWriterModel table,
Writer.TransformState transformState,
TableModelCell tableCell,
Element cellNode,
boolean isHeader,
boolean isDummyCell) |
protected void |
applyTableCustomAttributes(AbstractWmlConversionContext context,
AbstractTableWriterModel table,
Writer.TransformState transformState,
Element tableRoot) |
protected void |
applyTableRowContainerCustomAttributes(AbstractWmlConversionContext context,
AbstractTableWriterModel table,
Writer.TransformState transformState,
Element rowContainer,
boolean isHeader) |
protected void |
applyTableRowCustomAttributes(AbstractWmlConversionContext context,
AbstractTableWriterModel table,
Writer.TransformState transformState,
Element row,
int rowIndex,
boolean isHeader) |
protected void |
applyTableStyles(AbstractWmlConversionContext context,
AbstractTableWriterModel table,
Writer.TransformState transformState,
Element tableRoot) |
protected String |
calcHexColor(int value) |
protected void |
createCellProperties(List<Property> properties,
CTTblPrBase tblPr) |
protected void |
createCellProperties(List<Property> properties,
CTTblPrEx tblPrEx) |
protected void |
createCellProperties(List<Property> properties,
TcPr tcPr) |
protected void |
createCellProperties(List<Property> properties,
TrPr trPr) |
protected void |
createColumns(AbstractWmlConversionContext context,
AbstractTableWriterModel table,
Writer.TransformState transformState,
Document doc,
Element tableRoot) |
protected Element |
createNode(Document doc,
Element parent,
int nodeType) |
protected abstract Element |
createNode(Document doc,
int nodeType) |
protected void |
createRowProperties(List<Property> properties,
TrPr trPr,
boolean includeDefaultHeight) |
protected Property |
createShading(int fgColor,
int bgColor,
int pctFg) |
Writer.TransformState |
createTransformState()
Create a new instance of the TransformState it uses.
It may return null , then the passed value in toNode will be null . |
protected int |
extractColor(String value,
int defaultColor) |
protected int |
extractPattern(String pattern) |
protected JAXBElement<?> |
getElement(List<JAXBElement<?>> cnfStyleOrDivIdOrGridBefore,
String localName) |
protected Element |
interposeBlockContainer(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 void |
processAttributes(AbstractWmlConversionContext context,
List<Property> properties,
Element element) |
protected void |
resetProperties(List<Property> properties,
int size) |
protected Node |
toNode(AbstractWmlConversionContext context,
AbstractTableWriterModel table,
Writer.TransformState transformState,
Document doc) |
Node |
toNode(AbstractWmlConversionContext context,
Object unmarshalledNode,
Node content,
Writer.TransformState transformState,
Document doc)
Generate the corresponding document fragment
|
getID
public static final String WRITER_ID
protected static final int NODE_TABLE
protected static final int NODE_TABLE_COLUMN_GROUP
protected static final int NODE_TABLE_COLUMN
protected static final int NODE_TABLE_HEADER
protected static final int NODE_TABLE_HEADER_ROW
protected static final int NODE_TABLE_HEADER_CELL
protected static final int NODE_TABLE_BODY
protected static final int NODE_TABLE_BODY_ROW
protected static final int NODE_TABLE_BODY_CELL
public Writer.TransformState createTransformState()
Writer
null
, then the passed value in toNode will be null
.createTransformState
in interface Writer
createTransformState
in class AbstractSimpleWriter
public Node toNode(AbstractWmlConversionContext context, Object unmarshalledNode, Node content, Writer.TransformState transformState, Document doc) throws TransformerException
Writer
TransformerException
protected Node toNode(AbstractWmlConversionContext context, AbstractTableWriterModel table, Writer.TransformState transformState, Document doc) throws TransformerException
TransformerException
protected Element interposeBlockContainer(Document doc, Element cellNode, TcPr tcPr)
cellNode
- protected void createColumns(AbstractWmlConversionContext context, AbstractTableWriterModel table, Writer.TransformState transformState, Document doc, Element tableRoot) throws DOMException
DOMException
protected void applyTableStyles(AbstractWmlConversionContext context, AbstractTableWriterModel table, Writer.TransformState transformState, Element tableRoot)
protected void appendNoneBordersAndShading(List<Property> tableProperties)
protected void createRowProperties(List<Property> properties, TrPr trPr, boolean includeDefaultHeight)
protected void createCellProperties(List<Property> properties, CTTblPrBase tblPr)
protected void createCellProperties(List<Property> properties, CTTblPrEx tblPrEx)
protected JAXBElement<?> getElement(List<JAXBElement<?>> cnfStyleOrDivIdOrGridBefore, String localName)
protected void processAttributes(AbstractWmlConversionContext context, List<Property> properties, Element element)
protected int extractPattern(String pattern)
protected int extractColor(String value, int defaultColor)
protected Property createShading(int fgColor, int bgColor, int pctFg)
protected String calcHexColor(int value)
protected abstract void applyAttributes(AbstractWmlConversionContext context, List<Property> properties, Element element)
protected void applyTableCustomAttributes(AbstractWmlConversionContext context, AbstractTableWriterModel table, Writer.TransformState transformState, Element tableRoot)
protected void applyColumnGroupCustomAttributes(AbstractWmlConversionContext context, AbstractTableWriterModel table, Writer.TransformState transformState, Element columnGroup)
protected void applyColumnCustomAttributes(AbstractWmlConversionContext context, AbstractTableWriterModel table, Writer.TransformState transformState, Element column, int columnIndex, int columnWidth)
protected void applyTableRowContainerCustomAttributes(AbstractWmlConversionContext context, AbstractTableWriterModel table, Writer.TransformState transformState, Element rowContainer, boolean isHeader)
protected void applyTableRowCustomAttributes(AbstractWmlConversionContext context, AbstractTableWriterModel table, Writer.TransformState transformState, Element row, int rowIndex, boolean isHeader)
protected void applyTableCellCustomAttributes(AbstractWmlConversionContext context, AbstractTableWriterModel table, Writer.TransformState transformState, TableModelCell tableCell, Element cellNode, boolean isHeader, boolean isDummyCell)
Copyright © 2007-2018. All Rights Reserved.