Package org.apache.fop.fo

Examples of org.apache.fop.fo.PropertyList


        if (!relative) {
            return false;
        }
       
        PropertyList pList = getWMPropertyList(propertyList);
        if (pList != null) {
            int correspondingId = pList.getWritingMode(lr_tb, rl_tb, tb_rl);
       
            if (pList.getExplicit(correspondingId) != null) {
                return true;
            }
        }
        return false;
    }
View Full Code Here


     * @return Property A computed Property value or null if no rules
     * are specified (in foproperties.xml) to compute the value.
     * @throws FOPException for invalid or inconsistent FO input
     */
    public Property compute(PropertyList propertyList) throws PropertyException {
        PropertyList pList = getWMPropertyList(propertyList);
        if (pList == null) {
            return null;
        }
        int correspondingId = pList.getWritingMode(lr_tb, rl_tb, tb_rl);
           
        Property p = propertyList.getExplicitOrShorthand(correspondingId);
        if (p != null) {
            FObj parentFO = propertyList.getParentFObj();
            p = baseMaker.convertProperty(p, propertyList, parentFO);
View Full Code Here

    /**
     * Calculate the corresponding value for start-indent and end-indent. 
     * @see CorrespondingPropertyMaker#compute(PropertyList)
     */
    public Property computeConforming(PropertyList propertyList) throws PropertyException {
        PropertyList pList = getWMPropertyList(propertyList);
        if (pList == null) {
            return null;
        }
        // Calculate the values as described in 5.3.2.

        Numeric padding = getCorresponding(paddingCorresponding, propertyList).getNumeric();
        Numeric border = getCorresponding(borderWidthCorresponding, propertyList).getNumeric();
       
        int marginProp = pList.getWritingMode(lr_tb, rl_tb, tb_rl);
        // Calculate the absolute margin.
        if (propertyList.getExplicitOrShorthand(marginProp) == null) {
            Property indent = propertyList.getExplicit(baseMaker.propId);
            if (indent == null) {
                //Neither indent nor margin is specified, use inherited
View Full Code Here

     * tries to mimic many commercial solutions that chose to violate the
     * XSL specification. 
     * @see CorrespondingPropertyMaker#compute(PropertyList)
     */
    public Property computeAlternativeRuleset(PropertyList propertyList) throws PropertyException {
        PropertyList pList = getWMPropertyList(propertyList);
        if (pList == null) {
            return null;
        }

        // Calculate the values as described in 5.3.2.

        Numeric padding = getCorresponding(paddingCorresponding, propertyList).getNumeric();
        Numeric border = getCorresponding(borderWidthCorresponding, propertyList).getNumeric();
       
        int marginProp = pList.getWritingMode(lr_tb, rl_tb, tb_rl);

        //Determine whether the nearest anscestor indent was specified through
        //start-indent|end-indent or through a margin property.
        boolean marginNearest = false;
        PropertyList pl = propertyList.getParentPropertyList();
        while (pl != null) {
            if (pl.getExplicit(baseMaker.propId) != null) {
                break;
            } else if (pl.getExplicitOrShorthand(marginProp) != null) {
                marginNearest = true;
                break;
            }
            pl = pl.getParentPropertyList();
        }
       
        // Calculate the absolute margin.
        if (propertyList.getExplicitOrShorthand(marginProp) == null) {
            Property indent = propertyList.getExplicit(baseMaker.propId);
View Full Code Here

        }
    }
   
    private Property getCorresponding(int[] corresponding, PropertyList propertyList)
                throws PropertyException {
        PropertyList pList = getWMPropertyList(propertyList);
        if (pList != null) {
            int wmcorr = pList.getWritingMode(corresponding[0], corresponding[1], corresponding[2]);
            return propertyList.get(wmcorr);
        } else {
            return null;
        }
    }
View Full Code Here

    }

    private TableColumn createImplicitColumn(int colNumber)
                    throws FOPException {
        TableColumn implicitColumn = new TableColumn(this, true);
        PropertyList pList = new StaticPropertyList(
                                implicitColumn, this.propList);
        pList.setWritingMode();
        implicitColumn.bind(pList);
        implicitColumn.setColumnWidth(new TableColLength(1.0, implicitColumn));
        implicitColumn.setColumnNumber(colNumber);
        if (!isSeparateBorderModel()) {
            implicitColumn.setCollapsedBorders(collapsingBorderModel); // TODO
View Full Code Here

        if (child != null) {
            FONode newChild = child.clone(newParent, true);
            if (child instanceof FObj) {
                Marker.MarkerPropertyList pList;
                PropertyList newPropertyList = createPropertyListFor(
                            (FObj) newChild, parentPropertyList);
               
                pList = marker.getPropertyListFor(child);
                newChild.processNode(
                        child.getLocalName(),
View Full Code Here

    }
   
    private static CommonTextDecoration calcTextDecoration(PropertyList pList)
                throws PropertyException {
        CommonTextDecoration deco = null;
        PropertyList parentList = pList.getParentPropertyList();
        if (parentList != null) {
            //Parent is checked first
            deco = calcTextDecoration(parentList);
        }
        //For rules, see XSL 1.0, chapters 5.5.6 and 7.16.4
View Full Code Here

    public Property eval(Property[] args,
                         PropertyInfo pInfo) throws PropertyException {
        Numeric distance =
            pInfo.getPropertyList().get(Constants.PR_PROVISIONAL_DISTANCE_BETWEEN_STARTS).getNumeric();

        PropertyList pList = pInfo.getPropertyList();
        while (pList != null && !(pList.getFObj() instanceof ListItem)) {
            pList = pList.getParentPropertyList();
        }
        if (pList == null) {
            throw new PropertyException("body-start() called from outside an fo:list-item");
        }

        Numeric startIndent = pList.get(Constants.PR_START_INDENT).getNumeric();

        return (Property) NumericOp.addition(distance, startIndent);
    }
View Full Code Here

        Length distance = pInfo.getPropertyList().get(
                Constants.PR_PROVISIONAL_DISTANCE_BETWEEN_STARTS).getLength();
        Length separation = pInfo.getPropertyList().getNearestSpecified(
                Constants.PR_PROVISIONAL_LABEL_SEPARATION).getLength();

        PropertyList pList = pInfo.getPropertyList();
        while (pList != null && !(pList.getFObj() instanceof ListItem)) {
            pList = pList.getParentPropertyList();
        }
        if (pList == null) {
            throw new PropertyException("label-end() called from outside an fo:list-item");
        }
        Length startIndent = pList.get(Constants.PR_START_INDENT).getLength();

        LengthBase base = new LengthBase(pInfo.getPropertyList(),
                                         LengthBase.CONTAINING_REFAREA_WIDTH);
        PercentLength refWidth = new PercentLength(1.0, base);
View Full Code Here

TOP

Related Classes of org.apache.fop.fo.PropertyList

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.