本文整理汇总了Java中net.sf.jasperreports.engine.JRPrintPage类的典型用法代码示例。如果您正苦于以下问题:Java JRPrintPage类的具体用法?Java JRPrintPage怎么用?Java JRPrintPage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JRPrintPage类属于net.sf.jasperreports.engine包,在下文中一共展示了JRPrintPage类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: FillPartPrintOutput
import net.sf.jasperreports.engine.JRPrintPage; //导入依赖的package包/类
public FillPartPrintOutput(BaseReportFiller filler)
{
parts = new TreeMap<Integer, PrintPart>();
pages = new ArrayList<JRPrintPage>();
delayedActions = new DelayedFillActions(filler);
delayedActions.createDelayedEvaluationTime(JREvaluationTime.EVALUATION_TIME_MASTER);
if (log.isDebugEnabled())
{
log.debug(this + " created delayed actions " + delayedActions.getId());
}
if (filler.getFillContext().isCollectingBookmarks())
{
bookmarkHelper = new BookmarkHelper(true);
}
styles = new LinkedHashMap<String, JRStyle>();
origins = new LinkedHashSet<JROrigin>();
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:21,代码来源:FillPartPrintOutput.java
示例2: addPage
import net.sf.jasperreports.engine.JRPrintPage; //导入依赖的package包/类
@Override
public void addPage(JRPrintPage page, DelayedFillActions delayedActionsSource)
{
int pageIndex = pages.size();
if (log.isDebugEnabled())
{
log.debug("adding part page at index " + pageIndex);
}
pages.add(page);
if (bookmarkHelper != null)
{
bookmarkHelper.addBookmarks(page, pageIndex);
}
delayedActions.moveMasterEvaluations(delayedActionsSource, page, pageIndex);
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:18,代码来源:FillPartPrintOutput.java
示例3: append
import net.sf.jasperreports.engine.JRPrintPage; //导入依赖的package包/类
@Override
public void append(FillPartPrintOutput output)
{
int pageOffset = pages.size();
for (Map.Entry<Integer, PrintPart> partEntry : output.parts.entrySet())
{
parts.put(pageOffset + partEntry.getKey(), partEntry.getValue());
}
for (ListIterator<JRPrintPage> it = output.pages.listIterator(); it.hasNext();)
{
JRPrintPage page = it.next();
pages.add(page);
delayedActions.moveMasterEvaluations(output.delayedActions, page, pageOffset + it.previousIndex());
}
if (bookmarkHelper != null && output.bookmarkHelper != null)
{
// adding in bulk
bookmarkHelper.appendBookmarks(output.bookmarkHelper, pageOffset);
}
addStyles(output.styles.values());
addOrigins(output.origins);
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:26,代码来源:FillPartPrintOutput.java
示例4: transformGenericElements
import net.sf.jasperreports.engine.JRPrintPage; //导入依赖的package包/类
/**
* Applies generic element transformers of a specific key to a filled report
* by replacing generic elements with the transformed elements.
*
* @param report the report
* @param transformerExportKey the key used to resolve element transformers
* @see GenericElementTransformer
* @see GenericElementHandlerBundle#getHandler(String, String)
*/
public static void transformGenericElements(
JasperReportsContext jasperReportsContext,
JasperPrint report,
String transformerExportKey
)
{
TransformerContext transformerContext = new TransformerContext(jasperReportsContext, report);
List<JRPrintPage> pages = report.getPages();
for (Iterator<JRPrintPage> pageIt = pages.iterator(); pageIt.hasNext();)
{
JRPrintPage page = pageIt.next();
transformElements(transformerContext, transformerExportKey,
page.getElements());
}
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:25,代码来源:GenericElementReportTransformer.java
示例5: exportPage
import net.sf.jasperreports.engine.JRPrintPage; //导入依赖的package包/类
protected void exportPage(JRPrintPage page) throws IOException
{
Collection<JRPrintElement> elements = page.getElements();
Boolean exportReportComponentsOnly = getCurrentConfiguration().isReportComponentsExportOnly();
if (exportReportComponentsOnly == null)
{
exportReportComponentsOnly = false;
}
if (!exportReportComponentsOnly)
{
exportElements(elements);
exportWebFonts();
exportHyperlinks();
}
exportBookmarks();
exportParts();
JRExportProgressMonitor progressMonitor = getCurrentItemConfiguration().getProgressMonitor();
if (progressMonitor != null)
{
progressMonitor.afterPageExport();
}
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:27,代码来源:JsonExporter.java
示例6: exportPage
import net.sf.jasperreports.engine.JRPrintPage; //导入依赖的package包/类
/**
*
*/
protected void exportPage(JRPrintPage page) throws JRException, DocumentException, IOException
{
tagHelper.startPage();
Collection<JRPrintElement> elements = page.getElements();
exportElements(elements);
tagHelper.endPage();
JRExportProgressMonitor progressMonitor = getCurrentItemConfiguration().getProgressMonitor();
if (progressMonitor != null)
{
progressMonitor.afterPageExport();
}
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:19,代码来源:JRPdfExporter.java
示例7: getImage
import net.sf.jasperreports.engine.JRPrintPage; //导入依赖的package包/类
/**
*
*/
public static JRPrintImage getImage(List<JasperPrint> jasperPrintList, JRPrintElementIndex imageIndex)
{
JasperPrint report = jasperPrintList.get(imageIndex.getReportIndex());
JRPrintPage page = report.getPages().get(imageIndex.getPageIndex());
Integer[] elementIndexes = imageIndex.getAddressArray();
Object element = page.getElements().get(elementIndexes[0].intValue());
for (int i = 1; i < elementIndexes.length; ++i)
{
JRPrintFrame frame = (JRPrintFrame) element;
element = frame.getElements().get(elementIndexes[i].intValue());
}
return (JRPrintImage) element;
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:20,代码来源:AbstractHtmlExporter.java
示例8: exportPage
import net.sf.jasperreports.engine.JRPrintPage; //导入依赖的package包/类
/**
* Exports a report page
* @param page Page that will be exported
* @throws JRException
*/
protected void exportPage(JRPrintPage page, boolean lastPage) throws JRException, IOException
{
exportElements(page.getElements());
if(!lastPage)
{
contentWriter.write("\\page\n");
}
JRExportProgressMonitor progressMonitor = getCurrentItemConfiguration().getProgressMonitor();
if (progressMonitor != null)
{
progressMonitor.afterPageExport();
}
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:21,代码来源:JRRtfExporter.java
示例9: calculateXCuts
import net.sf.jasperreports.engine.JRPrintPage; //导入依赖的package包/类
/**
* This static method calculates all the X cuts for a list of pages.
*
* @param jasperPrint
* The JasperPrint document.
* @param startPageIndex
* The first page to consider.
* @param endPageIndex
* The last page to consider.
* @param offsetX
* horizontal element position offset
*/
public static CutsInfo calculateXCuts(ExporterNature nature, JasperPrint jasperPrint, int startPageIndex, int endPageIndex, int offsetX)
{
CutsInfo xCuts = new CutsInfo();
List<JRPrintPage> pages = jasperPrint.getPages();
for (int pageIndex = startPageIndex; pageIndex <= endPageIndex; pageIndex++)
{
JRPrintPage page = pages.get(pageIndex);
addXCuts(nature, page.getElements(), offsetX, xCuts);
}
// add a cut at the page width if there are not parts and if no element goes beyond the page width
if (!jasperPrint.hasParts())
{
int width = jasperPrint.getPageWidth();
int lastCut = xCuts.getLastCutOffset();
if (lastCut < width)
{
xCuts.addCutOffset(width);
}
}
return xCuts;
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:37,代码来源:JRGridLayout.java
示例10: addContent
import net.sf.jasperreports.engine.JRPrintPage; //导入依赖的package包/类
/**
*
*/
public static void addContent(JRPrintPage printPage, int pageIndex,
ElementRangeContents elementsToMove, int xdelta, int ydelta,
DelayedFillActions delayedActions)
{
if (elementsToMove != null && !elementsToMove.getElements().isEmpty())
{
List<JRPrintElement> elements = elementsToMove.getElements();
for (int i = elements.size() - 1; i >= 0; i--)// elementsToMove were added in reverse order
{
JRPrintElement printElement = elements.get(i);
printElement.setX(printElement.getX() + xdelta);
printElement.setY(printElement.getY() + ydelta);
printPage.addElement(printElement);
}
if (delayedActions != null && elementsToMove.hasEvaluations())
{
delayedActions.addElementEvaluations(printPage, pageIndex, elementsToMove);
}
}
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:27,代码来源:ElementRangeUtil.java
示例11: newPage
import net.sf.jasperreports.engine.JRPrintPage; //导入依赖的package包/类
protected JRPrintPage newPage()
{
JRPrintPage page;
if (fillContext.isUsingVirtualizer())
{
JRVirtualPrintPage virtualPage = new JRVirtualPrintPage(jasperPrint, virtualizationContext);
page = virtualPage;
}
else
{
page = new JRBasePrintPage();
}
return page;
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:17,代码来源:JRBaseFiller.java
示例12: addPage
import net.sf.jasperreports.engine.JRPrintPage; //导入依赖的package包/类
protected void addPage(JRPrintPage page)
{
if (!isSubreport())
{
if (log.isDebugEnabled())
{
log.debug("Fill " + fillerId + ": adding page " + (jasperPrint.getPages().size() + 1));
}
// notify that the previous page was generated
int pageCount = jasperPrint.getPages().size();
if (pageCount > 0 && fillListener != null)
{
fillListener.pageGenerated(jasperPrint, pageCount - 1);
}
addLastPageBookmarks();
jasperPrint.addPage(page);
fillContext.setPrintPage(page);
}
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:23,代码来源:JRBaseFiller.java
示例13: hasBoundActions
import net.sf.jasperreports.engine.JRPrintPage; //导入依赖的package包/类
protected boolean hasBoundActions(JRPrintPage page)
{
boolean hasActions = delayedActions.hasDelayedActions(page);
if (hasActions)
{
return true;
}
if (subfillers != null)
{
for (JRBaseFiller subfiller : subfillers.values())
{
// recursive
if (subfiller.hasBoundActions(page))
{
return true;
}
}
}
return false;
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:23,代码来源:JRBaseFiller.java
示例14: addPage
import net.sf.jasperreports.engine.JRPrintPage; //导入依赖的package包/类
@Override
public void addPage(JRPrintPage page, DelayedFillActions delayedActionsSource)
{
int pageIndex = jasperPrint.getPages().size();
if (log.isDebugEnabled())
{
log.debug("adding part page at index " + pageIndex);
}
jasperPrint.addPage(page);
addLastPageBookmarks();
delayedActions.moveMasterEvaluations(delayedActionsSource, page, pageIndex);
if (fillListener != null)
{
fillListener.pageGenerated(jasperPrint, pageIndex);
}
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:20,代码来源:PartReportFiller.java
示例15: registerPage
import net.sf.jasperreports.engine.JRPrintPage; //导入依赖的package包/类
protected void registerPage(JRPrintPage page)
{
if (page instanceof JRVirtualPrintPage)
{
JRVirtualizationContext virtualizationContext = ((JRVirtualPrintPage) page).getVirtualizationContext();
if (!listenedContexts.contains(virtualizationContext))
{
//FIXMEBOOK part reports use a single context which will collect all listeners
virtualizationContext.addListener(this);
listenedContexts.add(virtualizationContext);
if (log.isDebugEnabled())
{
log.debug(id + " registered virtualization listener on " + virtualizationContext);
}
}
}
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:19,代码来源:DelayedFillActions.java
示例16: hasDelayedActions
import net.sf.jasperreports.engine.JRPrintPage; //导入依赖的package包/类
public boolean hasDelayedActions(JRPrintPage page)
{
FillPageKey pageKey = new FillPageKey(page);
for (LinkedHashMap<FillPageKey, LinkedMap<Object, EvaluationBoundAction>> map : actionsMap.values())
{
fillContext.lockVirtualizationContext();
try
{
synchronized (map)
{
LinkedMap<Object, EvaluationBoundAction> boundMap = map.get(pageKey);
if (boundMap != null && !boundMap.isEmpty())
{
return true;
}
}
}
finally
{
fillContext.unlockVirtualizationContext();
}
}
return false;
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:26,代码来源:DelayedFillActions.java
示例17: hasMasterDelayedActions
import net.sf.jasperreports.engine.JRPrintPage; //导入依赖的package包/类
protected boolean hasMasterDelayedActions(JRPrintPage page)
{
LinkedHashMap<FillPageKey, LinkedMap<Object, EvaluationBoundAction>> masterActions = actionsMap.get(JREvaluationTime.EVALUATION_TIME_MASTER);
FillPageKey pageKey = new FillPageKey(page);
fillContext.lockVirtualizationContext();
try
{
synchronized (masterActions)//FIXME is this necessary?
{
LinkedMap<Object, EvaluationBoundAction> pageMasterActions = masterActions.get(pageKey);
return pageMasterActions != null && !pageMasterActions.isEmpty();
}
}
finally
{
fillContext.unlockVirtualizationContext();
}
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:20,代码来源:DelayedFillActions.java
示例18: refresh
import net.sf.jasperreports.engine.JRPrintPage; //导入依赖的package包/类
protected void refresh() {
if (rViewer != null && hasReport()) {
try {
List<JRPrintPage> pages = rViewer.getReport().getPages();
if (pages.isEmpty())
refresh(null, "Document is Empty", null);
else
refresh(renderPage(), null, pages.get(rViewer.getPageIndex()));
} catch (Throwable e) {
e.printStackTrace();
refresh(null, e.getMessage(), null);
}
} else
refresh(null, null, null);
setFocus();
}
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:17,代码来源:ViewerCanvas.java
示例19: exportPage
import net.sf.jasperreports.engine.JRPrintPage; //导入依赖的package包/类
/**
*
*/
protected void exportPage(JRPrintPage page) throws JRException, IOException {
Vector lines = layoutGrid(page);
int y = 0;
for (y = 0; y < lines.size(); y++) {
String s = ("" + lines.elementAt(y));
while (s.endsWith(" ")) {
s = s.substring(0, s.length() - 1);
}
writer.write(s);
writer.write("\r\n"); // // DIRUBAH
}
while (y < PAGE_ROWS) {
writer.write("\r\n"); // // DIRUBAH
y++;
}
if (ADD_FORM_FEED) {
writer.write("\f");
}
if (progressMonitor != null) {
progressMonitor.afterPageExport();
}
}
开发者ID:rmage,项目名称:gnvc-ims,代码行数:29,代码来源:JRTxtExporter.java
示例20: exportPage
import net.sf.jasperreports.engine.JRPrintPage; //导入依赖的package包/类
/**
*
*/
protected void exportPage(JRPrintPage page) throws JRException, IOException
{
startPage = true;
ReportExportConfiguration configuration = getCurrentItemConfiguration();
PrintPageFormat pageFormat = jasperPrint.getPageFormat(pageIndex);
JRGridLayout layout =
new JRGridLayout(
nature,
page.getElements(),
pageFormat.getPageWidth(),
pageFormat.getPageHeight(),
configuration.getOffsetX() == null ? 0 : configuration.getOffsetX(),
configuration.getOffsetY() == null ? 0 : configuration.getOffsetY(),
null //address
);
exportGrid(layout, null);
JRExportProgressMonitor progressMonitor = configuration.getProgressMonitor();
if (progressMonitor != null)
{
progressMonitor.afterPageExport();
}
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:31,代码来源:JROdtExporter.java
注:本文中的net.sf.jasperreports.engine.JRPrintPage类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论