public abstract class AbstractBaseChart
extends java.lang.Object
| 构造器和说明 |
|---|
AbstractBaseChart() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addBorderColorCell(com.itextpdf.text.pdf.PdfPTable table,
com.itextpdf.text.Font pFont,
java.lang.String str,
com.itextpdf.text.BaseColor backgroundColor,
int num,
float height,
java.lang.Integer align,
boolean... hasBorder)
边框与背景色相同的
|
com.itextpdf.text.pdf.PdfPCell |
addCell(com.itextpdf.text.Font pFont,
java.lang.String str,
float height,
float borderWidth,
com.itextpdf.text.BaseColor backColor) |
void |
addCell(com.itextpdf.text.pdf.PdfPTable table,
com.itextpdf.text.pdf.BaseFont pFont,
float fontSize,
int fontStyle,
int fontColor,
java.lang.String str,
com.itextpdf.text.BaseColor backgroundColor,
int num,
float height,
boolean... hasBorder) |
void |
addCell(com.itextpdf.text.pdf.PdfPTable table,
com.itextpdf.text.Font pFont,
java.lang.String str,
com.itextpdf.text.BaseColor backgroundColor,
int num,
float height,
boolean... hasBorder) |
float |
calRealHeight(java.lang.String text,
float fontSize,
float width,
float lineHeight)
主要是汉字
通过即将显示的文本、宽度、字体和固定行高,计算出文字多行显示的高度
|
float |
calTextWidth(float fontSize,
java.lang.String text)
显示窄的文本:主要是含有数字的文本
根据字体的大小,计算一段文本的所占用的宽度
|
void |
moveCircle(com.itextpdf.text.pdf.PdfContentByte cb,
float x1,
float y1,
float r,
boolean... isFill)
填充圆形
|
void |
moveLine(com.itextpdf.text.pdf.PdfContentByte cb,
float x1,
float y1,
float x2,
float y2) |
void |
moveMultiLineText(com.itextpdf.text.pdf.PdfContentByte cb,
java.lang.String text,
float fontSize,
float width,
float lineHeight,
float x,
float y,
int rotation)
显示窄的文本:主要是含有数字的文本
根据文本的长度和指定的绘画区域的宽度,换行或不换行显示出文本,在根据行高来文本垂直居中
根据宽度水平居中;如果要将文本纵向显示,请自行计算X(文字居中的时候且仅仅显示一个字)
,width指定为字体大小即可
|
void |
moveMultiLineWText(com.itextpdf.text.pdf.PdfContentByte cb,
java.lang.String text,
float fontSize,
float width,
float lineHeight,
float x,
float y,
int rotation)
主要是汉字
根据文本的长度和指定的绘画区域的宽度,换行或不换行显示出文本,在根据行高来文本垂直居中
根据宽度水平居中;如果要将文本纵向显示,请自行计算X(文字居中的时候且仅仅显示一个字)
,width指定为字体大小即可
|
void |
moveRect(com.itextpdf.text.pdf.PdfContentByte cb,
float x1,
float y1,
float x2,
float y2,
int color,
boolean... hasBorder) |
void |
moveRoundRect(com.itextpdf.text.pdf.PdfContentByte cb,
float x,
float y,
float w,
float h,
boolean... isFill)
圆角矩形
|
void |
moveRoundRect(com.itextpdf.text.pdf.PdfContentByte cb,
float x,
float y,
float w,
float h,
float radian,
boolean... isFill)
有一定弧度的矩形
|
void |
moveText(com.itextpdf.text.pdf.PdfContentByte cb,
java.lang.String text,
float x1,
float y1,
int align,
float rotation) |
void |
setLine(int num,
com.itextpdf.text.Document doc)
换行
|
void |
setLine(int num,
float fontSize,
com.itextpdf.text.Document doc)
指定的字体大小换行
|
public void setLine(int num,
com.itextpdf.text.Document doc)
throws com.itextpdf.text.DocumentException
num - doc - com.itextpdf.text.DocumentExceptionpublic void setLine(int num,
float fontSize,
com.itextpdf.text.Document doc)
throws com.itextpdf.text.DocumentException
num - fontSize - doc - com.itextpdf.text.DocumentExceptionpublic void addCell(com.itextpdf.text.pdf.PdfPTable table,
com.itextpdf.text.pdf.BaseFont pFont,
float fontSize,
int fontStyle,
int fontColor,
java.lang.String str,
com.itextpdf.text.BaseColor backgroundColor,
int num,
float height,
boolean... hasBorder)
table - pFont - fontSize - fontStyle - fontColor - str - backgroundColor - num - height - hasBorder - public void addCell(com.itextpdf.text.pdf.PdfPTable table,
com.itextpdf.text.Font pFont,
java.lang.String str,
com.itextpdf.text.BaseColor backgroundColor,
int num,
float height,
boolean... hasBorder)
table - pFont - str - backgroundColor - num - height - hasBorder - public void addBorderColorCell(com.itextpdf.text.pdf.PdfPTable table,
com.itextpdf.text.Font pFont,
java.lang.String str,
com.itextpdf.text.BaseColor backgroundColor,
int num,
float height,
java.lang.Integer align,
boolean... hasBorder)
table - pFont - str - backgroundColor - num - height - hasBorder - public com.itextpdf.text.pdf.PdfPCell addCell(com.itextpdf.text.Font pFont,
java.lang.String str,
float height,
float borderWidth,
com.itextpdf.text.BaseColor backColor)
pFont - str - height - borderWidth - backColor - public void moveText(com.itextpdf.text.pdf.PdfContentByte cb,
java.lang.String text,
float x1,
float y1,
int align,
float rotation)
cb - text - x1 - y1 - align - rotation - public void moveLine(com.itextpdf.text.pdf.PdfContentByte cb,
float x1,
float y1,
float x2,
float y2)
cb - x1 - y1 - x2 - y2 - public void moveRect(com.itextpdf.text.pdf.PdfContentByte cb,
float x1,
float y1,
float x2,
float y2,
int color,
boolean... hasBorder)
cb - x1 - y1 - x2 - y2 - color - hasBorder - public void moveRoundRect(com.itextpdf.text.pdf.PdfContentByte cb,
float x,
float y,
float w,
float h,
boolean... isFill)
cb - x - y - w - h - public void moveRoundRect(com.itextpdf.text.pdf.PdfContentByte cb,
float x,
float y,
float w,
float h,
float radian,
boolean... isFill)
cb - x - y - w - h - radian - isFill - public void moveCircle(com.itextpdf.text.pdf.PdfContentByte cb,
float x1,
float y1,
float r,
boolean... isFill)
cb - x1 - y1 - r - public float calTextWidth(float fontSize,
java.lang.String text)
fontSize - text - public void moveMultiLineText(com.itextpdf.text.pdf.PdfContentByte cb,
java.lang.String text,
float fontSize,
float width,
float lineHeight,
float x,
float y,
int rotation)
cb - text - fontSize - width - lineHeight - x - y - rotation - public float calRealHeight(java.lang.String text,
float fontSize,
float width,
float lineHeight)
text - fontSize - width - lineHeight - public void moveMultiLineWText(com.itextpdf.text.pdf.PdfContentByte cb,
java.lang.String text,
float fontSize,
float width,
float lineHeight,
float x,
float y,
int rotation)
cb - text - fontSize - width - lineHeight - x - y - rotation - Copyright © 2019. All Rights Reserved.