Examples of FObj


Examples of org.apache.fop.fo.FObj

        }
        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);
        }
        return p;
    }
View Full Code Here

Examples of org.apache.fop.fo.FObj

                                        PropertyList propertyList, FObj fo)
                    throws PropertyException {
            if (p instanceof ColorProperty) {
                return p;
            }
            FObj fobj = (fo == null ? propertyList.getFObj() : fo);
            FOUserAgent ua = (fobj == null ? null : fobj.getUserAgent());
            Color val = p.getColor(ua);
            if (val != null) {
                return new ColorProperty(val);
            }
            return convertPropertyDatatype(p, propertyList, fo);
View Full Code Here

Examples of org.apache.fop.fo.FObj

    /**
     * @see org.apache.fop.fo.FONode#clone(FONode, boolean)
     */
    public FONode clone(FONode parent, boolean removeChildren)
        throws FOPException {
        FObj fobj = (FObj) super.clone(parent, removeChildren);
        if (removeChildren) {
            Table t = (Table) fobj;
            t.columns = null;
            t.tableHeader = null;
            t.tableFooter = null;
View Full Code Here

Examples of org.apache.fop.fo.FObj

     * Set default precedence according to the parent FObj
     *
     * @see PropertyMaker#compute(PropertyList)
     */
    public Property make(PropertyList propertyList) throws PropertyException {
        FObj fo = propertyList.getFObj();
        switch (fo.getNameId()) {
        case Constants.FO_TABLE:
            return num6;
        case Constants.FO_TABLE_CELL:
            return num5;
        case Constants.FO_TABLE_COLUMN:
View Full Code Here

Examples of org.apache.fop.fo.FObj

    public Property get(int subpropId, PropertyList propertyList,
                        boolean tryInherit, boolean tryDefault)
            throws PropertyException {
       
        Property p = super.get(0, propertyList, tryInherit, tryDefault);   
        FObj fo = propertyList.getFObj();
        String fallbackValue = (propId == Constants.PR_PAGE_HEIGHT)
            ? fo.getFOEventHandler().getUserAgent().getPageHeight()
                    : fo.getFOEventHandler().getUserAgent().getPageWidth();
       
        if (p.getEnum() == Constants.EN_INDEFINITE) {
            int otherId = (propId == Constants.PR_PAGE_HEIGHT)
                ? Constants.PR_PAGE_WIDTH : Constants.PR_PAGE_HEIGHT;
            int writingMode = propertyList.get(Constants.PR_WRITING_MODE).getEnum();
            int refOrientation = propertyList.get(Constants.PR_REFERENCE_ORIENTATION)
                        .getNumeric().getValue();
            if (propertyList.getExplicit(otherId) != null
                    && propertyList.getExplicit(otherId).getEnum() == Constants.EN_INDEFINITE) {
                //both set to "indefinite":
                //determine which one of the two defines the dimension
                //in block-progression-direction, and set the other to
                //"auto"
                if ((writingMode != Constants.EN_TB_RL
                        && (refOrientation == 0
                                || refOrientation == 180
                                || refOrientation == -180))
                     || (writingMode == Constants.EN_TB_RL
                             && (refOrientation == 90
                                     || refOrientation == 270
                                     || refOrientation == -270))) {
                    //set page-width to "auto" = use the fallback from FOUserAgent
                    if (propId == Constants.PR_PAGE_WIDTH) {
                        fo.getLogger().warn("Both page-width and page-height set to "
                                + "\"indefinite\". Forcing page-width to \"auto\"");
                        return make(propertyList, fallbackValue, fo);
                    }
                } else {
                    //set page-height to "auto" = use fallback from FOUserAgent
                    fo.getLogger().warn("Both page-width and page-height set to "
                            + "\"indefinite\". Forcing page-height to \"auto\"");
                    if (propId == Constants.PR_PAGE_HEIGHT) {
                        return make(propertyList, fallbackValue, fo);
                    }
                }
View Full Code Here

Examples of org.apache.fop.fo.FObj

        /**
         * @see PropertyMaker#make(PropertyList)
         */
        public Property make(PropertyList propertyList)
                throws PropertyException {
            FObj fo = propertyList.getFObj();

            if (fo.getNameId() == Constants.FO_TABLE_CELL
                    || fo.getNameId() == Constants.FO_TABLE_COLUMN) {
                if (fo.getNameId() == Constants.FO_TABLE_CELL
                        && fo.getParent().getNameId() != Constants.FO_TABLE_ROW
                        && (propertyList.get(Constants.PR_STARTS_ROW).getEnum()
                                == Constants.EN_TRUE)) {
                    TableBody parent = (TableBody) fo.getParent();
                    if (!parent.previousCellEndedRow()) {
                        parent.resetColumnIndex();
                    }
                }
                return new NumberProperty(((TableFObj) fo.getParent())
                                            .getCurrentColumnIndex());
            } else {
                throw new PropertyException(
                        "column-number property is only allowed"
                        + " on fo:table-cell or fo:table-column, not on "
                        + fo.getName());
            }
        }
View Full Code Here

Examples of org.apache.fop.fo.FObj

        }
        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);
        }
        return p;
    }
View Full Code Here

Examples of org.apache.fop.fo.FObj

     * Set default precedence according to the parent FObj
     *
     * {@inheritDoc}
     */
    public Property make(PropertyList propertyList) throws PropertyException {
        FObj fo = propertyList.getFObj();
        switch (fo.getNameId()) {
        case Constants.FO_TABLE:
            return num6;
        case Constants.FO_TABLE_CELL:
            return num5;
        case Constants.FO_TABLE_COLUMN:
View Full Code Here

Examples of org.apache.fop.fo.FObj

    public Property get(int subpropId, PropertyList propertyList,
                        boolean tryInherit, boolean tryDefault)
            throws PropertyException {

        Property p = super.get(0, propertyList, tryInherit, tryDefault);
        FObj fo = propertyList.getFObj();
        String fallbackValue = (propId == Constants.PR_PAGE_HEIGHT)
            ? fo.getUserAgent().getPageHeight()
                    : fo.getUserAgent().getPageWidth();

        if (p.getEnum() == Constants.EN_INDEFINITE) {
            int otherId = (propId == Constants.PR_PAGE_HEIGHT)
                ? Constants.PR_PAGE_WIDTH : Constants.PR_PAGE_HEIGHT;
            int writingMode = propertyList.get(Constants.PR_WRITING_MODE).getEnum();
View Full Code Here

Examples of org.apache.fop.fo.FObj

        }

        /** {@inheritDoc} */
        public Property make(PropertyList propertyList)
                throws PropertyException {
            FObj fo = propertyList.getFObj();

            return NumberProperty.getInstance(((ColumnNumberManagerHolder) fo.getParent())
                    .getColumnNumberManager().getCurrentColumnNumber());
        }
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.