public class Table extends AbstractComponent
Copyright (c) 2020 xsx All Rights Reserved. x-easypdf-pdfbox is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details.
Modifier and Type | Field and Description |
---|---|
protected Color |
backgroundColor
背景颜色
|
protected List<Float> |
cellWidths
单元格宽度
|
protected HorizontalAlignment |
contentHorizontalAlignment
内容水平对齐方式
|
protected Float |
contentMarginBottom
内容下边距
|
protected Float |
contentMarginLeft
内容左边距
|
protected Float |
contentMarginRight
内容右边距
|
protected Float |
contentMarginTop
内容上边距
|
protected VerticalAlignment |
contentVerticalAlignment
内容垂直对齐方式
|
protected org.dromara.pdf.pdfbox.core.component.TableFooter |
footer
表尾
|
protected TableHeader |
header
表头
|
protected Boolean |
isPagingBorder
是否分页边框
|
protected Boolean |
isTogether
是否整体换行
|
protected PagingEvent |
pagingEvent
分页事件
|
protected List<TableRow> |
rows
行列表
|
beginX, beginY, borderConfiguration, horizontalAlignment, isBreak, isCustomPosition, isWrap, marginConfiguration, pagingCondition, pagingEvents, relativeBeginX, relativeBeginY, verticalAlignment
contentMode, context, isResetContentStream, log
Modifier and Type | Method and Description |
---|---|
void |
addRows(List<TableRow> rows)
添加行
|
void |
addRows(TableRow... rows)
添加行
|
protected Page |
executeBreak()
执行分页
|
protected float |
getFirstRowHeight()
获取第一行行高
|
Float |
getHeight()
获取高度
|
protected float |
getLastHeight(float beginY,
float height,
float top,
float bottom)
获取最终高度
|
protected float |
getMinWidth()
获取最小宽度
|
ComponentType |
getType()
获取类型
|
Float |
getWidth()
获取宽度
|
protected void |
init()
初始化
|
protected void |
initRows()
初始化行
|
protected void |
reset()
重置
|
protected void |
reset(float x,
float y)
重置
|
void |
setCellWidths(float... widths)
设置列宽
|
void |
setCellWidths(List<Float> widths)
设置列宽
|
void |
setContentMargin(float margin)
设置内容边距(上下左右)
|
void |
setRows(List<TableRow> rows)
设置行
|
void |
setRows(TableRow... rows)
设置行
|
protected void |
writeContents()
写入内容
|
addPagingEvent, checkPaging, checkPaging, checkPaging, checkWrap, close, getBase, getBorderBottomColor, getBorderDottedSpacing, getBorderLeftColor, getBorderLineCapStyle, getBorderLineLength, getBorderLineStyle, getBorderLineWidth, getBorderRightColor, getBorderTopColor, getBottom, getIsBorderBottom, getIsBorderLeft, getIsBorderRight, getIsBorderTop, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getPage, initBeginX, initBeginXY, initBeginY, initBeginYForPaging, isNeedWrap, isPaging, isPagingComponent, isWrap, processBreak, render, reset, resetXY, setBeginX, setBeginX, setBeginY, setBeginY, setBorderBottomColor, setBorderColor, setBorderDottedSpacing, setBorderLeftColor, setBorderLineCapStyle, setBorderLineLength, setBorderLineStyle, setBorderLineWidth, setBorderRightColor, setBorderRightColor, setBorderTopColor, setIsBorder, setIsBorderBottom, setIsBorderLeft, setIsBorderRight, setIsBorderTop, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, virtualRender, wrap
init, init
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getContext, getPagingCondition, getPagingEvents, setHorizontalAlignment, setVerticalAlignment
protected Color backgroundColor
protected TableHeader header
protected org.dromara.pdf.pdfbox.core.component.TableFooter footer
protected PagingEvent pagingEvent
protected Boolean isTogether
protected Boolean isPagingBorder
protected Float contentMarginTop
protected Float contentMarginBottom
protected Float contentMarginLeft
protected Float contentMarginRight
protected HorizontalAlignment contentHorizontalAlignment
protected VerticalAlignment contentVerticalAlignment
public Table(Page page)
page
- 页面public void setContentMargin(float margin)
margin
- 边距public void setCellWidths(float... widths)
widths
- 列宽public void setRows(TableRow... rows)
rows
- 行public void addRows(TableRow... rows)
rows
- 行public Float getWidth()
public Float getHeight()
public ComponentType getType()
protected void init()
init
in class AbstractComponent
protected void initRows()
protected float getMinWidth()
getMinWidth
in class AbstractComponent
protected void writeContents()
writeContents
in class AbstractComponent
protected Page executeBreak()
executeBreak
in class AbstractComponent
protected float getFirstRowHeight()
protected float getLastHeight(float beginY, float height, float top, float bottom)
beginY
- Y轴起始坐标height
- 高度top
- 顶点高度bottom
- 底部高度protected void reset()
reset
in class AbstractComponent
protected void reset(float x, float y)
x
- X轴坐标y
- Y轴坐标Copyright © 2024. All rights reserved.