Examples of SimplePageMaster


Examples of org.axsl.fo.fo.SimplePageMaster

    /**
     * Creates the region-after for this page.
     */
    private void createRegionAfter() {
        final SimplePageMaster simplePageMaster = getPageMaster();
        if (simplePageMaster.getRegionAfter() == null) {
            return;
        }
        final RegionAfter region = simplePageMaster.getRegionAfter();
        this.after = makeRegionRA(region);
    }
View Full Code Here

Examples of org.axsl.fo.fo.SimplePageMaster

    /**
     * Creates the region-start for this page.
     */
    private void createRegionStart() {
        final SimplePageMaster simplePageMaster = getPageMaster();
        if (simplePageMaster.getRegionStart() == null) {
            return;
        }
        final RegionStart region = simplePageMaster.getRegionStart();
        this.start = makeRegionRA(region);
    }
View Full Code Here

Examples of org.axsl.fo.fo.SimplePageMaster

    /**
     * Creates the region-end for this page.
     */
    private void createRegionEnd() {
        final SimplePageMaster simplePageMaster = getPageMaster();
        if (simplePageMaster.getRegionEnd() == null) {
            return;
        }
        final RegionEnd region = simplePageMaster.getRegionEnd();
        this.end = makeRegionRA(region);
    }
View Full Code Here

Examples of org.axsl.fo.fo.SimplePageMaster

            if (getCurrentPageNumber() % 2 == 1) {
                isBlank = true;
             }
        }
        final PageSequence pageSeq = getPageSequence();
        SimplePageMaster spm = null;
        try {
            spm = this.pageMasterResolver.getNextPageMaster(isBlank);
        } catch (final FoTreeException e) {
            throw new AreaTreeException(e);
        }
View Full Code Here

Examples of org.axsl.fo.fo.SimplePageMaster

     * {@inheritDoc}
     */
    public int brOriginX() {
        // Start at the parent's content origin.
        final int x = ancestorArea().crOriginX();
        final SimplePageMaster spm = getPageMaster();
        final AbsoluteDirection stackingDirection
                = ancestorArea().contentStackingDirectionAbsolute();
        if (stackingDirection.isVertical()) {
            /* x is where it needs to be. */
            return x;
        }
        if (stackingDirection == AbsoluteDirection.LEFT_TO_RIGHT) {
            return x + spm.getStartExtent();
        }
        if (stackingDirection == AbsoluteDirection.RIGHT_TO_LEFT) {
            return x - spm.getEndExtent();
        }
        return x;
    }
View Full Code Here

Examples of org.axsl.fo.fo.SimplePageMaster

     * {@inheritDoc}
     */
    public int brOriginY() {
        // Start at the parent's content origin.
        final int y = ancestorArea().crOriginY();
        final SimplePageMaster spm = getPageMaster();
        final AbsoluteDirection direction
                = getWritingMode().getAbsoluteDirFromRelativeAxis(
                RelativeAxis.BLOCK_PROGRESSION);
        if (direction.isHorizontal()) {
            /* y is where it needs to be. */
            return y;
        }
        if (direction == AbsoluteDirection.TOP_TO_BOTTOM) {
            return y - spm.getBeforeExtent();
        }
        if (direction == AbsoluteDirection.BOTTOM_TO_TOP) {
            return y + spm.getAfterExtent();
        }
        return y;
    }
View Full Code Here

Examples of org.axsl.fo.fo.SimplePageMaster

     */
    public void formatStaticContent(final PageArea pageArea)
            throws AreaTreeException {
        final PageCollection areaTree = pageArea.getPageCollection();
        final PageSequence pageSeq = areaTree.getPageSequence();
        final SimplePageMaster simpleMaster = pageArea.getPageMaster();

        // region-before
        layoutStaticContent(pageSeq, simpleMaster.getRegionBefore(),
                pageArea.getRegionBefore());

        // region-after
        layoutStaticContent(pageSeq, simpleMaster.getRegionAfter(),
                pageArea.getRegionAfter());

        // region-start
        layoutStaticContent(pageSeq, simpleMaster.getRegionStart(),
                pageArea.getRegionStart());

        // region-end
        layoutStaticContent(pageSeq, simpleMaster.getRegionEnd(),
                pageArea.getRegionEnd());
    }
View Full Code Here

Examples of org.foray.fotree.fo.obj.SimplePageMaster

            return getKeywordValue(context, fobj);
        }
        if (value().canEvalPercentage()) {
            int base = 0;
            if (fobj instanceof SimplePageMaster) {
                final SimplePageMaster spm = (SimplePageMaster) fobj;
                base = spm.traitPageHeight();
            } else {
                base = context.widthContainingBlock();
            }
            final float percent = value().evalPercentage();
            return Math.round(base * percent
 
View Full Code Here

Examples of org.foray.fotree.fo.obj.SimplePageMaster

                direction, collection.getCount());
        final PropertyValue value = collection.getItem(whichElement);
        if (value.canEvalPercentage()) {
            int base = 0;
            if (fobj instanceof SimplePageMaster) {
                final SimplePageMaster spm = (SimplePageMaster) fobj;
                base = spm.traitPageHeight();
            } else {
                base = context.widthContainingBlock();
            }
            final float percent = value.evalPercentage();
            return Math.round(base * percent / WKConstants.PERCENT_CONVERSION);
View Full Code Here

Examples of org.foray.fotree.fo.obj.SimplePageMaster

        }
        case PAGE_SEQUENCE_WRAPPER: {
            return new PageSequenceWrapper(parent, propertyList);
        }
        case REGION_AFTER: {
            final SimplePageMaster simplePageMaster = parentSimplePageMaster(
                    enumeration, parent, locator);
            return new RegionAfter(simplePageMaster, propertyList);
        }
        case REGION_BEFORE: {
            final SimplePageMaster simplePageMaster = parentSimplePageMaster(
                    enumeration, parent, locator);
            return new RegionBefore(simplePageMaster, propertyList);
        }
        case REGION_BODY: {
            final SimplePageMaster simplePageMaster = parentSimplePageMaster(
                    enumeration, parent, locator);
            return new RegionBody(simplePageMaster, propertyList);
        }
        case REGION_END: {
            final SimplePageMaster simplePageMaster = parentSimplePageMaster(
                    enumeration, parent, locator);
            return new RegionEnd(simplePageMaster, propertyList);
        }
        case REGION_NAME_SPECIFIER: {
            final FlowTargetList flowTargetList = parentFlowTargetList(
                    enumeration, parent, locator);
            return new RegionNameSpecifier(flowTargetList, propertyList);
        }
        case REGION_START: {
            final SimplePageMaster simplePageMaster = parentSimplePageMaster(
                    enumeration, parent, locator);
            return new RegionStart(simplePageMaster, propertyList);
        }
        case REPEATABLE_PAGE_MASTER_ALTERNATIVES: {
            return new RepeatablePMAlternatives(parent, propertyList);
        }
        case REPEATABLE_PAGE_MASTER_REFERENCE: {
            return new RepeatablePMReference(parent, propertyList);
        }
        case RETRIEVE_MARKER: {
            return new RetrieveMarker(parent, propertyList);
        }
        case RETRIEVE_TABLE_MARKER: {
            return new RetrieveTableMarker(parent, propertyList);
        }
        case ROOT: {
            return new Root(propertyList);
        }
        case SCALING_VALUE_CITATION: {
            return new ScalingValueCitation(parent, propertyList);
        }
        case SIMPLE_PAGE_MASTER: {
            final LayoutMasterSet layoutMasterSet = parentLayoutMasterSet(
                    enumeration, parent, locator);
            return new SimplePageMaster(layoutMasterSet, propertyList);
        }
        case SINGLE_PAGE_MASTER_REFERENCE: {
            return new SinglePageMasterReference(parent, propertyList);
        }
        case STATIC_CONTENT: {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.