public class Wtable extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
Wtable |
addColumns(int qty) |
Wtable |
addRows(int qty) |
Wtable |
addRows(int index,
int qty) |
org.dom4j.Element |
getParent(String bookmark,
String tag) |
Wtc |
getTc(int rows,
int cols) |
String |
getText(int rows,
int cols) |
Wtr |
getTr(int index) |
Wtr |
getTr(String bookmark) |
List<Wtr> |
getTrs() |
int |
getTrSize() |
String |
getWidthUnit() |
Wtable |
insert(int index,
int qty) |
void |
insert(int index,
Object data,
String... cols) |
void |
insert(int index,
String html) |
Wtable |
insert(int index,
Wtr template,
int qty) |
void |
insert(int index,
Wtr template,
Object data,
String... cols)
根据模版样式和数据 插入行
|
void |
insert(int index,
Wtr template,
String html)
根据模版样式 插入行
|
void |
insert(Object data,
String... cols) |
void |
insert(String html) |
void |
insert(Wtr template,
Object data,
String... cols)
根据模版样式和数据 插入行
|
void |
insert(Wtr template,
String html) |
Wtable |
merge(int rows,
int cols,
int rowspan,
int colspan) |
void |
reload() |
void |
remove(int index) |
void |
remove(Wtr tr) |
Wtc |
removeBackgroundColor(int rows,
int cols)
清除背景色
|
Wtable |
removeBorder() |
Wtc |
removeBorder(int rows,
int cols)
清除单元格所有边框
|
Wtable |
removeBottomBorder()
清除表格下边框
|
Wtr |
removeBottomBorder(int rows)
删除整行的下边框
|
Wtc |
removeBottomBorder(int rows,
int cols)
清除单元格下边框
|
Wtc |
removeColor(int rows,
int cols)
清除颜色
|
Wtable |
removeInsideHBorder()
清除表格水平边框
|
Wtable |
removeInsideVBorder()
清除表格垂直边框
|
Wtable |
removeLeftBorder()
清除表格左边框
|
Wtable |
removeLeftBorder(int cols)
删除整列的左边框
|
Wtc |
removeLeftBorder(int rows,
int cols)
清除单元格左边框
|
Wtable |
removeRightBorder()
清除表格右边框
|
Wtable |
removeRightBorder(int cols)
删除整列的右边框
|
Wtc |
removeRightBorder(int rows,
int cols)
清除单元格右边框
|
Wtc |
removeStyle(int rows,
int cols)
清除样式
|
Wtable |
removeTcBackgroundColor()
清除所有单元格背景色
|
Wtable |
removeTcBorder()
清除所有单元格边框
|
Wtable |
removeTcColor()
清除所有单元格颜色
|
Wtable |
removeTl2brBorder() |
Wtc |
removeTl2brBorder(int rows,
int cols)
清除单元格左上到右下边框
|
Wtable |
removeTopBorder()
清除表格上边框
|
Wtr |
removeTopBorder(int rows)
删除整行的上边框
|
Wtc |
removeTopBorder(int rows,
int cols)
清除单元格上边框
|
Wtable |
removeTr2blBorder() |
Wtc |
removeTr2blBorder(int rows,
int cols)
清除单元格右上到左下边框
|
Wtc |
replace(int rows,
int cols,
String src,
String tar) |
Wtc |
setAlign(int rows,
int cols,
String align) |
Wtc |
setBackgroundColor(int rows,
int cols,
String color)
背景色
|
Wtc |
setBold(int rows,
int cols) |
Wtc |
setBold(int rows,
int cols,
boolean bold)
粗体
|
Wtc |
setBorder(int rows,
int cols)
设置单元格默认边框
|
Wtc |
setBorder(int rows,
int cols,
int size,
String color,
String style) |
Wtc |
setBottomBorder(int rows,
int cols) |
Wtc |
setBottomBorder(int rows,
int cols,
int size,
String color,
String style) |
Wtc |
setBottomPadding(int rows,
int cols,
double padding) |
Wtc |
setBottomPadding(int rows,
int cols,
int padding) |
Wtc |
setBottomPadding(int rows,
int cols,
String padding) |
Wtc |
setColor(int rows,
int cols,
String color) |
Wtc |
setFont(int rows,
int cols,
String size,
String eastAsia,
String ascii,
String hint) |
Wtc |
setFontFamily(int rows,
int cols,
String font) |
Wtc |
setFontSize(int rows,
int cols,
String size) |
Wtr |
setHeight(int rows,
double height) |
Wtr |
setHeight(int rows,
int height) |
Wtr |
setHeight(int rows,
String height) |
Wtable |
setHtml(int rows,
int cols,
String html) |
Wtc |
setItalic(int rows,
int cols) |
Wtc |
setItalic(int rows,
int cols,
boolean italic)
斜体
|
Wtc |
setLeftBorder(int rows,
int cols) |
Wtc |
setLeftBorder(int rows,
int cols,
int size,
String color,
String style) |
Wtc |
setLeftPadding(int rows,
int cols,
double padding) |
Wtc |
setLeftPadding(int rows,
int cols,
int padding) |
Wtc |
setLeftPadding(int rows,
int cols,
String padding) |
Wtc |
setPadding(int rows,
int cols,
String side,
double padding) |
Wtc |
setPadding(int rows,
int cols,
String side,
int padding) |
Wtc |
setPadding(int rows,
int cols,
String side,
String padding) |
Wtc |
setRightBorder(int rows,
int cols) |
Wtc |
setRightBorder(int rows,
int cols,
int size,
String color,
String style) |
Wtc |
setRightPadding(int rows,
int cols,
double padding) |
Wtc |
setRightPadding(int rows,
int cols,
int padding) |
Wtc |
setRightPadding(int rows,
int cols,
String padding) |
Wtc |
setStrike(int rows,
int cols) |
Wtc |
setStrike(int rows,
int cols,
boolean strike)
删除线
|
Wtable |
setText(int rows,
int cols,
String text) |
Wtable |
setText(int rows,
int cols,
String text,
Map<String,String> styles) |
Wtc |
setTl2brBorder(int rows,
int cols) |
Wtc |
setTl2brBorder(int rows,
int cols,
int size,
String color,
String style) |
Wtc |
setTl2brBorder(int rows,
int cols,
String top,
String bottom) |
Wtc |
setTopBorder(int rows,
int cols) |
Wtc |
setTopBorder(int rows,
int cols,
int size,
String color,
String style) |
Wtc |
setTopPadding(int rows,
int cols,
double padding) |
Wtc |
setTopPadding(int rows,
int cols,
int padding) |
Wtc |
setTopPadding(int rows,
int cols,
String padding) |
Wtc |
setTr2blBorder(int rows,
int cols) |
Wtc |
setTr2blBorder(int rows,
int cols,
int size,
String color,
String style) |
Wtc |
setTr2blBorder(int rows,
int cols,
String top,
String bottom) |
Wtc |
setUnderline(int rows,
int cols) |
Wtc |
setUnderline(int rows,
int cols,
boolean underline)
下划线
|
Wtc |
setVerticalAlign(int rows,
int cols,
String align) |
Wtable |
setWidth(double width) |
Wtable |
setWidth(int width) |
Wtable |
setWidth(int cols,
double width) |
Wtable |
setWidth(int cols,
int width) |
Wtc |
setWidth(int rows,
int cols,
double width) |
Wtc |
setWidth(int rows,
int cols,
int width) |
Wtc |
setWidth(int rows,
int cols,
String width) |
Wtable |
setWidth(int cols,
String width) |
Wtable |
setWidth(String width) |
void |
setWidthUnit(String widthUnit) |
public Wtable(WDocument doc)
public Wtable(WDocument doc, org.dom4j.Element src)
public void reload()
public void insert(String html)
public void insert(Wtr template, Object data, String... cols)
template - 模版行data - 数据可以是一个实体也可以是一个集合cols - 指定从数据中提取的数据的属性或keypublic void insert(int index,
Wtr template,
Object data,
String... cols)
index - 插入位置template - 模版行data - 数据可以是一个实体也可以是一个集合cols - 指定从数据中提取的数据的属性或keypublic Wtable insert(int index, int qty)
public void insert(int index,
String html)
public void insert(int index,
Wtr template,
String html)
index - 插入位置下标template - 模版行html - html片段 片段中应该有多个tr,不需要上级标签tablepublic void remove(int index)
public void remove(Wtr tr)
public String getText(int rows, int cols)
public Wtable addColumns(int qty)
public Wtable addRows(int index, int qty)
public Wtable addRows(int qty)
public int getTrSize()
public Wtable setWidth(int width)
public Wtable setWidth(double width)
public Wtable merge(int rows, int cols, int rowspan, int colspan)
public Wtr getTr(int index)
public Wtc getTc(int rows, int cols)
public Wtable removeBorder()
public Wtable removeTopBorder()
public Wtable removeLeftBorder()
public Wtable removeRightBorder()
public Wtable removeBottomBorder()
public Wtable removeInsideVBorder()
public Wtable removeTl2brBorder()
public Wtable removeTr2blBorder()
public Wtable removeInsideHBorder()
public Wtable removeTcBorder()
public Wtable removeTcColor()
public Wtable removeTcBackgroundColor()
public Wtr removeTopBorder(int rows)
rows - rowspublic Wtr removeBottomBorder(int rows)
rows - rowspublic Wtable removeLeftBorder(int cols)
cols - colspublic Wtable removeRightBorder(int cols)
cols - colspublic Wtc removeLeftBorder(int rows, int cols)
rows - rowscols - colspublic Wtc removeRightBorder(int rows, int cols)
rows - rowscols - colspublic Wtc removeTopBorder(int rows, int cols)
rows - rowscols - colspublic Wtc removeBottomBorder(int rows, int cols)
rows - rowscols - colspublic Wtc removeTl2brBorder(int rows, int cols)
rows - rowscols - colspublic Wtc removeTr2blBorder(int rows, int cols)
rows - rowscols - colspublic Wtc removeBorder(int rows, int cols)
rows - rowscols - colspublic Wtc setBorder(int rows, int cols)
rows - rowscols - colspublic Wtc setLeftBorder(int rows, int cols)
public Wtc setRightBorder(int rows, int cols)
public Wtc setTopBorder(int rows, int cols)
public Wtc setBottomBorder(int rows, int cols)
public Wtc setTl2brBorder(int rows, int cols)
public Wtc setTr2blBorder(int rows, int cols)
public Wtc setBottomBorder(int rows, int cols, int size, String color, String style)
public Wtc setFont(int rows, int cols, String size, String eastAsia, String ascii, String hint)
public Wtc setWidth(int rows, int cols, int width)
public Wtc setWidth(int rows, int cols, double width)
public Wtable setWidth(int cols, int width)
public Wtable setWidth(int cols, double width)
public Wtr setHeight(int rows, int height)
public Wtr setHeight(int rows, double height)
public Wtc setBottomPadding(int rows, int cols, int padding)
public Wtc setBottomPadding(int rows, int cols, double padding)
public Wtc setTopPadding(int rows, int cols, int padding)
public Wtc setTopPadding(int rows, int cols, double padding)
public Wtc setRightPadding(int rows, int cols, int padding)
public Wtc setRightPadding(int rows, int cols, double padding)
public Wtc setLeftPadding(int rows, int cols, int padding)
public Wtc setLeftPadding(int rows, int cols, double padding)
public Wtc setBackgroundColor(int rows, int cols, String color)
rows - rowscols - colscolor - 颜色public Wtc removeStyle(int rows, int cols)
rows - rowscols - colspublic Wtc removeBackgroundColor(int rows, int cols)
rows - rowscols - colspublic Wtc removeColor(int rows, int cols)
rows - rowscols - colspublic Wtc setBold(int rows, int cols, boolean bold)
rows - rowscols - colsbold - 是否public Wtc setBold(int rows, int cols)
public Wtc setUnderline(int rows, int cols, boolean underline)
rows - rowscols - colsunderline - 是否public Wtc setUnderline(int rows, int cols)
public Wtc setStrike(int rows, int cols, boolean strike)
rows - rowscols - colsstrike - 是否public Wtc setStrike(int rows, int cols)
public Wtc setItalic(int rows, int cols, boolean italic)
rows - rowscols - colsitalic - 是否public Wtc setItalic(int rows, int cols)
public String getWidthUnit()
public void setWidthUnit(String widthUnit)
Copyright © 2022. All rights reserved.