Package org.uguess.birt.report.engine.layout.wrapper.impl

Examples of org.uguess.birt.report.engine.layout.wrapper.impl.AggregateFrame


                }

                if (exportSingleSheet) {
                    // aggregate only
                    if (singleContainer == null) {
                        singleContainer = new AggregateFrame();
                        singleContainer.setRight(bodyFrame.getRight() - bodyFrame.getLeft());
                        singleContainer.setBottom(bodyFrame.getBottom() - bodyFrame.getTop());
                    } else {
                        int yOff = singleContainer.getBottom();
                        singleContainer.setBottom(yOff + bodyFrame.getBottom() - bodyFrame.getTop());

                        if (bodyFrame instanceof AreaFrame) {
                            ((AreaFrame) bodyFrame).setYOffset(yOff + ((AreaFrame) bodyFrame).getYOffset());
                        }
                    }

                    singleContainer.addChild(bodyFrame);
                    if (bodyFrame instanceof AreaFrame) {
                        ((AreaFrame) bodyFrame).setParent(singleContainer);
                    }

                    if (DEBUG) {
                        logger.log(Level.INFO, "------------aggregate sheet[" //$NON-NLS-1$
                                + (currentPageIndex) + "] using " //$NON-NLS-1$
                                + (System.currentTimeMillis() - span) + " ms"); //$NON-NLS-1$
                    }
                } else if (aggregateOnFirstLevel) {
                    // aggregate only
                    singleContainer = multiPageContainer.get(AggregateFinder.get().getPageNum());
                    if (singleContainer == null) {
                        singleContainer = new AggregateFrame();
                        singleContainer.setRight(bodyFrame.getRight() - bodyFrame.getLeft());
                        singleContainer.setBottom(bodyFrame.getBottom() - bodyFrame.getTop());
                        multiPageContainer.put(new Integer(AggregateFinder.get().getPageNum()), singleContainer);
                    } else {
                        int yOff = singleContainer.getBottom();
                        singleContainer.setBottom(yOff + bodyFrame.getBottom() - bodyFrame.getTop());

                        if (bodyFrame instanceof AreaFrame) {
                            ((AreaFrame) bodyFrame).setYOffset(yOff + ((AreaFrame) bodyFrame).getYOffset());
                        }
                    }

                    singleContainer.addChild(bodyFrame);
                    if (bodyFrame instanceof AreaFrame) {
                        ((AreaFrame) bodyFrame).setParent(singleContainer);
                    }

                    if (DEBUG) {
                        logger.log(Level.INFO, "------------aggregate sheet[" //$NON-NLS-1$
                                + (currentPageIndex) + "] using " //$NON-NLS-1$
                                + (System.currentTimeMillis() - span) + " ms"); //$NON-NLS-1$
                    }
                } else {
                    // export body frame
                    Sheet modelSheet = Transformer.toSheet(bodyFrame,
                            1000,
                            fixedColumnWidth * 1000);
                    exportSheet(modelSheet);

                    if (DEBUG) {
                        logger.log(Level.INFO, "------------export sheet[" //$NON-NLS-1$
                                + (currentPageIndex) + "] using " //$NON-NLS-1$
                                + (System.currentTimeMillis() - span) + " ms"); //$NON-NLS-1$
                    }
                }
            } else {
                if (exportSingleSheet) {
                    // aggregate only
                    if (singleContainer == null) {
                        singleContainer = new AggregateFrame();
                        singleContainer.setRight(currentFrame.getRight() - currentFrame.getLeft());
                        singleContainer.setBottom(currentFrame.getBottom() - currentFrame.getTop());
                    } else {
                        int yOff = singleContainer.getBottom();
                        singleContainer.setBottom(yOff + currentFrame.getBottom() - currentFrame.getTop());

                        if (currentFrame instanceof AreaFrame) {
                            ((AreaFrame) currentFrame).setYOffset(yOff);
                        }
                    }

                    singleContainer.addChild(currentFrame);
                    if (currentFrame instanceof AreaFrame) {
                        ((AreaFrame) currentFrame).setParent(singleContainer);
                    }

                    if (DEBUG) {
                        logger.log(Level.INFO, "------------aggregate sheet[" //$NON-NLS-1$
                                + (currentPageIndex) + "] using " //$NON-NLS-1$
                                + (System.currentTimeMillis() - span) + " ms"); //$NON-NLS-1$
                    }
                } else if (aggregateOnFirstLevel) {
                    PageArea pa = (PageArea) currentFrame.getData();
                    IContainerArea header = pa.getHeader();

                    singleContainer = multiPageContainer.get(AggregateFinder.get().getPageNum());
                    // aggregate only
                    if (singleContainer == null) {
                        singleContainer = new AggregateFrame();
                        singleContainer.setRight(currentFrame.getRight() - currentFrame.getLeft());
                        singleContainer.setBottom(currentFrame.getBottom() - currentFrame.getTop());
                        multiPageContainer.put(new Integer(AggregateFinder.get().getPageNum()), singleContainer);
                    } else {
                        int yOff = singleContainer.getBottom();
View Full Code Here

TOP

Related Classes of org.uguess.birt.report.engine.layout.wrapper.impl.AggregateFrame

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.