public class SinglePagePrintable extends java.lang.Object implements java.awt.print.Printable, PaperSettingGetter, BaseSinglePagePrintable
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
XML_TAG |
构造器和说明 |
---|
SinglePagePrintable(PaperSettingProvider paperSettings)
初始化一个SinglePagePrintable, 主要用于传递页面设置给打印机
|
SinglePagePrintable(java.net.URL servletURL,
PaperSettingProvider paperSetting,
BaseSingleReportCache spc)
初始化一个SinglePagePrintable
|
SinglePagePrintable(java.net.URL servletURL,
PaperSettingProvider paperSetting,
int startIndex,
BaseSingleReportCache spc)
初始化一个SinglePagePrintable
|
限定符和类型 | 方法和说明 |
---|---|
PaperSettingProvider |
getPaperSetting()
获取当前页面的页面设置
|
int |
print(java.awt.Graphics g,
java.awt.print.PageFormat pf,
int pageIndex)
开始单页打印
|
void |
setReadreportsettings(boolean readreportsettings)
设置是否重复读取报表页面设置
|
void |
setScaleFactor(double scaleFactor)
设置缩放比例
|
public static final java.lang.String XML_TAG
public SinglePagePrintable(PaperSettingProvider paperSettings)
public SinglePagePrintable(java.net.URL servletURL, PaperSettingProvider paperSetting, BaseSingleReportCache spc)
total
- 打印的总页数servletURL
- 服务器地址paperSetting
- 页面设置spc
- 打印页面缓存public SinglePagePrintable(java.net.URL servletURL, PaperSettingProvider paperSetting, int startIndex, BaseSingleReportCache spc)
total
- 打印的总页数servletURL
- 服务器地址paperSetting
- 页面设置startIndex
- 起始打印页码spc
- 打印页面缓存public void setReadreportsettings(boolean readreportsettings)
setReadreportsettings
在接口中 BaseSinglePagePrintable
readreportsettings
- 是否重复读取public PaperSettingProvider getPaperSetting()
getPaperSetting
在接口中 BaseSinglePagePrintable
getPaperSetting
在接口中 PaperSettingGetter
public void setScaleFactor(double scaleFactor)
setScaleFactor
在接口中 BaseSinglePagePrintable
public int print(java.awt.Graphics g, java.awt.print.PageFormat pf, int pageIndex) throws java.awt.print.PrinterException
print
在接口中 BaseSinglePagePrintable
print
在接口中 java.awt.print.Printable
g
- 画板pf
- 页面设置pageIndex
- 指定页java.awt.print.PrinterException