类 Table
java.lang.Object
org.anyline.entity.html.Table
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明addColumns(int qty) 追加列, 每一行追加, 追加的列将复制前一列的样式(背景色、字体等)addRows(int qty) addRows(int index, int qty) 添加行build()build(boolean box) 创建htmlgetClazz()intorg.dom4j.ElementgetSrc()getTd(int row, int col) getText(int row, int col) 单元格文本getTr(int index) getTrs()insertColumns(int col, int qty) 插入列 追加的列将复制前一列的样式(背景色、字体等) 如果col=0则将制后一列的样式(背景色、字体等)insertRows(int index, int qty) 追加行, 追加的行将复制上一行的样式(背景色、字体等)insertRows(Tr template, int index, int qty) offset()removeBackgroundColor(int rows, int cols) 清除背景色removeBorder(int rows, int cols) removeBorder(String side, int rows, int cols) removeBottomBorder(int rows, int cols) removeColor(int rows, int cols) 清除颜色removeLeftBorder(int rows, int cols) removeRightBorder(int rows, int cols) removeStyle(int rows, int cols) 清除样式removeTl2brBorder(int rows, int cols) removeTopBorder(int rows, int cols) removeTr2blBorder(int rows, int cols) 设置文本水平对齐方式setBackgroundColor(int rows, int cols, String color) 背景色setBold(int rows, int cols) setBold(int rows, int cols, boolean bold) 粗体setBorder(int rows, int cols) setBottomBorder(int rows, int cols) setBottomBorder(int rows, int cols, double width, String color, String style) setBottomBorder(int rows, int cols, int width, String color, String style) setBottomBorder(int rows, int cols, String width, String color, String style) setBottomPadding(int rows, int cols, double padding) setBottomPadding(int rows, int cols, int padding) setBottomPadding(int rows, int cols, String padding) voidsetColspan(int rows, int cols, int colspan) setDelete(int rows, int cols) setDelete(int rows, int cols, boolean strike) setFontFamily(int rows, int cols, String font) setFontSize(int rows, int cols, String weight) setFontWeight(int rows, int cols, String weight) voidvoidsetItalic(int rows, int cols) setItalic(int rows, int cols, boolean italic) 斜体setLeftBorder(int rows, int cols) setLeftBorder(int rows, int cols, double width, String color, String style) setLeftBorder(int rows, int cols, int width, String color, String style) setLeftBorder(int rows, int cols, String width, String color, String style) setLeftPadding(int rows, int cols, double padding) setLeftPadding(int rows, int cols, int padding) setLeftPadding(int rows, int cols, String padding) setLineHeight(int rows, int cols, double height) setLineHeight(int rows, int cols, int height) setLineHeight(int rows, int cols, String height) 设置行高setMergeCol(int start, int qty) 设置需要合并的列(根据内容)setMergeRow(Integer... cols) 设置需要合并行的列setMergeRow(String... cols) 设置需要合并行的列下标setPadding(int rows, int cols, double padding) setPadding(int rows, int cols, int padding) setPadding(int rows, int cols, String padding) setPadding(int rows, int cols, String side, double padding) setPadding(int rows, int cols, String side, int padding) setPadding(int rows, int cols, String side, String padding) setRightBorder(int rows, int cols) setRightBorder(int rows, int cols, double width, String color, String style) setRightBorder(int rows, int cols, int width, String color, String style) setRightBorder(int rows, int cols, String width, String color, String style) setRightPadding(int rows, int cols, double padding) setRightPadding(int rows, int cols, int padding) setRightPadding(int rows, int cols, String padding) setRowspan(int rows, int cols, int rowspan) voidsetSrc(org.dom4j.Element src) setStrike(int rows, int cols) setStrike(int rows, int cols, boolean strike) 删除线voidsetTl2brBorder(int rows, int cols) setTl2brBorder(int rows, int cols, double width, String color, String style) setTl2brBorder(int rows, int cols, int width, String color, String style) setTl2brBorder(int rows, int cols, String top, String bottom) 设置左上至右下边框setTl2brBorder(int rows, int cols, String width, String color, String style) setTopBorder(int rows, int cols) setTopBorder(int rows, int cols, double width, String color, String style) setTopBorder(int rows, int cols, int width, String color, String style) setTopBorder(int rows, int cols, String width, String color, String style) setTopPadding(int rows, int cols, double padding) setTopPadding(int rows, int cols, int padding) setTopPadding(int rows, int cols, String padding) setTr2blBorder(int rows, int cols) setTr2blBorder(int rows, int cols, double width, String color, String style) setTr2blBorder(int rows, int cols, int width, String color, String style) setTr2blBorder(int rows, int cols, String top, String bottom) 设置左上至右下边框setTr2blBorder(int rows, int cols, String width, String color, String style) voidsetUnderline(int rows, int cols) setUnderline(int rows, int cols, boolean underline) 下划线setVerticalAlign(int rows, int cols, String align) 设置文本垂直对齐方式voidsetWidthUnit(String widthUnit)
-
构造器详细资料
-
Table
public Table() -
Table
public Table(int rows, int cols) 构造表格- 参数:
rows- 行数量cols- 列数量
-
-
方法详细资料
-
getTd
-
getTrs
-
setTrs
-
getStyles
-
setStyles
-
getTr
-
setTd
-
setWidth
-
getWidthUnit
-
setWidthUnit
-
getSrc
public org.dom4j.Element getSrc() -
setSrc
public void setSrc(org.dom4j.Element src) -
addTr
添加行- 参数:
tr- tr- 返回:
- table table
-
addColumns
追加列, 每一行追加, 追加的列将复制前一列的样式(背景色、字体等)- 参数:
qty- 追加数量- 返回:
- table table
-
insertColumns
插入列 追加的列将复制前一列的样式(背景色、字体等) 如果col=0则将制后一列的样式(背景色、字体等)- 参数:
col- 插入位置 -1:表示追加以最后一行qty- 数量- 返回:
- table table
-
insertRows
追加行, 追加的行将复制上一行的样式(背景色、字体等)- 参数:
index- 位置qty- 追加数量- 返回:
- table table
-
insertRows
-
addRows
-
addRows
-
build
创建html- 参数:
box- 是否需要table标签- 返回:
- html
-
build
-
offset
-
getMaxColSize
public int getMaxColSize() -
setMergeRow
设置需要合并行的列下标- 参数:
cols- 依据列1, 2, 3(1, 2) 第1, 2, 3列值相同时合并行, 第3列合并的前提是第1, 2列已合并- 返回:
- table table
-
setMergeRow
设置需要合并行的列- 参数:
cols- cols- 返回:
- table table
-
setMergeCol
设置需要合并的列(根据内容)- 参数:
start- 开始qty- 右侧合并范围- 返回:
- table table
-
getText
单元格文本- 参数:
row- rowcol- col- 返回:
- String
-
setText
-
getClazz
-
setClazz
-
getHeader
-
setHeader
-
removeLeftBorder
-
removeRightBorder
-
removeTopBorder
-
removeBottomBorder
-
removeTl2brBorder
-
removeTr2blBorder
-
removeBorder
-
removeBorder
-
setBorder
-
setBorder
-
setLeftBorder
-
setRightBorder
-
setTopBorder
-
setBottomBorder
-
setTl2brBorder
-
setTl2brBorder
设置左上至右下边框- 参数:
rows- rowscols- colstop- 右上文本bottom- 左下文本- 返回:
- td
-
setTr2blBorder
-
setTr2blBorder
设置左上至右下边框- 参数:
rows- rowscols- colstop- 左上文本bottom- 右下文本- 返回:
- td
-
setLeftBorder
-
setLeftBorder
-
setLeftBorder
-
setRightBorder
-
setRightBorder
-
setRightBorder
-
setTopBorder
-
setTopBorder
-
setTopBorder
-
setBottomBorder
-
setBottomBorder
-
setBottomBorder
-
setTl2brBorder
-
setTl2brBorder
-
setTl2brBorder
-
setTr2blBorder
-
setTr2blBorder
-
setTr2blBorder
-
setBorder
-
setBorder
-
setBorder
-
setColor
-
setFont
-
setFontSize
-
setFontWeight
-
setFontFamily
-
setAlign
设置文本水平对齐方式- 参数:
rows- rowscols- colsalign- left center right- 返回:
- Td
-
setVerticalAlign
设置文本垂直对齐方式- 参数:
rows- rowscols- colsalign- top middle|center bottom- 返回:
- td
-
setBackgroundColor
背景色- 参数:
rows- rowscols- colscolor- 颜色- 返回:
- Td
-
removeStyle
清除样式- 参数:
rows- rowscols- cols- 返回:
- td
-
removeBackgroundColor
清除背景色- 参数:
rows- rowscols- cols- 返回:
- td
-
removeColor
清除颜色- 参数:
rows- rowscols- cols- 返回:
- Td
-
setBold
粗体- 参数:
rows- rowscols- colsbold- 是否- 返回:
- Td
-
setBold
-
setUnderline
下划线- 参数:
rows- rowscols- colsunderline- 是否- 返回:
- Td
-
setUnderline
-
setStrike
删除线- 参数:
rows- rowscols- colsstrike- 是否- 返回:
- Td
-
setStrike
-
setDelete
-
setDelete
-
setItalic
斜体- 参数:
rows- rowscols- colsitalic- 是否- 返回:
- Td
-
setItalic
-
setLineHeight
设置行高- 参数:
rows- rowscols- colsheight- pt/px/cm- 返回:
- Td
-
setLineHeight
-
setLineHeight
-
setColspan
-
setRowspan
-
setPadding
-
setPadding
-
setPadding
-
setBottomPadding
-
setBottomPadding
-
setBottomPadding
-
setTopPadding
-
setTopPadding
-
setTopPadding
-
setRightPadding
-
setRightPadding
-
setRightPadding
-
setLeftPadding
-
setLeftPadding
-
setLeftPadding
-
setPadding
-
setPadding
-
setPadding
-