Package org.axsl.galley

Examples of org.axsl.galley.Page


         * scaling */

        this.graphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,
                                   RenderingHints.VALUE_FRACTIONALMETRICS_ON);

        final Page aPage = this.pageList.get(pageIndex);
        try {
            renderPage(aPage);
        } catch (final GalleyVisitorException e) {
            throw new PrinterException(e.getMessage());
        }
View Full Code Here


    public PageFormat getPageFormat(final int pageIndex) {
        if (pageIndex >= this.pageList.size()) {
            return null;
        }

        final Page page = this.pageList.get(pageIndex);
        final PageFormat pageFormat = new PageFormat();
        final Paper paper = new Paper();

        final double width = toPoints(page.getWidth());
        final double height = toPoints(page.getHeight());

        // if the width is greater than the height assume lanscape mode
        // and swap the width and height values in the paper format
        if (width > height) {
            paper.setImageableArea(0, 0, height, width);
View Full Code Here

TOP

Related Classes of org.axsl.galley.Page

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.