public class PdfParagraph extends AbstractPdfBlock
限定符和类型 | 字段和说明 |
---|---|
protected int |
alignment |
protected float |
currentHeight |
protected float |
height |
protected com.fr.third.v2.lowagie.text.pdf.PdfLine |
line |
protected java.util.List<com.fr.third.v2.lowagie.text.pdf.PdfLine> |
lines |
protected float |
text_indent |
protected float |
width |
margin, padding
构造器和说明 |
---|
PdfParagraph() |
PdfParagraph(float width,
float height) |
限定符和类型 | 方法和说明 |
---|---|
boolean |
add(com.fr.third.v2.lowagie.text.Element element,
Style style)
向container中添加PdfElement
|
void |
calculateHeight()
计算渲染行高度
|
protected void |
carriageReturn()
将pdfLine对象添加到lines中并生产新的pdfLine
|
void |
draw(java.awt.Graphics2D g2d,
Style style)
进行绘制
|
java.lang.String |
getBackground() |
float |
getHeight()
获取block元素高度
|
com.fr.third.v2.lowagie.text.pdf.PdfLine |
getLine() |
java.util.List<com.fr.third.v2.lowagie.text.pdf.PdfLine> |
getLines() |
PdfParagraph |
getOtherAttribute(com.fr.third.v2.lowagie.text.Paragraph paragraph)
从paragraph对象中获取其他属性
|
void |
setBackground(java.lang.String background) |
void |
setHeight(float height) |
void |
setLine(com.fr.third.v2.lowagie.text.pdf.PdfLine line) |
void |
setLines(java.util.ArrayList lines) |
java.lang.String |
toHtmlString(double lineStartY,
double lineEndY)
将渲染行转换成对应的html字符串
|
getMargin, getPadding, setMargin, setPadding
protected com.fr.third.v2.lowagie.text.pdf.PdfLine line
protected java.util.List<com.fr.third.v2.lowagie.text.pdf.PdfLine> lines
protected float currentHeight
protected int alignment
protected float width
protected float height
protected float text_indent
public PdfParagraph()
public PdfParagraph(float width, float height)
public java.lang.String getBackground()
public void setBackground(java.lang.String background)
public float getHeight()
PdfBlock
public void setHeight(float height)
public com.fr.third.v2.lowagie.text.pdf.PdfLine getLine()
public void setLine(com.fr.third.v2.lowagie.text.pdf.PdfLine line)
public java.util.List<com.fr.third.v2.lowagie.text.pdf.PdfLine> getLines()
public void setLines(java.util.ArrayList lines)
public PdfParagraph getOtherAttribute(com.fr.third.v2.lowagie.text.Paragraph paragraph)
paragraph
- paragraph对象public boolean add(com.fr.third.v2.lowagie.text.Element element, Style style) throws com.fr.third.v2.lowagie.text.DocumentException
element
- style
- 单元格的样式(用来和html解析出来的样式统一)com.fr.third.v2.lowagie.text.DocumentException
protected void carriageReturn()
public void draw(java.awt.Graphics2D g2d, Style style) throws java.lang.Exception
g2d
- pdf图形对象style
- 单元格样式java.lang.Exception
public void calculateHeight()
public java.lang.String toHtmlString(double lineStartY, double lineEndY)
lineStartY
- 起始行lineEndY
- 结束行