Package org.apache.fop.fo

Examples of org.apache.fop.fo.PropertyList


    }

    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

        writingMode = pList.get(PR_WRITING_MODE).getEnum();
        super.bind(pList);

        //Create default column in case no table-columns will be defined.
        defaultColumn = new TableColumn(this, true);
        PropertyList colPList = new StaticPropertyList(defaultColumn, pList);
        colPList.setWritingMode();
        defaultColumn.bind(colPList);

        if (borderCollapse != EN_SEPARATE) {
            //TODO Remove once the collapsing border is at least marginally working.
            borderCollapse = EN_SEPARATE;
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(pList.getFObj(), pInfo.getPropertyList(),
                                         LengthBase.CONTAINING_REFAREA_WIDTH);
        PercentLength refWidth = new PercentLength(1.0, base);

        Numeric labelEnd = distance;
        labelEnd = NumericOp.addition(labelEnd, startIndent);
View Full Code Here

                childNodes.add(row);
                row = null;
            }
            if (row == null) {
                row = new TableRow(this);
                PropertyList pList = new StaticPropertyList(row, savedPropertyList);
                pList.setWritingMode();
                row.bind(pList);
            }
            row.addReplacedCell(cell);
            if (cell.endsRow()) {
                childNodes.add(row);
View Full Code Here

     * @param descPLists the map of the new nodes to property lists
     */
    private void bindChildren(Map descPLists) throws FOPException {
        for (Iterator i = descPLists.keySet().iterator(); i.hasNext(); ) {
            FONode desc = (FONode) i.next();
            PropertyList descPList;
            if (desc instanceof FObj) {
                descPList = (PropertyList) descPLists.get(desc);
                ((FObj) desc).bind(descPList);
            } else if (desc instanceof FOText) {
                descPList = (PropertyList) descPLists.get(desc.getParent());
View Full Code Here

        FOEventHandler foEventHandler = getFOEventHandler();
        // Push a new property list maker which will make MarkerPropertyLists.
        savePropertyListMaker = foEventHandler.getPropertyListMaker();
        foEventHandler.setPropertyListMaker(new PropertyListMaker() {
            public PropertyList make(FObj fobj, PropertyList parentPropertyList) {
                PropertyList pList = new MarkerPropertyList(fobj, parentPropertyList);
                descPLists.put(fobj, pList);
                return pList;
            }
        });
    }
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);
        Numeric margin;
        // Calculate the absolute margin.
        if (propertyList.getExplicitOrShorthand(marginProp) == null) {
            Property indent = propertyList.getExplicit(baseMaker.propId);
            if (indent == null) {
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();
        }
       
        Numeric margin;
        // Calculate the absolute margin.
        if (propertyList.getExplicitOrShorthand(marginProp) == null) {
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.