public class TableUtils extends Object
| Constructor and Description |
|---|
TableUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
copyTableStylesToRPr(org.docx4j.openpackaging.packages.WordprocessingMLPackage template) |
static void |
createTableWithValues(org.docx4j.openpackaging.parts.WordprocessingML.MainDocumentPart mdp,
int iTableNr,
org.docx4j.wml.Tbl table,
Map<String,String> mValues,
List<Map<String,Object>> lParagraphProperties)
Metoda, która na podstawie mapy tworzy wypełnioną tabelę w szablonie docx.
|
static void |
createTableWithValues(org.docx4j.openpackaging.parts.WordprocessingML.MainDocumentPart mdp,
org.docx4j.wml.Tbl table,
List<String> lValues,
List<Map<String,Object>> lParagraphProperties,
org.docx4j.wml.TrPr rowProperties,
ColumnGraphicInfo columnGraphicInfo,
org.docx4j.openpackaging.packages.WordprocessingMLPackage template,
boolean pdf) |
static String |
fitTextToColumn(String txt,
int colWidth,
String font,
int fontSize,
boolean isBold,
boolean isItalic)
Rozdziela słowa które nie mieszczą sie w kolumnie znakiem nowej lini
|
static org.docx4j.wml.Tc |
getCell(JAXBElement<org.docx4j.wml.Tc> cellElem) |
static org.docx4j.wml.Tc |
getCell(List<Object> currentRowCells,
int j) |
static org.docx4j.wml.Tr |
getRow(List<Object> currentTableRows,
int j) |
static List<org.docx4j.wml.Tbl> |
getTables(List<Object> nodes) |
static void |
initTableMarkups(String templatePath,
Map<String,Object> mappings,
List<Map<String,String>> tablesMaps,
String variablesMarker,
String processId,
org.docx4j.openpackaging.packages.WordprocessingMLPackage template,
org.docx4j.openpackaging.parts.WordprocessingML.MainDocumentPart documentPart,
List<org.docx4j.wml.Tbl> tables,
List<Boolean> tablesFlags,
List<Boolean> headersFlags,
List<ColumnGraphicInfo> tablesGraphicColumnInfo,
boolean pdf) |
static void |
removeMarkupRows(List<org.docx4j.wml.Tbl> tables,
List<Boolean> tablesFlags,
List<Boolean> headersFlags) |
public static String fitTextToColumn(String txt, int colWidth, String font, int fontSize, boolean isBold, boolean isItalic)
txt - tekst który ma zostać wpisany do komórkicolWidth - szerokość kolumnyfont - nazwa czcionkifontSize - rozmiar czcionkiisBold - true jeżeli tekst jest pogrubionyisItalic - true jezeli tekst jest pochylonypublic static org.docx4j.wml.Tc getCell(JAXBElement<org.docx4j.wml.Tc> cellElem)
public static void removeMarkupRows(List<org.docx4j.wml.Tbl> tables, List<Boolean> tablesFlags, List<Boolean> headersFlags)
public static void initTableMarkups(String templatePath, Map<String,Object> mappings, List<Map<String,String>> tablesMaps, String variablesMarker, String processId, org.docx4j.openpackaging.packages.WordprocessingMLPackage template, org.docx4j.openpackaging.parts.WordprocessingML.MainDocumentPart documentPart, List<org.docx4j.wml.Tbl> tables, List<Boolean> tablesFlags, List<Boolean> headersFlags, List<ColumnGraphicInfo> tablesGraphicColumnInfo, boolean pdf) throws Exception
Exceptionpublic static void createTableWithValues(org.docx4j.openpackaging.parts.WordprocessingML.MainDocumentPart mdp,
int iTableNr,
org.docx4j.wml.Tbl table,
Map<String,String> mValues,
List<Map<String,Object>> lParagraphProperties)
mdp - - pobrany z szablonu główny człon dokumentu docxiTableNr - -numer tabeli w danym dokumnecie (gdyby była więcej niż jedna tabela)table - - pobrany element z xmla definiującego dokument docx, opisujący tabelęmValues - - mapa której klucze wskazują kolumnę (tNR_TABELIcNR_KOLUMNY np. t1c1), a w
wartości po średnikach
wartości w zadanej kolumnie, dla kojelnych wierszy (np.
wartosc1;wartosc2;wartosc3;...)org.docx4j.openpackaging.exceptions.Docx4JExceptionJAXBExceptionpublic static void createTableWithValues(org.docx4j.openpackaging.parts.WordprocessingML.MainDocumentPart mdp,
org.docx4j.wml.Tbl table,
List<String> lValues,
List<Map<String,Object>> lParagraphProperties,
org.docx4j.wml.TrPr rowProperties,
ColumnGraphicInfo columnGraphicInfo,
org.docx4j.openpackaging.packages.WordprocessingMLPackage template,
boolean pdf)
public static void copyTableStylesToRPr(org.docx4j.openpackaging.packages.WordprocessingMLPackage template)
Copyright © 2022 Suncode. All rights reserved.