Package org.foray.fotree

Examples of org.foray.fotree.PropertyList.addProperty()


        final FlowNameSpecifier flowNameSpecifier = new FlowNameSpecifier(
                sourceList, propertyList);
        sourceList.addChild(flowNameSpecifier);
        Property property = new PdFlowNameReference(flowNameSpecifier,
                    FoProperty.FLOW_NAME_REFERENCE.toXslFo(), impliedName);
        propertyList.addProperty(flowNameSpecifier, property);

        /* The target part. */
        final FlowTargetList targetList = new FlowTargetList(assignment,
                PropertyList.emptyPropertyList());
        assignment.addChild(targetList);
View Full Code Here


        final RegionNameSpecifier regionNameSpecifier = new RegionNameSpecifier(
                targetList, propertyList);
        targetList.addChild(regionNameSpecifier);
        property = new PdRegionNameReference(regionNameSpecifier,
                FoProperty.REGION_NAME_REFERENCE.toXslFo(), impliedName);
        propertyList.addProperty(regionNameSpecifier, property);
    }

    /**
     * {@inheritDoc}
     */
 
View Full Code Here

    @Test
    public void testNormal() throws PropertyException {
        final FObj fobj = makeTestFObj();
        final PropertyList propertyList = fobj.getPropertyList();
        final PdLineHeight property = new PdLineHeight(fobj, "", "normal");
        propertyList.addProperty(fobj, property);
        final int halfLeadingOpt = fobj.traitHalfLeadingOpt(STD_FO_CONTEXT);
        /* Default font-size is 12 points or 12,000 millipoints. The "normal"
         * line height is 1.2 times that or 14,400 millipoints. The difference
         * is 2,400 millipoints, which is the leading. Half that value is
         * 1,200 millipoints. */
 
View Full Code Here

    @Test
    public void testLength() throws PropertyException {
        final FObj fobj = makeTestFObj();
        final PropertyList propertyList = fobj.getPropertyList();
        final PdLineHeight lh = new PdLineHeight(fobj, "", "3.7cm");
        propertyList.addProperty(fobj, lh);
        final int halfLeadingMax = fobj.traitHalfLeadingMax(STD_FO_CONTEXT);
        /* D = Distance between baselines = 3.7cm = 104,882 millipoints.
         * L = Leading = D - the default font size of 12,000 = 92,882
         * millipoints.
         * HL = L / 2 = 46,441 millipoints. */
 
View Full Code Here

            final String keyword) throws PropertyException {
        final FObj fobj = makeTestFObj();
        final PropertyList propertyList = fobj.getPropertyList();
        final PdForcePageCount property = new PdForcePageCount(fobj, "",
                keyword);
        propertyList.addProperty(fobj, property);
        return fobj.traitForcePageCount(STD_FO_CONTEXT);
    }

    /**
     * Unit test for an "auto" value.
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.