Package org.eclipse.birt.report.engine.layout.area

Examples of org.eclipse.birt.report.engine.layout.area.IArea


    public void visitContainer(IContainerArea containerArea) {
        startContainer(containerArea);

        Iterator iter = containerArea.getChildren();
        while (iter.hasNext()) {
            IArea child = (IArea) iter.next();
            child.accept(this);
        }

        endContainer(containerArea);
    }
View Full Code Here


     * @see org.eclipse.birt.report.engine.emitter.ContentEmitterAdapter#startPage(org.eclipse.birt.report.engine.content.IPageContent)
     */
    @Override
    public void startPage(IPageContent page) {
        try {
            IArea pageArea = (IArea) page.getExtension(IContent.LAYOUT_EXTENSION);
            if (pageArea != null) {
                pageArea.accept(renderer);
            }
        } catch (OutOfMemoryError oome) {
            System.gc();
            throw new RuntimeException("Out of memory. Quitting", oome);
        }
View Full Code Here

        areaStack.pop();

        Frame currentFrame = frameStack.peek();

        IArea area = unWrap(currentFrame.getData());

        if (area != containerArea) {
            return;
        }
View Full Code Here

        return null;
    }

    private IArea wrapWithType(List<IArea> areas) {
        IArea hostArea = areas.get(0);

        if (hostArea.getContent() instanceof ITextContent) {
            for (int i = 0; i < areas.size(); i++) {
                IArea ar = unWrap(areas.get(i));

                if (ar instanceof ITextArea) {
                    String contentType = Data.STRING;
                    ITextArea tar = (ITextArea) ar;
                    if (ar.getContent().getContentType() == IContent.DATA_CONTENT) {
                        IDataContent dataContent = (IDataContent) ar.getContent();
                        contentType = ExcelUtil.getType(dataContent.getValue());
                    }
                    TextAreaWrapper textWrapper = new TextAreaWrapper((ITextArea) tar, contentType);
                    textWrapper.text = ((ITextContent) hostArea.getContent()).getText();
                    /**
                     * @Todo da migliorare
                     */
                    Object content = tar.getContent();
                    if (content instanceof DataContent) {
                        DataContent dataContent = (DataContent) tar.getContent();
                        Object generateBy = dataContent.getGenerateBy();
                        if (generateBy instanceof DataItemDesign) {
                            DataItemDesign did = (DataItemDesign) generateBy;
                            did.getName();
                            if (did.getName() != null && did.getName().equals("levelValue")) {
                                AggregateFinder.get().resolve(textWrapper.getText());
                            }
                        }
                    }
                    return textWrapper;
                }
            }
        } else if (hostArea.getContent() instanceof IImageContent) {
            for (int i = 0; i < areas.size(); i++) {
                IArea ar = unWrap(areas.get(i));

                if (ar instanceof IImageArea) {
                    // return first image
                    return ar;
                }
View Full Code Here

        }

        AreaWrapper warea = new AreaWrapper(child);

        for (int i = areaStack.size() - 1; i >= 0; i--) {
            IArea stackArea = areaStack.get(i);

            warea.x += stackArea.getX();
            warea.y += stackArea.getY();
        }

        return warea;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.birt.report.engine.layout.area.IArea

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.