Java 类net.sf.jasperreports.engine.fill.JRSwapFileVirtualizer 实例源码

项目:dynamicreports-jasper    文件:ConcatenatedReport3Test.java   
@Before
public void init() {
    JasperReportBuilder report1 = report()
        .title(cmp.text("text1"))
        .pageFooter(cmp.pageNumber());
    JasperReportBuilder report2 = report()
        .title(cmp.text("text2"))
        .pageFooter(cmp.pageNumber());
    JasperReportBuilder report3 = report()
        .title(cmp.text("text3"))
        .pageFooter(cmp.pageNumber());

    JRSwapFile swapFile = new JRSwapFile(System.getProperty("java.io.tmpdir"), 2000, 5000);
    concatenatedReport = concatenatedReport(new JasperPrintListFileHandler(System.getProperty("java.io.tmpdir"), new JRSwapFileVirtualizer(3, swapFile)));
    concatenatedReport.continuousPageNumbering();
    concatenatedReport.concatenate(report1, report2, report3);
}
项目:PDFReporter-Studio    文件:ReportExecutionPreferencePage.java   
@Override
public void propertyChange(PropertyChangeEvent event) {
    super.propertyChange(event);
    if (event.getProperty().equals("field_editor_value")) { //$NON-NLS-1$
        if (event.getSource() == bfeUSE)
            enableVirtualizers((Boolean) event.getNewValue());
        else if (event.getSource() == cfeType) {
            isSwap = event.getNewValue().equals(JRSwapFileVirtualizer.class.getName());
            enableSwapVirtualizer(isSwap);
        } else if (event.getSource() == mnumrec)
            enableLimitRecords((Integer) event.getNewValue() >= 0);
        else if (event.getSource() == bLimRec)
            enableLimitRecords((Boolean) event.getNewValue());
    }
}