org.apache.poi.xwpf.converter.core.utils
Class XWPFTableUtil

java.lang.Object
  extended by org.apache.poi.xwpf.converter.core.utils.XWPFTableUtil

public class XWPFTableUtil
extends Object


Field Summary
static int APPLY_FIRST_COLUMN_CONDITIONNAL_FORMATTING
           
static int APPLY_FIRST_ROW_CONDITIONNAL_FORMATTING
           
static int APPLY_LAST_COLUMN_CONDITIONNAL_FORMATTING
           
static int APPLY_LAST_ROW_CONDITIONNAL_FORMATTING
           
static int DEFAULT_TBLLOOK
           
static int DO_NOT_APPLY_COLUMN_BANDING_CONDITIONNAL_FORMATTING
           
static int DO_NOT_APPLY_ROW_BANDING_CONDITIONNAL_FORMATTING
           
 
Constructor Summary
XWPFTableUtil()
           
 
Method Summary
static boolean canApplyFirstCol(int tblLookVal)
           
static boolean canApplyFirstRow(int tblLookVal)
           
static boolean canApplyLastCol(int tblLookVal)
           
static boolean canApplyLastRow(int tblLookVal)
           
static float[] computeColWidths(org.apache.poi.xwpf.usermodel.XWPFTable table)
          Compute column widths of the XWPF table.
static Color getBorderColor(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBorder border)
           
static org.apache.poi.xwpf.usermodel.XWPFTableRow getFirstRow(org.apache.poi.xwpf.usermodel.XWPFTable table)
           
static org.openxmlformats.schemas.wordprocessingml.x2006.main.CTDecimalNumber getGridSpan(org.apache.poi.xwpf.usermodel.XWPFTableCell cell)
           
static int getNumberOfColumns(org.apache.poi.xwpf.usermodel.XWPFTableRow row)
          Returns number of column if the XWPF table by using the declared cell (which can declare gridSpan) from the first row.
static TableCellBorder getTableCellBorder(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBorder border, boolean fromTableCell)
           
static TableWidth getTableWidth(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth tblWidth)
           
static TableWidth getTableWidth(org.apache.poi.xwpf.usermodel.XWPFTable table)
          Returns table width of teh XWPF table.
static TableWidth getTableWidth(org.apache.poi.xwpf.usermodel.XWPFTableCell cell)
           
static org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblBorders getTblBorders(org.apache.poi.xwpf.usermodel.XWPFTable table)
           
static org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblCellMar getTblCellMar(org.apache.poi.xwpf.usermodel.XWPFTable table)
           
static org.openxmlformats.schemas.wordprocessingml.x2006.main.CTShortHexNumber getTblLook(org.apache.poi.xwpf.usermodel.XWPFTable table)
           
static int getTblLookVal(org.apache.poi.xwpf.usermodel.XWPFTable table)
           
static org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblPr getTblPr(org.apache.poi.xwpf.usermodel.XWPFTable table)
           
static Float getTblWidthW(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth tblWidth)
          Returns the float value of
static org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth getWidth(org.apache.poi.xwpf.usermodel.XWPFTableCell cell)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TBLLOOK

public static final int DEFAULT_TBLLOOK
See Also:
Constant Field Values

APPLY_FIRST_ROW_CONDITIONNAL_FORMATTING

public static final int APPLY_FIRST_ROW_CONDITIONNAL_FORMATTING
See Also:
Constant Field Values

APPLY_LAST_ROW_CONDITIONNAL_FORMATTING

public static final int APPLY_LAST_ROW_CONDITIONNAL_FORMATTING
See Also:
Constant Field Values

APPLY_FIRST_COLUMN_CONDITIONNAL_FORMATTING

public static final int APPLY_FIRST_COLUMN_CONDITIONNAL_FORMATTING
See Also:
Constant Field Values

APPLY_LAST_COLUMN_CONDITIONNAL_FORMATTING

public static final int APPLY_LAST_COLUMN_CONDITIONNAL_FORMATTING
See Also:
Constant Field Values

DO_NOT_APPLY_ROW_BANDING_CONDITIONNAL_FORMATTING

public static final int DO_NOT_APPLY_ROW_BANDING_CONDITIONNAL_FORMATTING
See Also:
Constant Field Values

DO_NOT_APPLY_COLUMN_BANDING_CONDITIONNAL_FORMATTING

public static final int DO_NOT_APPLY_COLUMN_BANDING_CONDITIONNAL_FORMATTING
See Also:
Constant Field Values
Constructor Detail

XWPFTableUtil

public XWPFTableUtil()
Method Detail

computeColWidths

public static float[] computeColWidths(org.apache.poi.xwpf.usermodel.XWPFTable table)
Compute column widths of the XWPF table.

Parameters:
table -
Returns:

getNumberOfColumns

public static int getNumberOfColumns(org.apache.poi.xwpf.usermodel.XWPFTableRow row)
Returns number of column if the XWPF table by using the declared cell (which can declare gridSpan) from the first row.

Parameters:
table -
Returns:

getFirstRow

public static org.apache.poi.xwpf.usermodel.XWPFTableRow getFirstRow(org.apache.poi.xwpf.usermodel.XWPFTable table)

getGridSpan

public static org.openxmlformats.schemas.wordprocessingml.x2006.main.CTDecimalNumber getGridSpan(org.apache.poi.xwpf.usermodel.XWPFTableCell cell)

getWidth

public static org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth getWidth(org.apache.poi.xwpf.usermodel.XWPFTableCell cell)

getTableWidth

public static TableWidth getTableWidth(org.apache.poi.xwpf.usermodel.XWPFTable table)
Returns table width of teh XWPF table.

Parameters:
table -
Returns:

getTableWidth

public static TableWidth getTableWidth(org.apache.poi.xwpf.usermodel.XWPFTableCell cell)

getTableWidth

public static TableWidth getTableWidth(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth tblWidth)

getTblWidthW

public static Float getTblWidthW(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth tblWidth)
Returns the float value of

Parameters:
tblWidth -
Returns:

getTblPr

public static org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblPr getTblPr(org.apache.poi.xwpf.usermodel.XWPFTable table)

getTblBorders

public static org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblBorders getTblBorders(org.apache.poi.xwpf.usermodel.XWPFTable table)

getTblCellMar

public static org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblCellMar getTblCellMar(org.apache.poi.xwpf.usermodel.XWPFTable table)

getTableCellBorder

public static TableCellBorder getTableCellBorder(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBorder border,
                                                 boolean fromTableCell)

getBorderColor

public static Color getBorderColor(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBorder border)

getTblLook

public static org.openxmlformats.schemas.wordprocessingml.x2006.main.CTShortHexNumber getTblLook(org.apache.poi.xwpf.usermodel.XWPFTable table)

getTblLookVal

public static int getTblLookVal(org.apache.poi.xwpf.usermodel.XWPFTable table)

canApplyFirstRow

public static boolean canApplyFirstRow(int tblLookVal)

canApplyLastRow

public static boolean canApplyLastRow(int tblLookVal)

canApplyFirstCol

public static boolean canApplyFirstCol(int tblLookVal)

canApplyLastCol

public static boolean canApplyLastCol(int tblLookVal)


Copyright © 2013. All rights reserved.