public abstract class AbstractPageHeaderOrFooter extends AbstractBase
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 Float |
beginX
X轴起始坐标
|
protected Float |
beginY
Y轴起始坐标
|
protected BorderConfiguration |
borderConfiguration
边框配置
|
protected List<Component> |
components
组件列表
|
protected HorizontalAlignment |
contentHorizontalAlignment
内容水平对齐方式
|
protected VerticalAlignment |
contentVerticalAlignment
内容垂直对齐方式
|
protected Float |
height
高度
|
protected Boolean |
isAlreadyRendered
是否已经绘制
|
protected MarginConfiguration |
marginConfiguration
边距配置
|
protected PagingEvent |
pagingEvent
分页事件
|
protected Float |
width
宽度
|
contentMode, context, isResetContentStream, log
Constructor and Description |
---|
AbstractPageHeaderOrFooter(Page page)
有参构造
|
Modifier and Type | Method and Description |
---|---|
Color |
getBorderBottomColor()
获取下边框颜色
|
Float |
getBorderDottedSpacing()
获取边框点线间隔
|
Color |
getBorderLeftColor()
获取左边框颜色
|
LineCapStyle |
getBorderLineCapStyle()
获取线帽样式
|
Float |
getBorderLineLength()
获取边框线长
|
LineStyle |
getBorderLineStyle()
获取边框样式
|
Float |
getBorderLineWidth()
获取边框线宽
|
Color |
getBorderRightColor()
获取右边框颜色
|
Color |
getBorderTopColor()
获取上边框颜色
|
Boolean |
getIsBorderBottom()
获取是否下边框
|
Boolean |
getIsBorderLeft()
获取是否左边框
|
Boolean |
getIsBorderRight()
获取是否右边框
|
Boolean |
getIsBorderTop()
获取是否上边框
|
Float |
getMarginBottom()
获取下边距
|
Float |
getMarginLeft()
获取左边距
|
Float |
getMarginRight()
获取右边距
|
Float |
getMarginTop()
获取上边距
|
Page |
getPage()
获取页面
|
abstract PagingEvent |
getPagingEvent()
获取分页事件
|
abstract ComponentType |
getType()
获取类型
|
protected abstract void |
init()
初始化
|
protected void |
initBackgroundColor(float beginX,
float beginY)
初始化背景颜色
|
protected void |
initWidth()
初始化宽度
|
void |
render()
渲染
|
void |
renderAfter()
渲染后
|
void |
renderBefore()
渲染前
|
void |
renderComponent(Component component)
渲染组件
|
void |
reset()
重置
|
void |
setBorderBottomColor(Color color)
设置下边框颜色
|
void |
setBorderColor(Color color)
设置边框颜色(上下左右)
|
void |
setBorderDottedSpacing(float spacing)
设置边框点线间隔
|
void |
setBorderLeftColor(Color color)
设置左边框颜色
|
void |
setBorderLineCapStyle(LineCapStyle style)
设置线帽样式
|
void |
setBorderLineLength(float length)
设置边框线长
|
void |
setBorderLineStyle(LineStyle style)
设置边框样式
|
void |
setBorderLineWidth(float width)
设置边框线宽
|
void |
setBorderRightColor(boolean flag)
设置是否上边框
|
void |
setBorderRightColor(Color color)
设置右边框颜色
|
void |
setBorderTopColor(Color color)
设置上边框颜色
|
void |
setComponents(Component... components)
设置组件
|
void |
setComponents(List<Component> components)
设置组件
|
void |
setHeight(float height)
设置高度
|
void |
setIsBorder(boolean flag)
设置是否边框(上下左右)
|
void |
setIsBorderBottom(boolean flag)
设置是否下边框
|
void |
setIsBorderLeft(boolean flag)
设置是否左边框
|
void |
setIsBorderRight(boolean flag)
设置是否右边框
|
void |
setMargin(float margin)
设置边距(上下左右)
|
void |
setMarginBottom(float margin)
设置下边距
|
void |
setMarginLeft(float margin)
设置左边距
|
void |
setMarginRight(float margin)
设置右边距
|
void |
setMarginTop(float margin)
设置上边距
|
protected void |
setWidth(float width)
隐藏宽度设置
|
void |
virtualRender()
虚拟渲染
|
void |
virtualRenderComponent(Component component)
虚拟渲染组件
|
init, init
protected MarginConfiguration marginConfiguration
protected BorderConfiguration borderConfiguration
protected PagingEvent pagingEvent
protected Color backgroundColor
protected Float width
protected Float height
protected Float beginX
protected Float beginY
protected Boolean isAlreadyRendered
protected HorizontalAlignment contentHorizontalAlignment
protected VerticalAlignment contentVerticalAlignment
public AbstractPageHeaderOrFooter(Page page)
page
- 页面protected abstract void init()
public abstract ComponentType getType()
public abstract PagingEvent getPagingEvent()
public void setMargin(float margin)
margin
- 边距public void setMarginTop(float margin)
margin
- 边距public void setMarginBottom(float margin)
margin
- 边距public void setMarginLeft(float margin)
margin
- 边距public void setMarginRight(float margin)
margin
- 边距public void setBorderLineStyle(LineStyle style)
style
- 样式public void setBorderLineCapStyle(LineCapStyle style)
style
- 样式public void setBorderLineLength(float length)
length
- 线长public void setBorderLineWidth(float width)
width
- 线宽public void setBorderDottedSpacing(float spacing)
spacing
- 间隔public void setBorderColor(Color color)
color
- 颜色public void setBorderTopColor(Color color)
color
- 颜色public void setBorderBottomColor(Color color)
color
- 颜色public void setBorderLeftColor(Color color)
color
- 颜色public void setBorderRightColor(Color color)
color
- 颜色public void setBorderRightColor(boolean flag)
flag
- 是否上边框public void setIsBorder(boolean flag)
flag
- 是否下边框public void setIsBorderBottom(boolean flag)
flag
- 是否下边框public void setIsBorderLeft(boolean flag)
flag
- 是否左边框public void setIsBorderRight(boolean flag)
flag
- 是否右边框public void setHeight(float height)
height
- 高度public void setComponents(List<Component> components)
components
- 组件public void setComponents(Component... components)
components
- 组件public Page getPage()
public Float getMarginTop()
public Float getMarginBottom()
public Float getMarginLeft()
public Float getMarginRight()
public LineStyle getBorderLineStyle()
public LineCapStyle getBorderLineCapStyle()
public Float getBorderLineLength()
public Float getBorderLineWidth()
public Float getBorderDottedSpacing()
public Color getBorderTopColor()
public Color getBorderBottomColor()
public Color getBorderLeftColor()
public Color getBorderRightColor()
public Boolean getIsBorderTop()
public Boolean getIsBorderBottom()
public Boolean getIsBorderLeft()
public Boolean getIsBorderRight()
public void renderBefore()
public void virtualRender()
public void render()
public void renderAfter()
public void virtualRenderComponent(Component component)
component
- 组件public void renderComponent(Component component)
component
- 组件public void reset()
protected void initBackgroundColor(float beginX, float beginY)
protected void initWidth()
protected void setWidth(float width)
Copyright © 2024. All rights reserved.